mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-07-24 10:25:42 -04:00
Fix the handling of the \313 code.
\313 indicates a fixed 64-bit address size. It was incorrectly documented and incorrectly implemented in the assembler, and was unimplemented in the disassembler.
This commit is contained in:
parent
021993cf64
commit
ce2b397f1e
@ -52,13 +52,13 @@
|
|||||||
* \310 - indicates fixed 16-bit address size, i.e. optional 0x67.
|
* \310 - indicates fixed 16-bit address size, i.e. optional 0x67.
|
||||||
* \311 - indicates fixed 32-bit address size, i.e. optional 0x67.
|
* \311 - indicates fixed 32-bit address size, i.e. optional 0x67.
|
||||||
* \312 - (disassembler only) marker on LOOP, LOOPxx instructions.
|
* \312 - (disassembler only) marker on LOOP, LOOPxx instructions.
|
||||||
* \313 - indicates fixed 64-bit address size, no REX required.
|
* \313 - indicates fixed 64-bit address size, 0x67 invalid.
|
||||||
* \320 - indicates fixed 16-bit operand size, i.e. optional 0x66.
|
* \320 - indicates fixed 16-bit operand size, i.e. optional 0x66.
|
||||||
* \321 - indicates fixed 32-bit operand size, i.e. optional 0x66.
|
* \321 - indicates fixed 32-bit operand size, i.e. optional 0x66.
|
||||||
* \322 - indicates that this instruction is only valid when the
|
* \322 - indicates that this instruction is only valid when the
|
||||||
* operand size is the default (instruction to disassembler,
|
* operand size is the default (instruction to disassembler,
|
||||||
* generates no code in the assembler)
|
* generates no code in the assembler)
|
||||||
* \323 - indicates fixed 64-bit operand size, REX on extensions, only.
|
* \323 - indicates fixed 64-bit operand size, REX on extensions only.
|
||||||
* \324 - indicates 64-bit operand size requiring REX prefix.
|
* \324 - indicates 64-bit operand size requiring REX prefix.
|
||||||
* \330 - a literal byte follows in the code stream, to be added
|
* \330 - a literal byte follows in the code stream, to be added
|
||||||
* to the condition code value of the instruction.
|
* to the condition code value of the instruction.
|
||||||
@ -837,7 +837,6 @@ static int32_t calcsize(int32_t segment, int32_t offset, int bits,
|
|||||||
case 0312:
|
case 0312:
|
||||||
break;
|
break;
|
||||||
case 0313:
|
case 0313:
|
||||||
length -= 1;
|
|
||||||
break;
|
break;
|
||||||
case 0320:
|
case 0320:
|
||||||
length += (bits != 16);
|
length += (bits != 16);
|
||||||
|
5
disasm.c
5
disasm.c
@ -505,6 +505,11 @@ static int matches(struct itemplate *t, uint8_t *data, int asize,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
else
|
||||||
a_used = TRUE;
|
a_used = TRUE;
|
||||||
|
} else if (c == 0313) {
|
||||||
|
if (asize != 64)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
a_used = TRUE;
|
||||||
} else if (c == 0320) {
|
} else if (c == 0320) {
|
||||||
if (osize != 16)
|
if (osize != 16)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user