* config/rs6000/rs6000.c (SMALL_INT) Use it.
* testsuite/gcc.dg/
20060801-1.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115855
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-08-01 Stuart Hastings <stuart@apple.com>
+
+ * rtl.h (UINTVAL) New.
+ * config/rs6000/rs6000.c (SMALL_INT) Use it.
+ * testsuite/gcc.dg/20060801-1.c: New.
+
2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
PR debug/23336
position-independent addresses go into a reg. This is REG if non
zero, otherwise we allocate register(s) as necessary. */
-#define SMALL_INT(X) ((unsigned) (INTVAL (X) + 0x8000) < 0x10000)
+#define SMALL_INT(X) ((UINTVAL (X) + 0x8000) < 0x10000)
rtx
rs6000_machopic_legitimize_pic_address (rtx orig, enum machine_mode mode,
/* For a CONST_INT rtx, INTVAL extracts the integer. */
#define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
+#define UINTVAL(RTX) ((unsigned HOST_WIDE_INT) INTVAL (RTX))
/* For a CONST_DOUBLE:
For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
--- /dev/null
+/* { dg-do compile { target { lp64 } } */
+/* { dg-options "-fPIC" } */
+char *ptr = 0;
+char array[100];
+void
+f()
+{
+ ptr = &array[0x100000000ULL]; /* A 33-bit constant. */
+}