aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorSrinath Parvathaneni <srinath.parvathaneni@arm.com>2022-11-14 15:13:17 +0000
committerSrinath Parvathaneni <srinath.parvathaneni@arm.com>2022-11-14 15:13:21 +0000
commit9b1c7dc3a041b6d37f9c80b46778c98c157b393f (patch)
tree5534b49d5f85618281eb00d2633b0fcf443ce35a /gas/testsuite
parentb62fb887c69a482e0d4e7b9f7ded7384f8c4e584 (diff)
downloadgdb-9b1c7dc3a041b6d37f9c80b46778c98c157b393f.zip
gdb-9b1c7dc3a041b6d37f9c80b46778c98c157b393f.tar.gz
gdb-9b1c7dc3a041b6d37f9c80b46778c98c157b393f.tar.bz2
[gas] arm: Add support for new unwinder directive ".pacspval".
This patch adds the assembler support for the new unwinder directive ".pacspval" and encodes this directives with opcode "0xb5". This opcode indicates the unwinder to use effective vsp as modifier for PAC validation. gas/ChangeLog: 2022-11-07 Srinath Parvathaneni <srinath.parvathaneni@arm.com> * doc/c-arm.texi: Document directive. * config/tc-arm.c (s_arm_unwind_pacspval): Define function. (md_pseudo_table): Add entry for pacspval directive. * testsuite/gas/arm/ehabi-pacbti-m.d: New test. * testsuite/gas/arm/ehabi-pacbti-m.s: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/arm/ehabi-pacbti-m.d15
-rw-r--r--gas/testsuite/gas/arm/ehabi-pacbti-m.s38
2 files changed, 53 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arm/ehabi-pacbti-m.d b/gas/testsuite/gas/arm/ehabi-pacbti-m.d
new file mode 100644
index 0000000..6039945
--- /dev/null
+++ b/gas/testsuite/gas/arm/ehabi-pacbti-m.d
@@ -0,0 +1,15 @@
+# name: Unwind Stack Frame information for Armv8.1-M.Mainline PAC extension
+# source: ehabi-pacbti-m.s
+# as: -march=armv8.1-m.main+mve+pacbti
+# readelf: -u
+
+Unwind section '.ARM.exidx' at offset 0x5c contains 1 entry:
+
+0x0: @0x0
+ Compact model index: 1
+ 0xb1 0x08 pop {r3}
+ 0x80 0x08 pop {r7}
+ 0xb4 pop {ra_auth_code}
+ 0x84 0x00 pop {r14}
+ 0xb1 0x0f pop {r0, r1, r2, r3}
+ 0xb5 vsp as modifier for PAC validation
diff --git a/gas/testsuite/gas/arm/ehabi-pacbti-m.s b/gas/testsuite/gas/arm/ehabi-pacbti-m.s
new file mode 100644
index 0000000..1018548
--- /dev/null
+++ b/gas/testsuite/gas/arm/ehabi-pacbti-m.s
@@ -0,0 +1,38 @@
+ .syntax unified
+ .thumb
+ .thumb_func
+ .fnstart
+ .cfi_startproc
+ .pacspval
+ pac ip, lr, sp
+ .cfi_register 143, 12
+ push {r0, r1, r2, r3}
+ .save {r0, r1, r2, r3}
+ .cfi_def_cfa_offset 16
+ .cfi_offset 0, -16
+ .cfi_offset 1, -12
+ .cfi_offset 2, -8
+ .cfi_offset 3, -4
+ push {r3, r7, ip, lr}
+ .save {r3, r7, ra_auth_code, lr}
+ .cfi_def_cfa_offset 32
+ .cfi_offset 3, -32
+ .cfi_offset 7, -28
+ .cfi_offset 143, -24
+ .cfi_offset 14, -20
+ pop {r3, r7, ip, lr}
+ .cfi_restore 14
+ .cfi_restore 143
+ .cfi_restore 7
+ .cfi_restore 3
+ .cfi_def_cfa_offset 0
+ add sp, sp, #16
+ .cfi_restore 3
+ .cfi_restore 2
+ .cfi_restore 1
+ .cfi_restore 0
+ .cfi_def_cfa_offset -16
+ aut ip, lr, sp
+ bx lr
+ .cfi_endproc
+ .fnend