* scripttempl/elf.sc: Add .note.gnu.build-id.
[deliverable/binutils-gdb.git] / gdb / m68kbsd-tdep.c
index 01208e509ac29adf893b7faeeeee7492f25269fe..383a3032d0fc00c139a65266b458269cf0c8099b 100644 (file)
 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
This page took 0.023567 seconds and 4 git commands to generate.