Implement some FS opcodes used in windows dlls
@@ -74,7 +74,7 @@ int Run(x86emu_t *emu, int step)
&&_0x48, &&_0x49, &&_0x4A, &&_0x4B, &&_0x4C, &&_0x4D, &&_0x4E, &&_0x4F,
&&_0x50, &&_0x51, &&_0x52, &&_0x53, &&_0x54, &&_0x55, &&_0x56, &&_0x57,
&&_0x58, &&_0x59, &&_0x5A, &&_0x5B, &&_0x5C, &&_0x5D, &&_0x5E, &&_0x5F,
- &&_0x60, &&_0x61, &&_default, &&_default, &&_default, &&_0x65, &&_0x66, &&_0x67,
+ &&_0x60, &&_0x61, &&_default, &&_default, &&_0x64, &&_0x65, &&_0x66, &&_0x67,
&&_0x68, &&_0x69, &&_0x6A, &&_0x6B, &&_0x6C, &&_0x6D, &&_default, &&_default, //0x68-0x6F
&&_0x70_0, &&_0x70_1, &&_0x70_2, &&_0x70_3, &&_0x70_4, &&_0x70_5, &&_0x70_6, &&_0x70_7, //0x70-0x77
&&_0x70_8, &&_0x70_9, &&_0x70_A, &&_0x70_B, &&_0x70_C, &&_0x70_D, &&_0x70_E, &&_0x70_F, //0x78-0x7F
@@ -395,7 +395,25 @@ _trace:
R_ECX = Pop(emu);
R_EAX = Pop(emu);
NEXT;
+ _0x64: /* FS: */
+ switch(F8)
+ {
+ case 0xA1:
+ tmp32s = F32S;
+ R_EAX = *(uint32_t*)((emu->segs[_FS]) + tmp32s);
+ break;
+ case 0x89:
+ nextop = F8;
+ GET_ED_OFFS(emu->segs[_FS]);
+ ED->dword[0] = GD.dword[0];
+ break;
+ default:
+ UnimpOpcode(emu);
+ }
+
+ if(emu->quit) goto fini;
+ NEXT;
_0x65: /* GS: */
emu->old_ip = old_ip;
R_EIP = ip;
