| 1 |
/* Like call-1.c, but for n32. We cannot use sibling calls for tail and tail2 |
| 2 |
in this case (PR target/57260). */ |
| 3 |
/* { dg-options "-mmicromips -mrelax-pic-calls -mshared -foptimize-sibling-calls -mabi=n32" } */ |
| 4 |
/* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */ |
| 5 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,normal\n1:\tjalrs?\t" } } */ |
| 6 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,normal2\n1:\tjalrs?\t" } } */ |
| 7 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,staticfunc\n1:\tjalrs?\t" } } */ |
| 8 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,tail\n1:\tjalrs?\t" } } */ |
| 9 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,tail2\n1:\tjalrs?\t" } } */ |
| 10 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,tail3\n1:\tjrc?\t" } } */ |
| 11 |
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MICROMIPS_JALR,tail4\n1:\tjrc?\t" } } */ |
| 12 |
|
| 13 |
__attribute__ ((noinline)) static void staticfunc () { asm (""); } |
| 14 |
int normal (); |
| 15 |
void normal2 (); |
| 16 |
|
| 17 |
int |
| 18 |
NOMIPS16 f (int *p) |
| 19 |
{ |
| 20 |
*p = normal (); |
| 21 |
normal2 (); |
| 22 |
staticfunc (); |
| 23 |
return 1; |
| 24 |
} |
| 25 |
|
| 26 |
int tail (); |
| 27 |
|
| 28 |
int |
| 29 |
NOMIPS16 h () |
| 30 |
{ |
| 31 |
return tail (); |
| 32 |
} |
| 33 |
|
| 34 |
void tail2 (); |
| 35 |
|
| 36 |
NOMIPS16 void g () |
| 37 |
{ |
| 38 |
tail2 (); |
| 39 |
} |
| 40 |
|
| 41 |
__attribute__ ((visibility ("hidden"))) void tail3 (); |
| 42 |
|
| 43 |
NOMIPS16 void j () |
| 44 |
{ |
| 45 |
tail3 (); |
| 46 |
} |
| 47 |
|
| 48 |
__attribute__ ((noinline)) static void tail4 () { asm (""); } |
| 49 |
|
| 50 |
NOMIPS16 void k () |
| 51 |
{ |
| 52 |
tail4 (); |
| 53 |
} |