diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run66.c | 7 | ||||
| -rw-r--r-- | src/emu/x64run660f.c | 18 | ||||
| -rw-r--r-- | src/emu/x64runf20f.c | 15 | ||||
| -rw-r--r-- | src/emu/x64runf30f.c | 15 |
4 files changed, 54 insertions, 1 deletions
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c index cfc10831..0eefff20 100644 --- a/src/emu/x64run66.c +++ b/src/emu/x64run66.c @@ -326,6 +326,13 @@ int Run66(x64emu_t *emu, rex_t rex, int rep) } break; + case 0xA9: /* TEST AX,Iw */ + if(rex.w) + test64(emu, R_RAX, F32S64); + else + test16(emu, R_AX, F16); + break; + case 0xAB: /* (REP) STOSW */ if(rex.w) tmp8s = ACCESS_FLAG(F_DF)?-8:+8; diff --git a/src/emu/x64run660f.c b/src/emu/x64run660f.c index 132fc7d7..b2e21c32 100644 --- a/src/emu/x64run660f.c +++ b/src/emu/x64run660f.c @@ -33,6 +33,7 @@ int Run660F(x64emu_t *emu, rex_t rex) uint8_t tmp8u; int8_t tmp8s; uint16_t tmp16u; + int32_t tmp32s; uint64_t tmp64u; reg64_t *oped, *opgd; sse_regs_t *opex, *opgx, eax1; @@ -861,7 +862,22 @@ int Run660F(x64emu_t *emu, rex_t rex) else {tmp8u=EX->ub[0]; for (int i=0; i<2; ++i) GX->q[i] >>= tmp8u;} break; - + case 0xD4: /* PADDQ Gx,Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->sq[0] += EX->sq[0]; + GX->sq[1] += EX->sq[1]; + break; + case 0xD5: /* PMULLW Gx,Ex */ + nextop = F8; + GETEX(0); + GETGX; + for(int i=0; i<8; ++i) { + tmp32s = (int32_t)GX->sw[i] * EX->sw[i]; + GX->sw[i] = tmp32s&0xffff; + } + break; case 0xD6: /* MOVQ Ex,Gx */ nextop = F8; GETEX(0); diff --git a/src/emu/x64runf20f.c b/src/emu/x64runf20f.c index bc8b79de..7b8238a8 100644 --- a/src/emu/x64runf20f.c +++ b/src/emu/x64runf20f.c @@ -186,6 +186,21 @@ int RunF20F(x64emu_t *emu, rex_t rex) } break; + case 0x7C: /* HADDPS Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->f[0] += GX->f[1]; + GX->f[1] = GX->f[2] + GX->f[3]; + if(EX==GX) { + GX->f[2] = GX->f[0]; + GX->f[3] = GX->f[1]; + } else { + GX->f[2] = EX->f[0] + EX->f[1]; + GX->f[3] = EX->f[2] + EX->f[3]; + } + break; + GOCOND(0x80 , tmp32s = F32S; CHECK_FLAGS(emu); , R_RIP += tmp32s; diff --git a/src/emu/x64runf30f.c b/src/emu/x64runf30f.c index c49ef46b..9b25e73a 100644 --- a/src/emu/x64runf30f.c +++ b/src/emu/x64runf30f.c @@ -57,6 +57,21 @@ int RunF30F(x64emu_t *emu, rex_t rex) GETGX; EX->ud[0] = GX->ud[0]; break; + case 0x12: /* MOVSLDUP Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->ud[1] = GX->ud[0] = EX->ud[0]; + GX->ud[3] = GX->ud[2] = EX->ud[2]; + break; + + case 0x16: /* MOVSHDUP Gx, Ex */ + nextop = F8; + GETEX(0); + GETGX; + GX->ud[1] = GX->ud[0] = EX->ud[1]; + GX->ud[3] = GX->ud[2] = EX->ud[3]; + break; case 0x2A: /* CVTSI2SS Gx, Ed */ nextop = F8; |