diff options
author | Andrea Corallo <andrea.corallo@arm.com> | 2021-05-19 09:51:40 +0200 |
---|---|---|
committer | Andrea Corallo <andrea.corallo@arm.com> | 2021-07-26 14:18:24 +0200 |
commit | ce537a7db788ab002aa50750d456999bc45ff485 (patch) | |
tree | a49873c80324dc2ff7392b21c94efdea0a1e5acc /gas | |
parent | e43ca2cbaea6dcffa5e1c8ca052da36642336857 (diff) | |
download | gdb-ce537a7db788ab002aa50750d456999bc45ff485.zip gdb-ce537a7db788ab002aa50750d456999bc45ff485.tar.gz gdb-ce537a7db788ab002aa50750d456999bc45ff485.tar.bz2 |
PATCH [4/10] arm: add 'pac' instruction for Armv8.1-M pacbti extension
gas/
2021-06-11 Andrea Corallo <andrea.corallo@arm.com>
* config/tc-arm.c (T16_32_TAB): Add '_pac'.
(insns): Add 'pac' insn.
* testsuite/gas/arm/armv8_1-m-pacbti-bad.l: Add pac tests.
* testsuite/gas/arm/armv8_1-m-pacbti-bad.s: Likewise.
* testsuite/gas/arm/armv8_1-m-pacbti.d: Likewise.
* 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 'pac'.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/config/tc-arm.c | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l | 3 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s | 3 | ||||
-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, 10 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index b5d2335..6ef0cd9 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -11506,6 +11506,7 @@ encode_thumb32_addr_mode (int i, bool is_t, bool is_d) X(_negs, 4240, f1d00000), /* rsbs #0 */ \ X(_orr, 4300, ea400000), \ X(_orrs, 4300, ea500000), \ + X(_pac, 0000, f3af801d), \ X(_pacbti, 0000, f3af800d), \ X(_pop, bc00, e8bd0000), /* ldmia sp!,... */ \ X(_push, b400, e92d0000), /* stmdb sp!,... */ \ @@ -26329,6 +26330,7 @@ static const struct asm_opcode insns[] = #define THUMB_VARIANT & arm_ext_v8_1m_main toU("aut", _aut, 3, (R12, LR, SP), t_pacbti), ToU("bti", f3af800f, 0, (), noargs), + toU("pac", _pac, 3, (R12, LR, SP), t_pacbti), toU("pacbti", _pacbti, 3, (R12, LR, SP), t_pacbti), toU("cinc", _cinc, 3, (RRnpcsp, RR_ZR, COND), t_cond), toU("cinv", _cinv, 3, (RRnpcsp, RR_ZR, COND), t_cond), diff --git a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l index 317e62f..f6f0d41 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.l @@ -5,3 +5,6 @@ .*:9: Error: operand must be r12 -- `aut r11,lr,sp' .*:10: Error: operand must be LR register -- `aut r12,r10,sp' .*:11: Error: operand must be SP register -- `aut r12,lr,r10' +.*:12: Error: operand must be r12 -- `pac r11,lr,sp' +.*:13: Error: operand must be LR register -- `pac r12,r10,sp' +.*:14: Error: operand must be SP register -- `pac 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 index c2ad204..4948f85 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti-bad.s @@ -9,3 +9,6 @@ aut r11, lr, sp aut r12, r10, sp aut r12, lr, r10 + pac r11, lr, sp + pac r12, r10, sp + pac 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 fe11d7e..9df123a 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.d +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.d @@ -9,4 +9,5 @@ Disassembly of section .text: 0[0-9a-f]+ <[^>]+> f3af 800f bti 0[0-9a-f]+ <[^>]+> f3af 800d pacbti r12, lr, sp 0[0-9a-f]+ <[^>]+> f3af 802d aut r12, lr, sp +0[0-9a-f]+ <[^>]+> f3af 801d pac 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 14b0414..38000c3 100644 --- a/gas/testsuite/gas/arm/armv8_1-m-pacbti.s +++ b/gas/testsuite/gas/arm/armv8_1-m-pacbti.s @@ -5,3 +5,4 @@ bti pacbti r12, lr, sp aut r12, lr, sp + pac r12, lr, sp |