summaryrefslogtreecommitdiff
path: root/gdb/m68kbsd-tdep.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2006-06-05 15:11:01 +0000
committerNathan Sidwell <nathan@codesourcery.com>2006-06-05 15:11:01 +0000
commit581ee957f152c1c993a0bef1edb0178f3d9f8517 (patch)
tree39ab10cd11b56c1b5a12d000da21ef624fb90c66 /gdb/m68kbsd-tdep.c
parentc92a7f0fd7213e8889423558217dfbf30ba643e2 (diff)
downloadgdb-581ee957f152c1c993a0bef1edb0178f3d9f8517.tar.gz
* gdb/m68k-tdep.c (M68K_FPREG_SIZE): Remove.
(REGISTER_BYTES_FP): Use tdep->fpreg_type. (m68k_register_bytes_ok): adjust. (m68k_register_type): Use tdep->fpreg_type. (m68k_register_to_value, m68k_value_to_register): Likewise. (m68k_svr4_extract_return_value): Use tdep->float_return & tdep->fpreg_type. (m68k_svr4_store_return_value): Likewise. (m68k_gdbarch_init): Set tdep->float_return & tdep->fpreg_type. * gdb/m68k-tdep.h (struct gdbarch_tdep): Add floar_return & fpreg_type fields. * gdb/m68kbsd-tdep.c (m68kbsd_fpreg_offset): Use tdep->fpreg_type.
Diffstat (limited to 'gdb/m68kbsd-tdep.c')
-rw-r--r--gdb/m68kbsd-tdep.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index c74b18acd27..682020c1923 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -45,10 +45,12 @@
int
m68kbsd_fpreg_offset (int regnum)
{
+ int fp_len = TYPE_LENGTH (*gdbarch_tdep (current_gdbarch)->fpreg_type);
+
if (regnum >= M68K_FPC_REGNUM)
- return 8 * 12 + (regnum - M68K_FPC_REGNUM) * 4;
+ return 8 * fp_len + (regnum - M68K_FPC_REGNUM) * 4;
- return (regnum - M68K_FP0_REGNUM) * 12;
+ return (regnum - M68K_FP0_REGNUM) * fp_len;
}
/* Supply register REGNUM from the buffer specified by FPREGS and LEN