x86: implements fxch instruction.

This commit is contained in:
Nilay Vaish 2014-01-27 18:50:52 -06:00
parent 4eb3b1ed0b
commit 5be0b846b1
2 changed files with 25 additions and 4 deletions

View file

@ -59,7 +59,7 @@ format WarnUnimpl {
default: Inst::FLD(Md);
}
0x1: decode MODRM_MOD {
0x3: fxch();
0x3: Inst::FXCH(Eq);
default: Inst::UD2();
}
0x2: decode MODRM_MOD {
@ -240,8 +240,14 @@ format WarnUnimpl {
0x3: Inst::UD2();
default: fisttp();
}
0x2: Inst::FST(Eq);
0x2: decode MODRM_MOD {
0x3: Inst::FST(Eq);
default: Inst::FST(Mq);
}
0x3: decode MODRM_MOD {
0x3: Inst::FSTP(Eq);
default: Inst::FSTP(Mq);
}
0x4: decode MODRM_MOD {
0x3: fucom();
default: frstor();

View file

@ -36,5 +36,20 @@
# Authors: Gabe Black
microcode = '''
# FXCH
def macroop FXCH_R
{
movfp ufp1, sti
movfp sti, st(0)
movfp st(0), ufp1
};
def macroop FXCH_M
{
fault "new UnimpInstFault"
};
def macroop FXCH_P
{
fault "new UnimpInstFault"
};
'''