X86: Implement the XLAT instruction.

--HG--
extra : convert_revision : 22d7d9e79e722293b4dc1e66d8610301dc04c5fa
This commit is contained in:
Gabe Black 2007-10-18 22:41:18 -07:00
parent c526b00b35
commit 46bd1c99a9
2 changed files with 10 additions and 6 deletions

View file

@ -463,7 +463,7 @@
0x0: UD2();
default: WarnUnimpl::salc();
}
0x7: WarnUnimpl::xlat();
0x7: XLAT();
}
##include "x87.isa"
0x1C: decode OPCODE_OP_BOTTOM3 {

View file

@ -53,8 +53,12 @@
#
# Authors: Gabe Black
microcode = ""
#let {{
# class XLAT(Inst):
# "GenFault ${new UnimpInstFault}"
#}};
microcode = '''
def macroop XLAT {
zext t1, rax, 8
# Here, t1 can be used directly. The value of al is supposed to be treated
# as unsigned. Since we zero extended it from 8 bits above and the address
# size has to be at least 16 bits, t1 will not be sign extended.
ld rax, seg, [1, rbx, t1], dataSize=1
};
'''