From patchwork Fri Oct 8 02:07:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 67128 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 7CA9CB6EEC for ; Fri, 8 Oct 2010 13:07:49 +1100 (EST) Received: (qmail 13813 invoked by alias); 8 Oct 2010 02:07:47 -0000 Received: (qmail 13738 invoked by uid 22791); 8 Oct 2010 02:07:46 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Oct 2010 02:07:40 +0000 Received: (qmail 23110 invoked from network); 8 Oct 2010 02:07:38 -0000 Received: from unknown (HELO codesourcery.com) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Oct 2010 02:07:38 -0000 Date: Thu, 7 Oct 2010 22:07:37 -0400 From: Nathan Froyd To: gcc-patches@gcc.gnu.org Cc: green@moxielogic.com Subject: [PATCH] fix moxie-elf build Message-ID: <20101008020736.GL17388@nightcrawler> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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