This is the mail archive of the gdb-patches@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: Unifying i387 support



Okay, so it looks like people think having a standard layout for i387
state is a good idea.  It seems to me that the same argument applies
to the integer registers as well.  The only systems that deviate from
the layout used by the processor itself are SunOS 4 on i386, and the
Sequent Symmetry.  The former is very dead; I don't know about the
latter.

We could consolidate all the stuff describing the register map in
tm-i386.h, and then delete the non-conflicting definitions from the
other targets.


So, something like:

#define REGISTER_NAMES { "eax",  "ecx",  "edx",  "ebx",  \
			 "esp",  "ebp",  "esi",  "edi",  \
			 "eip",  "eflags","cs",  "ss",   \
			 "ds",   "es",   "fs",   "gs",   \
			 "fctrl","fstat","ftag", "fioff",\
			 "fiseg","fop",  "fdoff","fdseg",\
			 "st",   "st1",  "st2",  "st3",  \
                         "st4",  "st5",  "st6",  "st7",}

with the FP registers placed in the register array as if we had:

struct i387_regs {
  char ctrl[2];		char dummy1[2];
  char stat[2];		char dummy2[2];
  char tag[2];		char dummy3[2];
  char code_off[4];
  char code_seg[2];
  char opcode[2];
  char data_off[4];
  char data_seg[2];	char dummy4[2];
  char st[8][10];
};

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