summaryrefslogtreecommitdiff
path: root/gcc/config/mn10300
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-27 13:53:27 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-27 13:53:27 +0000
commit4b1b77f144735af938fef9feee407e16bcaf2692 (patch)
treec54730237445d6370ca99c54a479a513d96693c2 /gcc/config/mn10300
parentfcb4ca3037a03f09bd6c376a1d5e008d815e8c2d (diff)
downloadgcc-4b1b77f144735af938fef9feee407e16bcaf2692.tar.gz
`
* mn10300.h (DEBUGGER_AUTO_OFFSET): Define. (DEBUGGER_ARG_OFFSET): Likewise. * mn10300.md (movsf): Remove last change. Not needed. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21415 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mn10300')
-rw-r--r--gcc/config/mn10300/mn10300.h23
-rw-r--r--gcc/config/mn10300/mn10300.md8
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\";
}
}"