mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-10 11:10:03 +08:00
predicates.md ("shift_count_operand", [...]): Reject operands containing eliminable registers.
2005-08-26 Andreas Krebbel <krebbel1@de.ibm.com> * config/s390/predicates.md ("shift_count_operand", "setmem_operand"): Reject operands containing eliminable registers. * testsuite/gcc.dg/20050825-1.c: New testcase. From-SVN: r103515
This commit is contained in:
parent
4e0d0e3367
commit
db21e1d01a
@ -1,3 +1,9 @@
|
||||
2005-08-26 Andreas Krebbel <krebbel1@de.ibm.com>
|
||||
|
||||
* config/s390/predicates.md ("shift_count_operand", "setmem_operand"):
|
||||
Reject operands containing eliminable registers.
|
||||
* testsuite/gcc.dg/20050825-1.c: New testcase.
|
||||
|
||||
2005-08-24 Paolo Bonzini <bonzini@gnu.org>
|
||||
Jan Hubicka <jh@suse.cz>
|
||||
|
||||
|
@ -107,6 +107,10 @@
|
||||
if (op && GET_CODE (op) != REG)
|
||||
return false;
|
||||
|
||||
if (op && REGNO (op) < FIRST_PSEUDO_REGISTER
|
||||
&& !GENERAL_REGNO_P (REGNO (op)))
|
||||
return false;
|
||||
|
||||
/* Unfortunately we have to reject constants that are invalid
|
||||
for an address, or else reload will get confused. */
|
||||
if (!DISP_IN_RANGE (offset))
|
||||
@ -147,6 +151,10 @@
|
||||
if (op && GET_CODE (op) != REG)
|
||||
return false;
|
||||
|
||||
if (op && REGNO (op) < FIRST_PSEUDO_REGISTER
|
||||
&& !GENERAL_REGNO_P (REGNO (op)))
|
||||
return false;
|
||||
|
||||
/* Unfortunately we have to reject constants that are invalid
|
||||
for an address, or else reload will get confused. */
|
||||
if (!DISP_IN_RANGE (offset))
|
||||
|
30
gcc/testsuite/gcc.dg/20050824-1.c
Normal file
30
gcc/testsuite/gcc.dg/20050824-1.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* Make sure that the S/390 specific shift_count_operand
|
||||
predicate work properly. */
|
||||
|
||||
/* { dg-do compile { target s390*-*-* } } */
|
||||
/* { dg-options "-O3" } */
|
||||
|
||||
unsigned long long
|
||||
f (unsigned long long a, unsigned long b)
|
||||
{
|
||||
asm ("" : : : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
|
||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14");
|
||||
|
||||
return a << ((b + 3) & 63);
|
||||
}
|
||||
|
||||
unsigned long long
|
||||
g (unsigned long long a, char **b , int c, int d, int e, int f)
|
||||
{
|
||||
char buffer [4096];
|
||||
|
||||
*b = &buffer[0];
|
||||
|
||||
return a << ((unsigned long)&f & 63);
|
||||
}
|
||||
|
||||
unsigned long long
|
||||
h (unsigned long long a, int b, int c, int d, int e, int f)
|
||||
{
|
||||
return a << (((unsigned long)&f + 3));
|
||||
}
|
Loading…
Reference in New Issue
Block a user