diff options
Diffstat (limited to 'gdb/m68kbsd-tdep.c')
-rw-r--r-- | gdb/m68kbsd-tdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c index 01208e5..383a303 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_register_type (current_gdbarch, regnum)); + 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 |