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



(Note that I changed the subject: "none" seems inappropriate ;-)

> If a symbol's address class (`aclass') is LOC_REGISTER and its value
> is N, then GDB assumes the variable's value occupies register N.  It
> uses REGISTER_BYTE(N), REGISTER_RAW_SIZE(N), etc. to access that
> symbol's value.

We could arrange for REGISTER_RAW_SIZE and REGISTER_BYTE to perform
the required mapping between %st(i) and %mmj using the current TOS.

> We can't assign distinct register numbers to %st(0) and %mm0, for
> reasons discussed previously: GDB can't cope with two distinct
> register numbers referring to the same bits in the register file.

During that discussion I did agree that these registers should not be
treated as separate, but it seems we meant different things.

What I meant was that it is a Bad Idea to maintain separate data for
each one of these sets.  In other words, if %st(3) corresponds to
%mm0, it is wrong to have GDB maintain a separate data buffer where
the contents of each one of these registers is held.  The reason for
this is that it would be very hard to teach GDB and the
platform-specific code which data to use in each case, especially when
the user changes the values in these registers and you need to pass
the changed values to the debuggee.

But I don't see why cannot GDB _think_ about %st(X) and %mmY as being
separate registers while in reality they share the same data, if this
sharing is concealed behind REGISTER_BYTE and REGISTER_RAW_SIZE (and
possibly other functions/macros used to manipulate registers).  What
are the specific problems with this scheme?

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