This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Cleanup FPU_REG_RAW_SIZE (IA-32/AMD64)
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 26 Oct 2003 15:50:07 +0100 (CET)
- Subject: [PATCH] Cleanup FPU_REG_RAW_SIZE (IA-32/AMD64)
This makes AMD64 more like IA-32 and allows me to remove a macro.
Committed.
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-tdep.h (FPU_REG_RAW_SIZE): Remove define.
* x86-64-tdep.c (x86_64_store_return_value): Use
I386_MAX_REGISTER_SIZE instead of FPU_REG_RAW_SIZE.
Index: i386-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.h,v
retrieving revision 1.30
diff -u -p -r1.30 i386-tdep.h
--- i386-tdep.h 26 Oct 2003 13:08:57 -0000 1.30
+++ i386-tdep.h 26 Oct 2003 14:44:55 -0000
@@ -104,8 +104,6 @@ struct gdbarch_tdep
/* Floating-point registers. */
-#define FPU_REG_RAW_SIZE 10
-
/* All FPU control regusters (except for FIOFF and FOOFF) are 16-bit
(at most) in the FPU, but are zero-extended to 32 bits in GDB's
register cache. */
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.100
diff -u -p -r1.100 x86-64-tdep.c
--- x86-64-tdep.c 11 Oct 2003 14:19:11 -0000 1.100
+++ x86-64-tdep.c 26 Oct 2003 14:44:56 -0000
@@ -761,7 +761,7 @@ x86_64_store_return_value (struct type *
if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
{
ULONGEST fstat;
- char buf[FPU_REG_RAW_SIZE];
+ char buf[I386_MAX_REGISTER_SIZE];
/* Returning floating-point values is a bit tricky. Apart from
storing the return value in %st(0), we have to simulate the