| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3 -mno-pc-relative-literal-loads" } */ |
| 3 |
/* { dg-skip-if "Tiny model won't generate adrp" { *-*-* } { "-mcmodel=tiny" } { "" } } */ |
| 4 |
|
| 5 |
double d0(void) |
| 6 |
{ |
| 7 |
double x = 0.0d; |
| 8 |
return x; |
| 9 |
} |
| 10 |
|
| 11 |
double dn1(void) |
| 12 |
{ |
| 13 |
double x = -0.0d; |
| 14 |
return x; |
| 15 |
} |
| 16 |
|
| 17 |
|
| 18 |
double d1(void) |
| 19 |
{ |
| 20 |
double x = 1.5d; |
| 21 |
return x; |
| 22 |
} |
| 23 |
|
| 24 |
double d2(void) |
| 25 |
{ |
| 26 |
double x = 123256.0d; |
| 27 |
return x; |
| 28 |
} |
| 29 |
|
| 30 |
double d3(void) |
| 31 |
{ |
| 32 |
double x = 123256123456.0d; |
| 33 |
return x; |
| 34 |
} |
| 35 |
|
| 36 |
double d4(void) |
| 37 |
{ |
| 38 |
double x = 123456123456123456.0d; |
| 39 |
return x; |
| 40 |
} |
| 41 |
|
| 42 |
/* { dg-final { scan-assembler-times "movi\td\[0-9\]+, #?0" 1 } } */ |
| 43 |
|
| 44 |
/* { dg-final { scan-assembler-times "adrp\tx\[0-9\]+, \.LC\[0-9\]" 2 } } */ |
| 45 |
/* { dg-final { scan-assembler-times "ldr\td\[0-9\]+, \\\[x\[0-9\], #:lo12:\.LC\[0-9\]\\\]" 2 } } */ |
| 46 |
|
| 47 |
/* { dg-final { scan-assembler-times "fmov\td\[0-9\]+, 1\\\.5e\\\+0" 1 } } */ |
| 48 |
|
| 49 |
/* { dg-final { scan-assembler-times "mov\tx\[0-9\]+, 25838523252736" 1 } } */ |
| 50 |
/* { dg-final { scan-assembler-times "movk\tx\[0-9\]+, 0x40fe, lsl 48" 1 } } */ |
| 51 |
/* { dg-final { scan-assembler-times "mov\tx\[0-9\]+, -9223372036854775808" 0 { xfail *-*-* } } } */ |
| 52 |
/* { dg-final { scan-assembler-times {movi\tv[0-9]+.4s, #?0} 1 { xfail *-*-* } } } */ |
| 53 |
/* { dg-final { scan-assembler-times {fneg\tv[0-9]+.2d, v[0-9]+.2d} 1 { xfail *-*-* } } } */ |
| 54 |
/* { dg-final { scan-assembler-times "fmov\td\[0-9\]+, x\[0-9\]+" 1 { xfail *-*-* } } } */ |
| 55 |
|