mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-21 03:14:19 +08:00
Fix offset computation in the presence of explicit prefixes.
This commit is contained in:
parent
a3cacd74f5
commit
3198beee7d
@ -356,7 +356,6 @@ long assemble (long segment, long offset, int bits, unsigned long cp,
|
||||
if (insn_size < 0) /* shouldn't be, on pass two */
|
||||
error (ERR_PANIC, "errors made it through from pass one");
|
||||
else while (itimes--) {
|
||||
insn_end = offset + insn_size;
|
||||
for (j=0; j<instruction->nprefix; j++) {
|
||||
unsigned char c=0;
|
||||
switch (instruction->prefixes[j]) {
|
||||
@ -402,6 +401,7 @@ long assemble (long segment, long offset, int bits, unsigned long cp,
|
||||
offset++;
|
||||
}
|
||||
}
|
||||
insn_end = offset + insn_size;
|
||||
gencode (segment, offset, bits, instruction, codes, insn_end);
|
||||
offset += insn_size;
|
||||
if (itimes > 0 && itimes == instruction->times-1) {
|
||||
|
Loading…
Reference in New Issue
Block a user