mirror of
https://github.com/ptitSeb/box64.git
synced 2025-05-09 00:21:32 +08:00
[INTERP] Fex fixes and small cosmetic changes to some partial (V)MOV opcodes
This commit is contained in:
parent
5cfad22165
commit
223de50ec9
@ -228,16 +228,18 @@ uintptr_t Run0F(x64emu_t *emu, rex_t rex, uintptr_t addr, int *step)
|
||||
nextop = F8;
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
if(MODREG) /* MOVHLPS Gx,Ex */
|
||||
if(MODREG) /* MOVHLPS Gx, Ex */
|
||||
GX->q[0] = EX->q[1];
|
||||
else
|
||||
GX->q[0] = EX->q[0]; /* MOVLPS Gx,Ex */
|
||||
GX->q[0] = EX->q[0]; /* MOVLPS Gx, Ex */
|
||||
break;
|
||||
case 0x13: /* MOVLPS Ex,Gx */
|
||||
case 0x13: /* MOVLPS Ex, Gx */
|
||||
nextop = F8;
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
EX->q[0] = GX->q[0];
|
||||
if(!MODREG) {
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
EX->q[0] = GX->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x14: /* UNPCKLPS Gx, Ex */
|
||||
nextop = F8;
|
||||
|
@ -137,15 +137,19 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr)
|
||||
break;
|
||||
case 0x12: /* MOVLPD Gx, Eq */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GX->q[0] = ED->q[0];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GX->q[0] = ED->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x13: /* MOVLPD Eq, Gx */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[0];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x14: /* UNPCKLPD Gx, Ex */
|
||||
nextop = F8;
|
||||
@ -162,15 +166,19 @@ uintptr_t Run660F(x64emu_t *emu, rex_t rex, uintptr_t addr)
|
||||
break;
|
||||
case 0x16: /* MOVHPD Gx, Ed */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GX->q[1] = ED->q[0];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GX->q[1] = ED->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x17: /* MOVHPD Ed, Gx */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[1];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[1];
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x18:
|
||||
|
@ -105,9 +105,11 @@ uintptr_t RunAVX_0F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
break;
|
||||
case 0x13: /* VMOVLPS Ex, Gx */
|
||||
nextop = F8;
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
EX->q[0] = GX->q[0];
|
||||
if(!MODREG) {
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
EX->q[0] = GX->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x14: /* VUNPCKLPS Gx, Vx, Ex */
|
||||
nextop = F8;
|
||||
@ -155,7 +157,7 @@ uintptr_t RunAVX_0F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
if(MODREG) { /* VMOVLHPS Gx, Vx, Ex */
|
||||
GX->q[1] = EX->q[0];
|
||||
} else {
|
||||
GX->q[1] = EX->q[0]; /* MOVHPS Gx,Ex */
|
||||
GX->q[1] = EX->q[0]; /* VMOVHPS Gx, Vx, Ex */
|
||||
}
|
||||
GX->q[0] = VX->q[0];
|
||||
GY->u128 = 0;
|
||||
@ -165,6 +167,10 @@ uintptr_t RunAVX_0F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
EX->q[0] = GX->q[1];
|
||||
if(MODREG) {
|
||||
GETEY;
|
||||
EY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x28: /* VMOVAPS Gx, Ex */
|
||||
|
@ -61,7 +61,7 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
|
||||
switch(opcode) {
|
||||
|
||||
case 0x10: /* MOVUPD Gx, Ex */
|
||||
case 0x10: /* VMOVUPD Gx, Ex */
|
||||
nextop = F8;
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
@ -73,7 +73,7 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
} else
|
||||
GY->u128 = 0;
|
||||
break;
|
||||
case 0x11: /* MOVUPD Ex, Gx */
|
||||
case 0x11: /* VMOVUPD Ex, Gx */
|
||||
nextop = F8;
|
||||
GETEX(0);
|
||||
GETGX;
|
||||
@ -82,23 +82,30 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
GETEY;
|
||||
GETGY;
|
||||
memcpy(EY, GY, 16); // unaligned...
|
||||
} else if(MODREG) {
|
||||
GETEY;
|
||||
EY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
case 0x12: /* VMOVLPD Gx, Vx, Eq */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GETVX;
|
||||
GETGY;
|
||||
GX->q[0] = ED->q[0];
|
||||
GX->q[1] = VX->q[1];
|
||||
GY->u128 = 0;
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GETVX;
|
||||
GETGY;
|
||||
GX->q[0] = ED->q[0];
|
||||
GX->q[1] = VX->q[1];
|
||||
GY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
case 0x13: /* VMOVLPD Eq, Gx */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[0];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[0];
|
||||
}
|
||||
break;
|
||||
case 0x14: /* VUNPCKLPD Gx, Vx, Ex */
|
||||
nextop = F8;
|
||||
@ -128,19 +135,23 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
break;
|
||||
case 0x16: /* VMOVHPD Gx, Vx, Ed */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GETVX;
|
||||
GX->q[1] = ED->q[0];
|
||||
GX->q[0] = VX->q[0];
|
||||
GETGY;
|
||||
GY->u128 = 0;
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
GETVX;
|
||||
GX->q[1] = ED->q[0];
|
||||
GX->q[0] = VX->q[0];
|
||||
GETGY;
|
||||
GY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
case 0x17: /* VMOVHPD Ed, Gx */
|
||||
nextop = F8;
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[1];
|
||||
if(!MODREG) {
|
||||
GETE8(0);
|
||||
GETGX;
|
||||
ED->q[0] = GX->q[1];
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x28: /* VMOVAPD Gx, Ex */
|
||||
@ -833,7 +844,7 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
GETEY;
|
||||
GY->q[0] = EY->q[0];
|
||||
GY->q[1] = EY->q[1];
|
||||
} else
|
||||
} else
|
||||
GY->u128 = 0;
|
||||
break;
|
||||
case 0x70: /* VPSHUFD Gx,Ex,Ib */
|
||||
@ -1196,7 +1207,10 @@ uintptr_t RunAVX_660F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
GETEY;
|
||||
EY->q[0] = GY->q[0];
|
||||
EY->q[1] = GY->q[1];
|
||||
} // no upper raz?
|
||||
} else if(MODREG) {
|
||||
GETEY;
|
||||
EY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xC2: /* VCMPPD Gx, Vx, Ex, Ib */
|
||||
|
@ -432,7 +432,10 @@ uintptr_t RunAVX_F30F(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step)
|
||||
GETGY;
|
||||
GETEY;
|
||||
memcpy(EY, GY, 16);
|
||||
} // no ymm raz here it seems
|
||||
} else if(MODREG) {
|
||||
GETEY;
|
||||
EY->u128 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case 0xC2: /* VCMPSS Gx, Vx, Ex, Ib */
|
||||
|
Loading…
x
Reference in New Issue
Block a user