* rtl.h (UINTVAL) New.
* config/rs6000/rs6000.c (SMALL_INT) Use it. * testsuite/gcc.dg/20060801-1.c: New. From-SVN: r115855
This commit is contained in:
parent
6193b8b7ed
commit
4fbbe6941c
4 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -18105,7 +18105,7 @@ machopic_output_stub (FILE *file, const char *symb, const char *stub)
|
|||
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,
|
||||
|
|
|
@ -996,6 +996,7 @@ enum label_kind
|
|||
|
||||
/* 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
|
||||
|
|
9
gcc/testsuite/gcc.dg/20060801-1.c
Normal file
9
gcc/testsuite/gcc.dg/20060801-1.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* { dg-do compile { target { lp64 } } */
|
||||
/* { dg-options "-fPIC" } */
|
||||
char *ptr = 0;
|
||||
char array[100];
|
||||
void
|
||||
f()
|
||||
{
|
||||
ptr = &array[0x100000000ULL]; /* A 33-bit constant. */
|
||||
}
|
Loading…
Add table
Reference in a new issue