diff mbox

rx: fix builtin mvtipl

Message ID 201008101705.o7AH5fsp011336@greed.delorie.com
State New
Headers show

Commit Message

DJ Delorie Aug. 10, 2010, 5:05 p.m. UTC
Ok?

	* config/rx/rx.md (mvtipl): Make it volatile.
	* config/rx/rx.c (rx_expand_builtin_mvtipl): Pass integer, not
	rtx, to IN_RANGE.
diff mbox

Patch

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;
 }