* gcc.dg/const-elim-1.c: Remove xfail for xtensa-*-*.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020103-1.c
blob3082247fb0d11d93768affb6b9a2d01a148b7424
1 /* Verify that constant equivalences get reloaded properly, either by being
2 spilled to the stack, or regenerated, but not dropped to memory. */
3 /* { dg-do compile { target i?86-*-* powerpc-*-* rs6000-*-* alpha*-*-* x86_64-*-*} } */
4 /* { dg-options "-O2 -fpic -fno-omit-frame-pointer -fno-asynchronous-unwind-tables" } */
5 /* { dg-final { scan-assembler-not "LC" } } */
7 /* Clobber all call-saved registers that can hold a pointer value. */
8 #if defined(__i386__)
9 #define clobber \
10 asm volatile("#asm" : : : "si", "di")
11 #elif defined(__powerpc__) || defined(__PPC__) || defined(__ppc__) || defined(__POWERPC__) || defined(PPC) || defined (_IBMR2)
12 #define clobber \
13 asm volatile("#asm" : : : "14", "15", "16", "17", "18", "19", "20", \
14 "21", "22", "23", "24", "25", "26", "27", "28", "29")
15 #elif defined(__alpha__)
16 #define clobber \
17 asm volatile("#asm" : : : "$9", "$10", "$11", "$12", "$13", "$14", \
18 "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8", "$f9")
19 #elif defined(__x86_64__)
20 #define clobber \
21 asm volatile("#asm" : : : "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11")
22 #else
23 #error no clobber macro defined
24 #endif
26 extern void f1(int, int, int);
27 extern void f2(int*, int*, int*);
29 extern int ext;
30 static int loc_small;
31 static int loc_big[100];
33 void bar(void)
35 f1(ext, loc_small, loc_big[0]);
36 clobber;
37 f2(&ext, &loc_small, &loc_big[0]);