From 4944f54f41c6f1c3bebc247007a5179f5e19a81a Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 27 Jul 1998 07:53:27 -0600 Subject: [PATCH] mn10300.h (DEBUGGER_AUTO_OFFSET): Define. ` * 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 | 23 +++++++++++++++++++++++ gcc/config/mn10300/mn10300.md | 8 -------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 938561cff36..3e03a4b50b0 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -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 diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index e10df8aff22..a0d06522077 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -318,14 +318,6 @@ /* 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\"; } }" -- 2.30.2