This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] rx: fix builtin mvtipl


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]