summaryrefslogtreecommitdiff
path: root/gdb/i387-tdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-03-26 21:21:50 +0000
committerMark Kettenis <kettenis@gnu.org>2000-03-26 21:21:50 +0000
commit8910f9e36f52fbafb5512cd91823e4ea3188ebaf (patch)
tree0353d2b4bf8f0314fc40ee2304ea33e51709b61c /gdb/i387-tdep.c
parent300a8b3146caaca26173c7694d3f78e90fbc302b (diff)
downloadgdb-8910f9e36f52fbafb5512cd91823e4ea3188ebaf.tar.gz
2000-03-26 Mark Kettenis <kettenis@gnu.org>
Provide `long double' support for most i386 targets. * config/i386/tm-i386.h (TARGET_LONG_DOUBLE_FORMAT): Define as &floatformat_i387_ext. (TARGET_LONG_DOUBLE_BITS): Define as 96. (REGISTER_VIRTUAL_TYPE): Change type for FPU registers to `builtin_type_long_double'. (REGISTER_CONVERT_TO_VIRTUAL): Call i386_register_convert_to_virtual. (REGISTER_CONVERT_TO_RAW): Call i386_register_convert_to_raw. (i387_to_double, double_to_i387): Remove prototypes. (i386_extract_return_value): Change prototype to match definition in i386-tdep.c. * config/i386/tm-i386mk.h (TARGET_LONG_DOUBLE_FORMAT): #undef. (TARGET_LONG_DOUBLE_BITS): #undef. * config/i386/tm-linux.h (TARGET_LONG_DOUBLE_BIT): Remove. [HAVE_LONG_DOUBLE && HOST_I386] (LD_I387): Remove. (i387_extract_floating, i387_store_floating): Remove prototypes. (TARGET_EXTRACT_FLOATING, TARGET_STORE_FLOATING): Remove. (REGISTER_CONVERT_TO_VIRTUAL, REGOISTER_CONVERT_TO_RAW): Remove. (REGISTER_VIRTUAL_TYPE): Remove. * i386-tdep.c (i386_register_convert_to_virtual): New function. (i386_register_convert_to_raw): New function. * i387-tdep.c [LD_I387] (i387_extract_floating): Remove. (i387_store_floating): Remove.
Diffstat (limited to 'gdb/i387-tdep.c')
-rw-r--r--gdb/i387-tdep.c50
1 files changed, 1 insertions, 49 deletions
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 0bb16319abe..20e446d2ff4 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -1,5 +1,5 @@
/* Intel 387 floating point stuff.
- Copyright (C) 1988, 1989, 1991, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1988, 89, 91, 98, 99, 2000 Free Software Foundation, Inc.
This file is part of GDB.
@@ -387,51 +387,3 @@ i387_float_info (void)
printf_filtered ("Opcode: %s\n",
local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
}
-
-
-/* FIXME: The functions on this page are used to provide `long double'
- support for Linux. However, the approach does not seem to be the
- right one, and we are planning to solve this in a way that should
- work for all i386 targets. These functions will disappear in the
- near future, so please don't use them. */
-#ifdef LD_I387
-int
-i387_extract_floating (PTR addr, int len, DOUBLEST *dretptr)
-{
- if (len == TARGET_LONG_DOUBLE_BIT / 8)
- {
- if (HOST_LONG_DOUBLE_FORMAT == TARGET_LONG_DOUBLE_FORMAT)
- {
- DOUBLEST retval;
-
- memcpy (dretptr, addr, sizeof (retval));
- }
- else
- floatformat_to_doublest (TARGET_LONG_DOUBLE_FORMAT, addr, dretptr);
-
- return 1;
- }
- else
- return 0;
-}
-
-int
-i387_store_floating (PTR addr, int len, DOUBLEST val)
-{
- if (len == TARGET_LONG_DOUBLE_BIT / 8)
- {
- /* This `if' may be totally stupid. I just put it in here to be
- absolutely sure I'm preserving the semantics of the code I'm
- frobbing, while I try to maintain portability boundaries; I
- don't actually know exactly what it's doing. -JimB, May 1999 */
- if (HOST_LONG_DOUBLE_FORMAT == TARGET_LONG_DOUBLE_FORMAT)
- memcpy (addr, &val, sizeof (val));
- else
- floatformat_from_doublest (TARGET_LONG_DOUBLE_FORMAT, &val, addr);
-
- return 1;
- }
- else
- return 0;
-}
-#endif /* LD_I387 */