Skip to content

Commit

Permalink
x86: allow for multiple immediates in output_disp()
Browse files Browse the repository at this point in the history
.insn isn't going to have a constraint of only a single immediate when,
in particular, RIP-relative addressing is used.
  • Loading branch information
jbeulich authored and ouuleilei-bot committed Mar 7, 2023
1 parent a2e0395 commit 59a330f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions gas/config/tc-i386.c
Original file line number Diff line number Diff line change
Expand Up @@ -10065,13 +10065,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);
Expand Down

0 comments on commit 59a330f

Please sign in to comment.