diff mbox

fix moxie-elf build

Message ID 20101008020736.GL17388@nightcrawler
State New
Headers show

Commit Message

Nathan Froyd Oct. 8, 2010, 2:07 a.m. UTC
The patch below fixes the build for moxie-elf in a similar fashion to
the recently posted fix for mcore-elf:

http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00650.html

for the same symptoms.  I think the definition of
INCOMING_RETURN_ADDR_RTX is correct; I reverse-engineered it from
sim/moxie.  It's entirely possible that I made a mistake.

Tested with cross to moxie-elf.  OK to commit?

-Nathan

	* config/moxie/moxie.h (INCOMING_RETURN_ADDR_RTX): Define.
	* config/moxie/moxie.c (TARGET_EXCEPT_UNWIND_INFO): Define.
diff mbox

Patch

Index: config/moxie/moxie.c
===================================================================
--- config/moxie/moxie.c	(revision 165145)
+++ config/moxie/moxie.c	(working copy)
@@ -570,6 +570,9 @@  moxie_trampoline_init (rtx m_tramp, tree
 #undef TARGET_OPTION_OVERRIDE
 #define TARGET_OPTION_OVERRIDE moxie_option_override
 
+#undef TARGET_EXCEPT_UNWIND_INFO
+#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 #include "gt-moxie.h"
Index: config/moxie/moxie.h
===================================================================
--- config/moxie/moxie.h	(revision 165145)
+++ config/moxie/moxie.h	(working copy)
@@ -303,6 +303,11 @@  enum reg_class
    pointer registers are already assumed to be used as needed.  */
 #define EPILOGUE_USES(R) (R == MOXIE_R5)
 
+#define INCOMING_RETURN_ADDR_RTX \
+  gen_rtx_MEM (SImode, gen_rtx_PLUS (SImode, \
+				     gen_rtx_REG (SImode, MOXIE_SP), \
+				     GEN_INT (4)))
+
 /* Storage Layout */
 
 #define BITS_BIG_ENDIAN 0