gcc/testsuite/gcc.target/riscv/fsflags.c
raw| 1 | /* Verify that fsflags is using the correct register or immediate. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-require-effective-target hard_float } */ |
| 4 | /* { dg-options "-O" } */ |
| 5 | |
| 6 | void foo1 (int a) |
| 7 | { |
| 8 | __builtin_riscv_fsflags(a); |
| 9 | } |
| 10 | void foo2 () |
| 11 | { |
| 12 | __builtin_riscv_fsflags(4); |
| 13 | } |
| 14 | |
| 15 | /* { dg-final { scan-assembler-times "fsflags\t" 1 } } */ |
| 16 | /* { dg-final { scan-assembler-times "fsflagsi\t" 1 } } */ |