X86: Make the 0xA0-0xA3 versions of mov use the right sized immediates.

--HG--
extra : convert_revision : a702403de29772618abb5bd5c5555279d91bdd59
This commit is contained in:
Gabe Black
2007-12-02 00:02:51 -08:00
parent 4c37f828f1
commit 5de71e39d8
2 changed files with 6 additions and 3 deletions

View File

@@ -60,12 +60,12 @@ microcode = '''
#
def macroop MOV_R_MI {
limm t1, imm
limm t1, imm, dataSize=asz
ld reg, seg, [1, t0, t1]
};
def macroop MOV_MI_R {
limm t1, imm
limm t1, imm, dataSize=asz
st reg, seg, [1, t0, t1]
};

View File

@@ -270,7 +270,10 @@ namespace X86ISA
//Figure out how big of an immediate we'll retreive based
//on the opcode.
int immType = ImmediateType[emi.opcode.num - 1][nextByte];
immediateSize = SizeTypeToSize[logOpSize - 1][immType];
if (emi.opcode.num == 1 && nextByte >= 0xA0 && nextByte <= 0xA3)
immediateSize = SizeTypeToSize[logAddrSize - 1][immType];
else
immediateSize = SizeTypeToSize[logOpSize - 1][immType];
//Determine what to expect next
if (UsesModRM[emi.opcode.num - 1][nextByte]) {