diff options
author | Jan Beulich <jbeulich@suse.com> | 2023-03-31 08:21:56 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2023-03-31 08:21:56 +0200 |
commit | e3bf0aade2db023594211b463a156515559fe55f (patch) | |
tree | efc8815de2635610c7971a88d485b138f665a60c /gas/config | |
parent | f7377a91b5183977d0702280d4aad90e1829e154 (diff) | |
download | gdb-e3bf0aade2db023594211b463a156515559fe55f.zip gdb-e3bf0aade2db023594211b463a156515559fe55f.tar.gz gdb-e3bf0aade2db023594211b463a156515559fe55f.tar.bz2 |
x86: allow for multiple immediates in output_disp()
.insn isn't going to have a constraint of only a single immediate when,
in particular, RIP-relative addressing is used.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-i386.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index fe59bf3..c8e68d5 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10050,13 +10050,13 @@ output_disp (fragS *insn_start_frag, offsetT insn_start_off) if (operand_type_check (i.types[n1], imm)) { /* Only one immediate is allowed for PC - relative address. */ - gas_assert (sz == 0); - sz = imm_size (n1); - i.op[n].disps->X_add_number -= sz; + relative address, except with .insn. */ + gas_assert (sz == 0 || dot_insn ()); + sz += imm_size (n1); } - /* We should find the immediate. */ + /* We should find at least one immediate. */ gas_assert (sz != 0); + i.op[n].disps->X_add_number -= sz; } p = frag_more (size); |