From patchwork Mon Jan 10 20:31:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 78220 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 46532B7104 for ; Tue, 11 Jan 2011 07:35:42 +1100 (EST) Received: (qmail 21099 invoked by alias); 10 Jan 2011 20:33:20 -0000 Received: (qmail 20938 invoked by uid 22791); 10 Jan 2011 20:33:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from a.mail.sonic.net (HELO a.mail.sonic.net) (64.142.16.245) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Jan 2011 20:33:09 +0000 Received: from are.twiddle.net (are.twiddle.net [75.101.38.216]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id p0AKX71o016143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Jan 2011 12:33:08 -0800 Received: from anchor.twiddle.home (anchor.twiddle.home [172.31.0.4]) by are.twiddle.net (8.14.4/8.14.4) with ESMTP id p0AKX63X006817; Mon, 10 Jan 2011 12:33:06 -0800 Received: from anchor.twiddle.home (localhost.localdomain [127.0.0.1]) by anchor.twiddle.home (8.14.4/8.14.4) with ESMTP id p0AKWxPo019753; Mon, 10 Jan 2011 12:32:59 -0800 Received: (from rth@localhost) by anchor.twiddle.home (8.14.4/8.14.4/Submit) id p0AKWw2v019752; Mon, 10 Jan 2011 12:32:58 -0800 From: Richard Henderson To: gcc-patches@gcc.gnu.org Cc: nickc@redhat.com, law@redhat.com, Richard Henderson Subject: [PATCH 26/28] mn10300: Auto-clobber the flags in asms. Date: Mon, 10 Jan 2011 12:31:55 -0800 Message-Id: <1294691517-19580-27-git-send-email-rth@redhat.com> In-Reply-To: <1294691517-19580-1-git-send-email-rth@redhat.com> References: <1294691517-19580-1-git-send-email-rth@redhat.com> 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 From: Richard Henderson --- gcc/config/mn10300/mn10300.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index 17e58fe..25bfa0d 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -2909,6 +2909,21 @@ mn10300_split_and_operand_count (rtx op) return -count; } } + + +/* Worker function for TARGET_MD_ASM_CLOBBERS. + We do this in the mn10300 backend to maintain source compatibility + with the old cc0-based compiler. */ + +static tree +mn10300_md_asm_clobbers (tree outputs ATTRIBUTE_UNUSED, + tree inputs ATTRIBUTE_UNUSED, + tree clobbers) +{ + clobbers = tree_cons (NULL_TREE, build_string (5, "EPSW"), + clobbers); + return clobbers; +} /* Initialize the GCC target structure. */ @@ -3005,4 +3020,7 @@ mn10300_split_and_operand_count (rtx op) #undef TARGET_CONDITIONAL_REGISTER_USAGE #define TARGET_CONDITIONAL_REGISTER_USAGE mn10300_conditional_register_usage +#undef TARGET_MD_ASM_CLOBBERS +#define TARGET_MD_ASM_CLOBBERS mn10300_md_asm_clobbers + struct gcc_target targetm = TARGET_INITIALIZER;