diff options
author | Mark Kettenis <kettenis@gnu.org> | 2002-09-01 22:05:42 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2002-09-01 22:05:42 +0000 |
commit | 3ecebd8b07cc254d4955da50943c40d459eba723 (patch) | |
tree | e9977feabbdaf3f62bdaaad9f6516a06f662d8a4 /gdb/i386-linux-nat.c | |
parent | 96bb157062f2a19a3927e145bd197f2bfa4a5214 (diff) | |
download | gdb-3ecebd8b07cc254d4955da50943c40d459eba723.tar.gz |
* i386-linux-nat.c (dummy_sse_values): Only try to fill in the SSE
registers if the target really has them.
* defs.h: Move inclusion of "ansidecl.h" before "gdb_locale.h".
Fix some whitespace problems.
Diffstat (limited to 'gdb/i386-linux-nat.c')
-rw-r--r-- | gdb/i386-linux-nat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index 74c70dbbff1..84588795699 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -541,15 +541,17 @@ store_fpxregs (int tid, int regno) static void dummy_sse_values (void) { + struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); /* C doesn't have a syntax for NaN's, so write it out as an array of longs. */ static long dummy[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff }; static long mxcsr = 0x1f80; int reg; - for (reg = 0; reg < 8; reg++) + for (reg = 0; reg < tdep->num_xmm_regs; reg++) supply_register (XMM0_REGNUM + reg, (char *) dummy); - supply_register (MXCSR_REGNUM, (char *) &mxcsr); + if (tdep->num_xmm_regs > 0) + supply_register (MXCSR_REGNUM, (char *) &mxcsr); } #else |