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:
H. Peter Anvin 2007-05-30 22:21:11 +00:00
parent 021993cf64
commit ce2b397f1e
2 changed files with 7 additions and 3 deletions

View File

@ -52,13 +52,13 @@
* \310 - indicates fixed 16-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.
* \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.
* \321 - indicates fixed 32-bit operand size, i.e. optional 0x66.
* \322 - indicates that this instruction is only valid when the
* operand size is the default (instruction to disassembler,
* 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.
* \330 - a literal byte follows in the code stream, to be added
* 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:
break;
case 0313:
length -= 1;
break;
case 0320:
length += (bits != 16);

View File

@ -505,6 +505,11 @@ static int matches(struct itemplate *t, uint8_t *data, int asize,
return FALSE;
else
a_used = TRUE;
} else if (c == 0313) {
if (asize != 64)
return FALSE;
else
a_used = TRUE;
} else if (c == 0320) {
if (osize != 16)
return FALSE;