From patchwork Tue Aug 10 17:05:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: rx: fix builtin mvtipl Date: Tue, 10 Aug 2010 07:05:41 -0000 From: DJ Delorie X-Patchwork-Id: 61401 Message-Id: <201008101705.o7AH5fsp011336@greed.delorie.com> To: 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; }