diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2016-11-18 09:49:06 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2016-11-18 09:49:06 +0000 |
commit | 3f06e55061d0d8f72dfd11f6c432c23f45d9b597 (patch) | |
tree | 6f63bbc6a1be5e476b4333ef45e16516cc272869 /gas/testsuite | |
parent | 6ec49e7c0aeb6d98e379319b565aee2c89388615 (diff) | |
download | gdb-3f06e55061d0d8f72dfd11f6c432c23f45d9b597.zip gdb-3f06e55061d0d8f72dfd11f6c432c23f45d9b597.tar.gz gdb-3f06e55061d0d8f72dfd11f6c432c23f45d9b597.tar.bz2 |
[AArch64] Add ARMv8.3 combined pointer authentication load instructions
Add support for ARMv8.3 LDRAA and LDRAB combined pointer authentication and
load instructions.
These instructions authenticate the base register and load 8 byte from it plus
a scaled 10-bit offset with optional writeback to update the base register.
A new instruction class (ldst_imm10) and operand type (AARCH64_OPND_ADDR_SIMM10)
were introduced to handle the special addressing form.
include/
2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com>
* opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_ADDR_SIMM10.
(enum aarch64_insn_class): Add ldst_imm10.
opcodes/
2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com>
* aarch64-tbl.h (QL_X1NIL): New.
(arch64_opcode_table): Add ldraa, ldrab.
(AARCH64_OPERANDS): Add "ADDR_SIMM10".
* aarch64-asm.h (aarch64_ins_addr_simm10): Declare.
* aarch64-asm.c (aarch64_ins_addr_simm10): Define.
* aarch64-dis.h (aarch64_ext_addr_simm10): Declare.
* aarch64-dis.c (aarch64_ext_addr_simm10): Define.
* aarch64-opc.h (enum aarch64_field_kind): Add FLD_S_simm10.
* aarch64-opc.c (fields): Add data for FLD_S_simm10.
(operand_general_constraint_met_p): Handle AARCH64_OPND_ADDR_SIMM10.
(aarch64_print_operand): Likewise.
* aarch64-asm-2.c: Regenerate.
* aarch64-dis-2.c: Regenerate.
* aarch64-opc-2.c: Regenerate.
gas/
2016-11-18 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_ADDR_SIMM10.
(fix_insn): Likewise.
(warn_unpredictable_ldst): Handle ldst_imm10.
* testsuite/gas/aarch64/pac.s: Add ldraa and ldrab tests.
* testsuite/gas/aarch64/pac.d: Likewise.
* testsuite/gas/aarch64/illegal-ldraa.s: New.
* testsuite/gas/aarch64/illegal-ldraa.l: New.
* testsuite/gas/aarch64/illegal-ldraa.d: New.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/gas/aarch64/illegal-ldraa.d | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/illegal-ldraa.l | 35 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/illegal-ldraa.s | 44 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/pac.d | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/aarch64/pac.s | 23 |
5 files changed, 126 insertions, 0 deletions
diff --git a/gas/testsuite/gas/aarch64/illegal-ldraa.d b/gas/testsuite/gas/aarch64/illegal-ldraa.d new file mode 100644 index 0000000..ab2dc30 --- /dev/null +++ b/gas/testsuite/gas/aarch64/illegal-ldraa.d @@ -0,0 +1,2 @@ +#as: -march=armv8.3-a -mno-verbose-error +#error-output: illegal-ldraa.l diff --git a/gas/testsuite/gas/aarch64/illegal-ldraa.l b/gas/testsuite/gas/aarch64/illegal-ldraa.l new file mode 100644 index 0000000..e3f81c5 --- /dev/null +++ b/gas/testsuite/gas/aarch64/illegal-ldraa.l @@ -0,0 +1,35 @@ +[^:]+: Assembler messages: +[^:]+:9: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#1\]' +[^:]+:10: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#4\]' +[^:]+:11: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#-10\]' +[^:]+:12: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#4096\]' +[^:]+:13: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#5555\]' +[^:]+:14: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#-4104\]' +[^:]+:15: Error: 64-bit integer or SP register expected at operand 2 -- `ldraa x0,\[xz\]' +[^:]+:16: Error: missing offset in the pre-indexed address at operand 2 -- `ldraa x0,\[x1\]!' +[^:]+:17: Error: invalid expression in the address at operand 2 -- `ldraa x0,\[sp\],' +[^:]+:18: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#1\]!' +[^:]+:19: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#4\]!' +[^:]+:20: Error: immediate value must be a multiple of 8 at operand 2 -- `ldraa x0,\[x1,#-10\]!' +[^:]+:21: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#4096\]!' +[^:]+:22: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#5555\]!' +[^:]+:23: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldraa x0,\[x1,#-4104\]!' +[^:]+:24: Error: 64-bit integer or SP register expected at operand 2 -- `ldraa x0,\[xz\]' +[^:]+:25: Error: invalid addressing mode at operand 2 -- `ldraa x0,\[x1\],#8' +[^:]+:28: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#1\]' +[^:]+:29: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#4\]' +[^:]+:30: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#-10\]' +[^:]+:31: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#4096\]' +[^:]+:32: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#5555\]' +[^:]+:33: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#-4104\]' +[^:]+:34: Error: 64-bit integer or SP register expected at operand 2 -- `ldrab x0,\[xz\]' +[^:]+:35: Error: missing offset in the pre-indexed address at operand 2 -- `ldrab x0,\[x1\]!' +[^:]+:36: Error: invalid expression in the address at operand 2 -- `ldrab x0,\[sp\],' +[^:]+:37: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#1\]!' +[^:]+:38: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#4\]!' +[^:]+:39: Error: immediate value must be a multiple of 8 at operand 2 -- `ldrab x0,\[x1,#-10\]!' +[^:]+:40: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#4096\]!' +[^:]+:41: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#5555\]!' +[^:]+:42: Error: immediate offset out of range -4096 to 4088 at operand 2 -- `ldrab x0,\[x1,#-4104\]!' +[^:]+:43: Error: 64-bit integer or SP register expected at operand 2 -- `ldrab x0,\[xz\]' +[^:]+:44: Error: invalid addressing mode at operand 2 -- `ldrab x0,\[x1\],#8' diff --git a/gas/testsuite/gas/aarch64/illegal-ldraa.s b/gas/testsuite/gas/aarch64/illegal-ldraa.s new file mode 100644 index 0000000..93a8cf5 --- /dev/null +++ b/gas/testsuite/gas/aarch64/illegal-ldraa.s @@ -0,0 +1,44 @@ +// Test illegal ARMv8.3 LDRAA and LDRAB instructions +.text + + // Good. + ldraa x0, [x1,#8] + ldrab x0, [x1,#8] + + + ldraa x0, [x1,#1] + ldraa x0, [x1,#4] + ldraa x0, [x1,#-10] + ldraa x0, [x1,#4096] + ldraa x0, [x1,#5555] + ldraa x0, [x1,#-4104] + ldraa x0, [xz] + ldraa x0, [x1]! + ldraa x0, [sp], + ldraa x0, [x1,#1]! + ldraa x0, [x1,#4]! + ldraa x0, [x1,#-10]! + ldraa x0, [x1,#4096]! + ldraa x0, [x1,#5555]! + ldraa x0, [x1,#-4104]! + ldraa x0, [xz] + ldraa x0, [x1], #8 + + + ldrab x0, [x1,#1] + ldrab x0, [x1,#4] + ldrab x0, [x1,#-10] + ldrab x0, [x1,#4096] + ldrab x0, [x1,#5555] + ldrab x0, [x1,#-4104] + ldrab x0, [xz] + ldrab x0, [x1]! + ldrab x0, [sp], + ldrab x0, [x1,#1]! + ldrab x0, [x1,#4]! + ldrab x0, [x1,#-10]! + ldrab x0, [x1,#4096]! + ldrab x0, [x1,#5555]! + ldrab x0, [x1,#-4104]! + ldrab x0, [xz] + ldrab x0, [x1], #8 diff --git a/gas/testsuite/gas/aarch64/pac.d b/gas/testsuite/gas/aarch64/pac.d index c242b2d..0028c44 100644 --- a/gas/testsuite/gas/aarch64/pac.d +++ b/gas/testsuite/gas/aarch64/pac.d @@ -50,3 +50,25 @@ Disassembly of section \.text: a4: d65f0fff retab a8: d69f0bff eretaa ac: d69f0fff eretab + b0: f8200441 ldraa x1, \[x2\] + b4: f8200441 ldraa x1, \[x2\] + b8: f87ff483 ldraa x3, \[x4, #-8\] + bc: f82014c5 ldraa x5, \[x6, #8\] + c0: f83ff507 ldraa x7, \[x8, #4088\] + c4: f8600528 ldraa x8, \[x9, #-4096\] + c8: f82007e2 ldraa x2, \[sp\] + cc: f87067e4 ldraa x4, \[sp, #-2000\] + d0: f8a00441 ldrab x1, \[x2\] + d4: f8a00441 ldrab x1, \[x2\] + d8: f8fff483 ldrab x3, \[x4, #-8\] + dc: f8a014c5 ldrab x5, \[x6, #8\] + e0: f8bff507 ldrab x7, \[x8, #4088\] + e4: f8e00528 ldrab x8, \[x9, #-4096\] + e8: f8a007e2 ldrab x2, \[sp\] + ec: f8f067e4 ldrab x4, \[sp, #-2000\] + f0: f8201c62 ldraa x2, \[x3, #8\]! + f4: f87ffca4 ldraa x4, \[x5, #-8\]! + f8: f83fffe6 ldraa x6, \[sp, #4088\]! + fc: f8a01c62 ldrab x2, \[x3, #8\]! + 100: f8fffca4 ldrab x4, \[x5, #-8\]! + 104: f8bfffe6 ldrab x6, \[sp, #4088\]! diff --git a/gas/testsuite/gas/aarch64/pac.s b/gas/testsuite/gas/aarch64/pac.s index 59fa637..01ba545 100644 --- a/gas/testsuite/gas/aarch64/pac.s +++ b/gas/testsuite/gas/aarch64/pac.s @@ -54,3 +54,26 @@ retab eretaa eretab + + ldraa x1, [x2] + ldraa x1, [x2,#0] + ldraa x3, [x4,#-8] + ldraa x5, [x6,#8] + ldraa x7, [x8,#4088] + ldraa x8, [x9,#-4096] + ldraa x2, [sp] + ldraa x4, [sp,#-2000] + ldrab x1, [x2] + ldrab x1, [x2,#0] + ldrab x3, [x4,#-8] + ldrab x5, [x6,#8] + ldrab x7, [x8,#4088] + ldrab x8, [x9,#-4096] + ldrab x2, [sp] + ldrab x4, [sp,#-2000] + ldraa x2, [x3, #8]! + ldraa x4, [x5, #-8]! + ldraa x6, [sp, #4088]! + ldrab x2, [x3, #8]! + ldrab x4, [x5, #-8]! + ldrab x6, [sp, #4088]! |