OSDN Git Service

moxie EH fixes
[pf3gnuchains/gcc-fork.git] / gcc / config / moxie / moxie.h
index 0cfc11b..c3b3454 100644 (file)
@@ -285,6 +285,21 @@ enum reg_class
    pointer registers are already assumed to be used as needed.  */
 #define EPILOGUE_USES(R) (R == MOXIE_R5)
 
+/* A C expression whose value is RTL representing the location of the
+   incoming return address at the beginning of any function, before
+   the prologue.  */
+#define INCOMING_RETURN_ADDR_RTX                                       \
+  gen_frame_mem (Pmode,                                                        \
+                plus_constant (stack_pointer_rtx, UNITS_PER_WORD))
+
+/* Describe how we implement __builtin_eh_return.  */
+#define EH_RETURN_DATA_REGNO(N)        ((N) < 4 ? (N+2) : INVALID_REGNUM)
+
+/* Store the return handler into the call frame.  */
+#define EH_RETURN_HANDLER_RTX                                          \
+  gen_frame_mem (Pmode,                                                        \
+                plus_constant (frame_pointer_rtx, UNITS_PER_WORD))
+
 /* Storage Layout */
 
 #define BITS_BIG_ENDIAN 0
@@ -405,7 +420,7 @@ enum reg_class
 #define INDEX_REG_CLASS NO_REGS
 
 #define HARD_REGNO_OK_FOR_BASE_P(NUM) \
-  ((NUM) >= 0 && (NUM) < FIRST_PSEUDO_REGISTER \
+  ((unsigned) (NUM) < FIRST_PSEUDO_REGISTER \
    && (REGNO_REG_CLASS(NUM) == GENERAL_REGS \
        || (NUM) == HARD_FRAME_POINTER_REGNUM))