i386 register numbering

Andrew Cagney ac131313@cygnus.com
Sat Jul 28 11:06:00 GMT 2001


> For most of the registers on the i386, the raw and the cooked regnum
> will probably be the same.  MMX will probably end up as a cooked
> registers some day (since they provide a different view on the
> standard FP registers).  I cannot see how I can get rid of the convert
> stuff for the FP registers though.  On the i386 the FP registers can
> contain a `float', `double' or `long double' but the internal
> representation in the FP register is identical.  Turning every FP
> register into three cooked registers won't work since in the debug
> info they will all have the same register number  [:-(] .


Regarding MMX, yes.

For the basic FP register, see my recent RFC post about adding 
builtin_type_floatformat*:

http://sources.redhat.com/ml/gdb-patches/2001-07/msg00624.html


You're saying is that a i386 register is always formatted as 
floatformat_i387_ext. Correct?  Consequently, with the above change (and 
related FIXMEs) in place, all the CONVERT* code could be deleted and 
instead REGISTER_VIRTUAL_TYPE would just return 
builtin_type_floatformat_i387_ext and GDB would internaly handle all the 
conversion problems.

	Andrew





More information about the Gdb mailing list