8b1c5fd025
* config/sparc/sparc.md (adddi3): If operands[2] is 4096 and operands[1] is constant, calculate the sum and generate movdi. (addsi3): Similarly. Use SImode in call to arith_4096_operand. (subsi3): Use SImode in call to arith_4096_operand. * gcc.c-torture/execute/20001031-1.c: New test. From-SVN: r37274
38 lines
414 B
C
38 lines
414 B
C
extern void abort (void);
|
|
extern void exit (int);
|
|
|
|
void t1 (int x)
|
|
{
|
|
if (x != 4100)
|
|
abort ();
|
|
}
|
|
|
|
int t2 (void)
|
|
{
|
|
int i;
|
|
t1 ((i = 4096) + 4);
|
|
return i;
|
|
}
|
|
|
|
void t3 (long long x)
|
|
{
|
|
if (x != 0x80000fffULL)
|
|
abort ();
|
|
}
|
|
|
|
long long t4 (void)
|
|
{
|
|
long long i;
|
|
t3 ((i = 4096) + 0x7fffffffULL);
|
|
return i;
|
|
}
|
|
|
|
main ()
|
|
{
|
|
if (t2 () != 4096)
|
|
abort ();
|
|
if (t4 () != 4096)
|
|
abort ();
|
|
exit (0);
|
|
}
|