diff options
author | Nick Clifton <nickc@redhat.com> | 2021-01-08 11:51:50 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2021-01-08 11:51:50 +0000 |
commit | e84c871648606f29f7d35084ab8afc3b522affc3 (patch) | |
tree | 90e2f5e816d9e038ec9b5e8f561f20297b360a4c /opcodes/aarch64-dis.c | |
parent | fb932b57cbf99d01145cb4b5c0c64da9157c7f73 (diff) | |
download | gdb-e84c871648606f29f7d35084ab8afc3b522affc3.zip gdb-e84c871648606f29f7d35084ab8afc3b522affc3.tar.gz gdb-e84c871648606f29f7d35084ab8afc3b522affc3.tar.bz2 |
Fix places in the AArch64 opcodes library code where a call to assert() has side effects.
PR 27129
* aarch64-dis.c (determine_disassembling_preference): Move call to
aarch64_match_operands_constraint outside of the assertion.
* aarch64-asm.c (aarch64_ins_limm_1): Remove call to assert.
Replace with a return of FALSE.
Diffstat (limited to 'opcodes/aarch64-dis.c')
-rw-r--r-- | opcodes/aarch64-dis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index da1c96d..19482f7 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -2729,8 +2729,10 @@ determine_disassembling_preference (struct aarch64_inst *inst, successfully converted to the form of ALIAS. */ if (convert_to_alias (©, alias) == 1) { + int res; aarch64_replace_opcode (©, alias); - assert (aarch64_match_operands_constraint (©, NULL)); + res = aarch64_match_operands_constraint (©, NULL); + assert (res == 1); DEBUG_TRACE ("succeed with %s via conversion", alias->name); memcpy (inst, ©, sizeof (aarch64_inst)); return; |