mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
aarch64: Don't assert on long sysreg names
This patch fixes an assertion failure on long system register operands in the AArch64 backend. See the new testcase for an input which reproduces the issue. gas/ChangeLog: * config/tc-aarch64.c (parse_sys_reg): Don't assert when parsing a long system register. (parse_sys_ins_reg): Likewise. (sysreg_hash_insert): New. (md_begin): Use sysreg_hash_insert() to ensure all system registers are no longer than the maximum length at startup. * testsuite/gas/aarch64/invalid-sysreg-assert.d: New test. * testsuite/gas/aarch64/invalid-sysreg-assert.l: Error output. * testsuite/gas/aarch64/invalid-sysreg-assert.s: Input. include/ChangeLog: * opcode/aarch64.h (AARCH64_MAX_SYSREG_NAME_LEN): New.
This commit is contained in:
@ -943,6 +943,8 @@ extern const struct aarch64_name_value_pair aarch64_barrier_options [16];
|
||||
extern const struct aarch64_name_value_pair aarch64_prfops [32];
|
||||
extern const struct aarch64_name_value_pair aarch64_hint_options [];
|
||||
|
||||
#define AARCH64_MAX_SYSREG_NAME_LEN 32
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char * name;
|
||||
|
Reference in New Issue
Block a user