diff options
author | Andrea Corallo <andrea.corallo@arm.com> | 2021-05-18 11:28:17 +0200 |
---|---|---|
committer | Andrea Corallo <andrea.corallo@arm.com> | 2021-07-26 14:18:24 +0200 |
commit | f1e1d7f305e9c6f76297863ac454b09ceee5e4be (patch) | |
tree | 25bf12a3bb98ce36bbe8ece0e90b8c83e801e93a /gas/testsuite | |
parent | 3751264cdd187e355af867198f5b70b36846a1a8 (diff) | |
download | binutils-gdb-f1e1d7f305e9c6f76297863ac454b09ceee5e4be.tar.gz |
PATCH [2/10] arm: add 'pacbti' instruction for Armv8.1-M pacbti extension
gas/
2021-06-11 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c
(enum operand_parse_code): Add OP_SP and OP_R12.
(parse_operands): Add switch cases for OP_SP and OP_R12.
(T16_32_TAB): Add '_pacbti'.
(do_t_pacbti): New function.
(insns): Add 'pacbti'.
* testsuite/gas/arm/armv8_1-m-pacbti-bad.d: New file.
* testsuite/gas/arm/armv8_1-m-pacbti-bad.l: Likewise.
* testsuite/gas/arm/armv8_1-m-pacbti-bad.s: Likewise.
* testsuite/gas/arm/armv8_1-m-pacbti.d: Add 'pacbti' to testcase.
* testsuite/gas/arm/armv8_1-m-pacbti.s: Likewise.
opcodes/
2021-06-11 Andrea Corallo <andrea.corallo@arm.com>
* arm-dis.c (thumb32_opcodes): Add 'pacbti' instruction.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l | 4 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti.d | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti.s | 1 |
5 files changed, 19 insertions, 0 deletions
diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.d b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.d new file mode 100644 index 00000000000..77638ee3f62 --- /dev/null +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.d @@ -0,0 +1,5 @@ +#name: Invalid Armv8.1-M pointer authentication and branch target identification extention +#skip: *-*-pe +#source: armv8_1-m-pacbti-bad.s +#as: -march=armv8.1-m.main +#error_output: armv8_1-m-pacbti-bad.l diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l new file mode 100644 index 00000000000..a812603d88d --- /dev/null +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l @@ -0,0 +1,4 @@ +.*: Assembler messages: +.*:6: Error: operand must be r12 -- `pacbti r11,lr,sp' +.*:7: Error: operand must be LR register -- `pacbti r12,r10,sp' +.*:8: Error: operand must be SP register -- `pacbti r12,lr,r10' diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s new file mode 100644 index 00000000000..64e71e70c11 --- /dev/null +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s @@ -0,0 +1,8 @@ + .syntax unified + .text + .thumb +.Lstart: + bti + pacbti r11, lr, sp + pacbti r12, r10, sp + pacbti r12, lr, r10 diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti.d b/gas/testsuite/gas/arm/armv8_1-m-pacbti.d index 3c693728468..593ac34ed49 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.d +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.d @@ -7,4 +7,5 @@ Disassembly of section .text: 0[0-9a-f]+ <[^>]+> f3af 800f bti +0[0-9a-f]+ <[^>]+> f3af 800d pacbti r12, lr, sp #... diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti.s b/gas/testsuite/gas/arm/armv8_1-m-pacbti.s index 38929e3dd02..39db4542e39 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.s +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.s @@ -3,3 +3,4 @@ .thumb .Lstart: bti + pacbti r12, lr, sp |