From patchwork Tue Aug 10 17:05:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 61401 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 1CCE9B6F07 for ; Wed, 11 Aug 2010 03:05:59 +1000 (EST) Received: (qmail 8559 invoked by alias); 10 Aug 2010 17:05:56 -0000 Received: (qmail 8463 invoked by uid 22791); 10 Aug 2010 17:05:55 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_MV, 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, 10 Aug 2010 17:05:46 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7AH5iP2010676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 10 Aug 2010 13:05:44 -0400 Received: from greed.delorie.com ([10.3.112.16]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7AH5gMT019350 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Aug 2010 13:05:43 -0400 Received: from greed.delorie.com (greed.delorie.com [127.0.0.1] (may be forged)) by greed.delorie.com (8.14.3/8.14.3) with ESMTP id o7AH5fYD011339 for ; Tue, 10 Aug 2010 13:05:41 -0400 Received: (from dj@localhost) by greed.delorie.com (8.14.3/8.14.3/Submit) id o7AH5fsp011336; Tue, 10 Aug 2010 13:05:41 -0400 Date: Tue, 10 Aug 2010 13:05:41 -0400 Message-Id: <201008101705.o7AH5fsp011336@greed.delorie.com> From: DJ Delorie To: gcc-patches@gcc.gnu.org Subject: [patch] rx: fix builtin mvtipl 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 Ok? * config/rx/rx.md (mvtipl): Make it volatile. * config/rx/rx.c (rx_expand_builtin_mvtipl): Pass integer, not rtx, to IN_RANGE. Index: rx.md =================================================================== --- rx.md (revision 163042) +++ rx.md (working copy) @@ -1845,13 +1845,13 @@ ;; the possibility of this instruction being placed in between ;; them. ) ;; Move to interrupt priority level (define_insn "mvtipl" - [(unspec:SI [(match_operand:SI 0 "immediate_operand" "Uint04")] + [(unspec_volatile:SI [(match_operand:SI 0 "immediate_operand" "Uint04")] UNSPEC_BUILTIN_MVTIPL)] "" "mvtipl\t%0" [(set_attr "length" "3")] ) Index: rx.c =================================================================== --- rx.c (revision 163042) +++ rx.c (working copy) @@ -1893,13 +1893,13 @@ static rtx rx_expand_builtin_mvtipl (rtx arg) { /* The RX610 does not support the MVTIPL instruction. */ if (rx_cpu_type == RX610) return NULL_RTX; - if (! CONST_INT_P (arg) || ! IN_RANGE (arg, 0, (1 << 4) - 1)) + if (! CONST_INT_P (arg) || ! IN_RANGE (INTVAL (arg), 0, (1 << 4) - 1)) return NULL_RTX; emit_insn (gen_mvtipl (arg)); return NULL_RTX; }