This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Fix i386 check for availability of FP registers
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 19 Apr 2003 16:39:11 +0200 (CEST)
- Subject: [PATCH] Fix i386 check for availability of FP registers
Just in case someone re-introduces an FPU-less i386 target.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis at gnu dot org>
* i386-tdep.c (i386_extract_return_value,
i386_store_return_value): Correct check for availability of
floating-point registers.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.136
diff -u -p -r1.136 i386-tdep.c
--- i386-tdep.c 19 Apr 2003 14:34:31 -0000 1.136
+++ i386-tdep.c 19 Apr 2003 14:36:48 -0000
@@ -892,7 +892,7 @@ i386_extract_return_value (struct type *
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- if (FP0_REGNUM == 0)
+ if (FP0_REGNUM < 0)
{
warning ("Cannot find floating-point return value.");
memset (valbuf, 0, len);
@@ -950,7 +950,7 @@ i386_store_return_value (struct type *ty
ULONGEST fstat;
char buf[FPU_REG_RAW_SIZE];
- if (FP0_REGNUM == 0)
+ if (FP0_REGNUM < 0)
{
warning ("Cannot set floating-point return value.");
return;