diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-06-15 11:01:46 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-06-15 11:01:46 +0000 |
commit | d532c08fb0172968305f4ebda8e128593e27dba0 (patch) | |
tree | dfe581b954dc279fc97a665e9b84d1554888c2f7 /gdb/x86-64-tdep.c | |
parent | f63f176ed65dc87e1ff44ee63ebcdc808f9226e0 (diff) | |
download | fsf-binutils-gdb-d532c08fb0172968305f4ebda8e128593e27dba0.zip fsf-binutils-gdb-d532c08fb0172968305f4ebda8e128593e27dba0.tar.gz fsf-binutils-gdb-d532c08fb0172968305f4ebda8e128593e27dba0.tar.bz2 |
* i386-tdep.c (i386_register_to_value, i386_value_to_register):
Move floating-point code to new function in i387-tdep.c.
* i387-tdep.c (i387_register_to_value, i387_value_to_register):
New functions containing code moved here from i386-tdep.c.
* i387-tdep.h: Add opaque declaration for `struct type'.
(i387_register_to_value, i387_value_to_register): New prototypes.
* x86-64-tdep.c (x86_64_convert_register_p): New function.
(x86_64_init_abi): Set convert_register_p, register_to_value and
value_to_register here.
Diffstat (limited to 'gdb/x86-64-tdep.c')
-rw-r--r-- | gdb/x86-64-tdep.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 6c38f8d..906ebd9 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -208,6 +208,15 @@ x86_64_dwarf_reg_to_regnum (int reg) return regnum; } + +/* Return nonzero if a value of type TYPE stored in register REGNUM + needs any special handling. */ + +static int +x86_64_convert_register_p (int regnum, struct type *type) +{ + return i386_fp_regnum_p (regnum); +} /* The returning of values is done according to the special algorithm. @@ -1178,6 +1187,10 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* Call dummy code. */ set_gdbarch_push_dummy_call (gdbarch, x86_64_push_dummy_call); + set_gdbarch_convert_register_p (gdbarch, x86_64_convert_register_p); + set_gdbarch_register_to_value (gdbarch, i387_register_to_value); + set_gdbarch_value_to_register (gdbarch, i387_value_to_register); + set_gdbarch_extract_return_value (gdbarch, x86_64_extract_return_value); set_gdbarch_store_return_value (gdbarch, x86_64_store_return_value); /* Override, since this is handled by x86_64_extract_return_value. */ |