From patchwork Fri Oct 8 02:07:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fix moxie-elf build Date: Thu, 07 Oct 2010 16:07:37 -0000 From: Nathan Froyd X-Patchwork-Id: 67128 Message-Id: <20101008020736.GL17388@nightcrawler> To: gcc-patches@gcc.gnu.org Cc: green@moxielogic.com 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. 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