ST(i) and MMj

Jim Blandy jimb@cygnus.com
Wed Dec 1 14:43:00 GMT 1999


> 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.

Ah.  I see what you meant now.  Yes, we misunderstood each other.

> 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?

Grep the sources for NUM_REGS, and look for loops that traverse the
register set.  Prove to yourself that none of these loops will break
if register X aliases register Y.  Persuade yourself that nobody in
the future, innocent of the x86's sins, will write such a loop.

I tried, but I couldn't manage it.  :)


More information about the Gdb mailing list