From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17159 invoked by alias); 12 Apr 2011 11:33:02 -0000 Received: (qmail 17136 invoked by uid 22791); 12 Apr 2011 11:33:01 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 12 Apr 2011 11:32:51 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3CBWo7P014890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 12 Apr 2011 07:32:50 -0400 Received: from Gift.redhat.com (vpn1-5-27.ams2.redhat.com [10.36.5.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3CBWmoA018290 for ; Tue, 12 Apr 2011 07:32:49 -0400 From: Nick Clifton To: gcc-patches@gcc.gnu.org Subject: Commit: V850: Fix generation of callt helper functions for interrupt handlers Date: Tue, 12 Apr 2011 11:33:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00854.txt.bz2 Hi Guys, I am applying the patch below to the 4.6 branch and mainline sources. It fixes a problem with the V850 backend where it would generate a CALLT instruction for a V850 variant which does not support it, when gcc was compiling an interrupt handler. Cheers Nick gcc/ChangeLog 2011-04-12 Nick Clifton * config/v850/v850.c (expand_prologue): Do not use the CALLT instruction for interrupt handlers if the target is the basic V850 architecture. (expand_epilogue): Likewise. Index: gcc/config/v850/v850.c =================================================================== --- gcc/config/v850/v850.c (revision 172300) +++ gcc/config/v850/v850.c (working copy) @@ -1686,7 +1686,7 @@ /* Save/setup global registers for interrupt functions right now. */ if (interrupt_handler) { - if (! TARGET_DISABLE_CALLT) + if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL)) emit_insn (gen_callt_save_interrupt ()); else emit_insn (gen_save_interrupt ()); @@ -1768,7 +1768,7 @@ /* Special case interrupt functions that save all registers for a call. */ if (interrupt_handler && ((1L << LINK_POINTER_REGNUM) & reg_saved) != 0) { - if (! TARGET_DISABLE_CALLT) + if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL)) emit_insn (gen_callt_save_all_interrupt ()); else emit_insn (gen_save_all_interrupt ()); @@ -2019,7 +2019,7 @@ /* And return or use reti for interrupt handlers. */ if (interrupt_handler) { - if (! TARGET_DISABLE_CALLT) + if (! TARGET_DISABLE_CALLT && (TARGET_V850E || TARGET_V850E2_ALL)) emit_insn (gen_callt_return_interrupt ()); else emit_jump_insn (gen_return_interrupt ());