mn10300.h (DEBUGGER_AUTO_OFFSET): Define.
authorJeff Law <law@gcc.gnu.org>
Mon, 27 Jul 1998 13:53:27 +0000 (07:53 -0600)
committerJeff Law <law@gcc.gnu.org>
Mon, 27 Jul 1998 13:53:27 +0000 (07:53 -0600)
`
        * mn10300.h (DEBUGGER_AUTO_OFFSET): Define.
        (DEBUGGER_ARG_OFFSET): Likewise.
        * mn10300.md (movsf): Remove last change.  Not needed.

From-SVN: r21415

gcc/config/mn10300/mn10300.h
gcc/config/mn10300/mn10300.md

index 938561cff3620f1f34038f293d0369ed173fcf34..3e03a4b50b0eb7b0784a438f415ff46cfe6207d3 100644 (file)
@@ -954,6 +954,29 @@ do { char dstr[30];                                        \
 
 #define DBX_REGISTER_NUMBER(REGNO) REGNO
 
+/* GDB always assumes the current function's frame begins at the value
+   of the stack pointer upon entry to the current function.  Accessing
+   local variables and parameters passed on the stack is done using the
+   base of the frame + an offset provided by GCC.
+
+   For functions which have frame pointers this method works fine;
+   the (frame pointer) == (stack pointer at function entry) and GCC provides
+   an offset relative to the frame pointer.
+
+   This loses for functions without a frame pointer; GCC provides an offset
+   which is relative to the stack pointer after adjusting for the function's
+   frame size.  GDB would prefer the offset to be relative to the value of
+   the stack pointer at the function's entry.  Yuk!  */
+#define DEBUGGER_AUTO_OFFSET(X) \
+  ((GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) \
+    + (frame_pointer_needed \
+       ? 0 : -initial_offset (FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM)))
+
+#define DEBUGGER_ARG_OFFSET(OFFSET, X) \
+  ((GET_CODE (X) == PLUS ? OFFSET : 0) \
+    + (frame_pointer_needed \
+       ? 0 : -initial_offset (ARG_POINTER_REGNUM, STACK_POINTER_REGNUM)))
+
 /* Define to use software floating point emulator for REAL_ARITHMETIC and
    decimal <-> binary conversion. */
 #define REAL_ARITHMETIC
index e10df8aff22a13ac1210c9683b6549a96a99107f..a0d0652207770bc8c4fa69181f9a6525a7bebd97 100644 (file)
       /* FALLTHROUGH */
     case 4:
     case 5:
-      if (GET_CODE (operands[1]) == CONST_DOUBLE)
-       {
-         rtx xoperands[2];
-         xoperands[0] = operands[0];
-         xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
-         output_asm_insn (\"mov %1,%0\", xoperands);
-         return \"\";
-       }
       return \"mov %1,%0\";
     }
 }"