diff options
Diffstat (limited to 'gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s')
-rw-r--r-- | gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s b/gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s new file mode 100644 index 0000000..7464fa9 --- /dev/null +++ b/gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s @@ -0,0 +1,25 @@ +# Testcase that triggers a diagnostic for unreachable code for +# the block of code after label .L2. This also serves as a testcase +# for cfg creation, as the said code block should not have been +# included in the CFG (and hence the warning). + .type foo, %function +foo: + .cfi_startproc + ldr w1, [x0] + cmp w1, 8 + stp x19, x20, [sp, 16] + .cfi_offset 19, 16 + .cfi_offset 20, 24 + b .L1 +.L2: + mov w0, w1 + ret +.L1: + mov w0, w1 + ldp x19, x20, [sp, 16] + .cfi_restore 19 + .cfi_restore 20 + .cfi_def_cfa_offset 0 + ret + .cfi_endproc + .size foo, .-foo |