diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-06 12:53:29 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-06 12:53:29 +0100 |
| commit | 43f9b853fed95044a0e75102cce3e5d94dbabec2 (patch) | |
| tree | a98e397052f0cf90daf4c47d2f9e9d0e975e27c3 /src | |
| parent | 6bcc967138d15985c3f25c617e856bcc3a77472f (diff) | |
| download | box64-43f9b853fed95044a0e75102cce3e5d94dbabec2.tar.gz box64-43f9b853fed95044a0e75102cce3e5d94dbabec2.zip | |
Added 66 81/83 opcodes
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64run66.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/emu/x64run66.c b/src/emu/x64run66.c index b83b7c28..2ad8590b 100644 --- a/src/emu/x64run66.c +++ b/src/emu/x64run66.c @@ -31,7 +31,8 @@ int Run66(x64emu_t *emu, rex_t rex) uint8_t opcode; uint8_t nextop; uint8_t tmp8u; - int32_t tmp32s; + int16_t tmp16s; + uint16_t tmp16u; reg64_t *oped, *opgd; opcode = F8; @@ -47,6 +48,29 @@ int Run66(x64emu_t *emu, rex_t rex) case 0x0F: /* more opcdes */ return Run660F(emu, rex); + case 0x81: /* GRP3 Ew,Iw */ + case 0x83: /* GRP3 Ew,Ib */ + nextop = F8; + GETEW; + GETGW; + if(opcode==0x81) + tmp16u = F16; + else { + tmp16s = F8S; + tmp16u = (uint16_t)tmp16s; + } + switch((nextop>>3)&7) { + case 0: EW->word[0] = add16(emu, EW->word[0], tmp16u); break; + case 1: EW->word[0] = or16(emu, EW->word[0], tmp16u); break; + case 2: EW->word[0] = adc16(emu, EW->word[0], tmp16u); break; + case 3: EW->word[0] = sbb16(emu, EW->word[0], tmp16u); break; + case 4: EW->word[0] = and16(emu, EW->word[0], tmp16u); break; + case 5: EW->word[0] = sub16(emu, EW->word[0], tmp16u); break; + case 6: EW->word[0] = xor16(emu, EW->word[0], tmp16u); break; + case 7: cmp16(emu, EW->word[0], tmp16u); break; + } + break; + case 0x89: /* MOV Ew,Gw */ nextop = F8; GETEW; |