diff options
author | Alex Coplan <alex.coplan@arm.com> | 2020-09-08 14:21:44 +0100 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2020-09-08 14:21:44 +0100 |
commit | 38cf07a6c0bae61ffba00054eb2e025a3910d93c (patch) | |
tree | 75a79a84fe501e5219678206e063b29f15655030 /gas/config/tc-aarch64.c | |
parent | 03fb3142c71fde91531ca39f33413bdf50a8dfb3 (diff) | |
download | gdb-38cf07a6c0bae61ffba00054eb2e025a3910d93c.zip gdb-38cf07a6c0bae61ffba00054eb2e025a3910d93c.tar.gz gdb-38cf07a6c0bae61ffba00054eb2e025a3910d93c.tar.bz2 |
aarch64: Add support for Armv8-R system registers
This patch adds support for the system registers introduced in Armv8-R
AArch64.
gas/ChangeLog:
2020-09-08 Alex Coplan <alex.coplan@arm.com>
* config/tc-aarch64.c (parse_sys_reg): Also pass sysreg name to
validation function.
(parse_sys_ins_reg): Likewise.
(print_operands): Pass CPU features to aarch64_print_operand().
* testsuite/gas/aarch64/v8-r-bad-sysregs.d: New test.
* testsuite/gas/aarch64/v8-r-bad-sysregs.l: Error output.
* testsuite/gas/aarch64/v8-r-bad-sysregs.s: Input.
* testsuite/gas/aarch64/v8-r-sysregs-need-arch.d: New test.
* testsuite/gas/aarch64/v8-r-sysregs-need-arch.l: Error output.
* testsuite/gas/aarch64/v8-r-sysregs.d: New test.
* testsuite/gas/aarch64/v8-r-sysregs.s: Input for previous two tests.
include/ChangeLog:
2020-09-08 Alex Coplan <alex.coplan@arm.com>
* opcode/aarch64.h (aarch64_sys_ins_reg_supported_p): Also take
system register name in order to simplify validation for v8-R.
(aarch64_print_operand): Also take CPU feature set, as disassembly for
system registers now depends on arch variant.
opcodes/ChangeLog:
2020-09-08 Alex Coplan <alex.coplan@arm.com>
* aarch64-dis.c (print_operands): Pass CPU features to
aarch64_print_operand().
* aarch64-opc.c (aarch64_print_operand): Use CPU features to determine
preferred disassembly of system registers.
(SR_RNG): Refactor to use new SR_FEAT2 macro.
(SR_FEAT2): New.
(SR_V8_1_A): New.
(SR_V8_4_A): New.
(SR_V8_A): New.
(SR_V8_R): New.
(SR_EXPAND_ELx): New.
(SR_EXPAND_EL12): New.
(aarch64_sys_regs): Specify which registers are only on
A-profile, add R-profile system registers.
(ENC_BARLAR): New.
(PRBARn_ELx): New.
(PRLARn_ELx): New.
(aarch64_sys_ins_reg_supported_p): Reject EL3 registers for
Armv8-R AArch64.
Diffstat (limited to 'gas/config/tc-aarch64.c')
-rw-r--r-- | gas/config/tc-aarch64.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index effa976..b2a1683 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -4141,8 +4141,8 @@ parse_sys_reg (char **str, htab_t sys_regs, as_bad (_("selected processor does not support PSTATE field " "name '%s'"), buf); if (!pstatefield_p - && !aarch64_sys_ins_reg_supported_p (cpu_variant, o->value, - o->flags, o->features)) + && !aarch64_sys_ins_reg_supported_p (cpu_variant, o->name, + o->value, o->flags, o->features)) as_bad (_("selected processor does not support system register " "name '%s'"), buf); if (aarch64_sys_reg_deprecated_p (o->flags)) @@ -4183,7 +4183,8 @@ parse_sys_ins_reg (char **str, htab_t sys_ins_regs) if (!o) return NULL; - if (!aarch64_sys_ins_reg_supported_p (cpu_variant, o->value, o->flags, 0)) + if (!aarch64_sys_ins_reg_supported_p (cpu_variant, + o->name, o->value, o->flags, 0)) as_bad (_("selected processor does not support system register " "name '%s'"), buf); if (aarch64_sys_reg_deprecated_p (o->flags)) @@ -4715,7 +4716,7 @@ print_operands (char *buf, const aarch64_opcode *opcode, /* Generate the operand string in STR. */ aarch64_print_operand (str, sizeof (str), 0, opcode, opnds, i, NULL, NULL, - NULL); + NULL, cpu_variant); /* Delimiter. */ if (str[0] != '\0') |