OSDN Git Service

* gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
[pf3gnuchains/gcc-fork.git] / gcc / emit-rtl.c
index d4ba5d7..e0acc0c 100644 (file)
@@ -518,6 +518,27 @@ const_fixed_from_fixed_value (FIXED_VALUE_TYPE value, enum machine_mode mode)
   return lookup_const_fixed (fixed);
 }
 
+/* Constructs double_int from rtx CST.  */
+
+double_int
+rtx_to_double_int (const_rtx cst)
+{
+  double_int r;
+
+  if (CONST_INT_P (cst))
+      r = shwi_to_double_int (INTVAL (cst));
+  else if (CONST_DOUBLE_P (cst) && GET_MODE (cst) == VOIDmode)
+    {
+      r.low = CONST_DOUBLE_LOW (cst);
+      r.high = CONST_DOUBLE_HIGH (cst);
+    }
+  else
+    gcc_unreachable ();
+  
+  return r;
+}
+
+
 /* Return a CONST_DOUBLE or CONST_INT for a value specified as
    a double_int.  */