+2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
+
+ * defaults.h (RETURN_ADDR_OFFSET): New definition.
+ * except.c (expand_builtin_extract_return_addr): Remove ifdef
+ RETURN_ADDR_OFFSET.
+ (expand_builtin_frob_return_addr): Likewise.
+
2015-04-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfgrtl.c (rtl_merge_blocks): Change #if HAVE_cc0 to if (HAVE_cc0)
#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM
#endif
+/* Offset between the eh handler address and entry in eh tables. */
+#ifndef RETURN_ADDR_OFFSET
+#define RETURN_ADDR_OFFSET 0
+#endif
+
/* If we have named section and we support weak symbols, then use the
.jcr section for recording java classes which need to be registered
at program start-up time. */
#endif
/* Then adjust to find the real return address. */
-#if defined (RETURN_ADDR_OFFSET)
- addr = plus_constant (Pmode, addr, RETURN_ADDR_OFFSET);
-#endif
+ if (RETURN_ADDR_OFFSET)
+ addr = plus_constant (Pmode, addr, RETURN_ADDR_OFFSET);
return addr;
}
addr = convert_memory_address (Pmode, addr);
-#ifdef RETURN_ADDR_OFFSET
- addr = force_reg (Pmode, addr);
- addr = plus_constant (Pmode, addr, -RETURN_ADDR_OFFSET);
-#endif
+ if (RETURN_ADDR_OFFSET)
+ {
+ addr = force_reg (Pmode, addr);
+ addr = plus_constant (Pmode, addr, -RETURN_ADDR_OFFSET);
+ }
return addr;
}