This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ST(i) and MMj


Eli Zaretskii wrote:
> 
> > >   1) Define REGISTER_RAW_SIZE to be 8 for MMX registers, and define
> > >      REGISTER_BYTE so that for MMX registers it goes to the data of
> > >      the according ST(i) register using the current TOS.
> > >
> > >   2) target_fetch_registers then will actually bring the value of the
> > >      appropriate ST(i) register when passed a regno of an MMX
> > >      register.
> >
> > I thought we had posited that the MMX registers, when stored in
> > memory, have zero length --- i.e., REGISTER_RAW_SIZE (MM0_REGNO) == 0
> > --- to avoid overlap problems in loops.
> 
> The above still avoids overlap, by keeping only a single copy of each
> FPU register in the register file.  However, the zero-size definition
> isn't useful when you want to read the value of an MMX register from
> the register file.  So I changed my mind ;-).
> 
> > What concerns me is that it be reasonable enough that people who are
> > not familiar with the x86 won't write code that breaks it.
> 
> Hiding the complexity behind REGISTER_BYTE should prevent this.

Only to confuse the poor person that has to fix a bug in REGISTER_BYTE
:-)
I think Jim's point is important.  The current semantics of this macro
is fairly straight forward - return the offset of the byte in a raw
buffer.  Compare that to some of the other target macro's such as
REGISTER_NAME / REGISTER_NAMES.

There's an oportunity here to eliminate a problem with GDB for all
targets.

	enjoy,
		Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]