mirror of
https://github.com/ptitSeb/box64.git
synced 2025-02-19 14:04:13 +00:00
Added 66 64 8B opcode
This commit is contained in:
parent
5edc83c556
commit
7309be6339
@ -113,6 +113,7 @@ set(ELFLOADER_SRC
|
||||
"${BOX64_ROOT}/src/emu/x64run64.c"
|
||||
"${BOX64_ROOT}/src/emu/x64run66.c"
|
||||
"${BOX64_ROOT}/src/emu/x64run660f.c"
|
||||
"${BOX64_ROOT}/src/emu/x64run6664.c"
|
||||
"${BOX64_ROOT}/src/emu/x64rund8.c"
|
||||
"${BOX64_ROOT}/src/emu/x64rund9.c"
|
||||
"${BOX64_ROOT}/src/emu/x64rundb.c"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define GETEB_OFFS(D, O) oped=GetEbO(emu, rex, nextop, D, O)
|
||||
#define GETGB opgd=GetGb(emu, rex, nextop)
|
||||
#define GETEW(D) oped=GetEw(emu, rex, nextop, D)
|
||||
#define GETEW_OFFS(D, O) oped=GetEdO(emu, rex, nextop, D, O)
|
||||
#define GETGW opgd=GetGw(emu, rex, nextop)
|
||||
#define GETEX(D) opex=GetEx(emu, rex, nextop, D)
|
||||
#define GETGX opgx=GetGx(emu, rex, nextop)
|
||||
|
@ -100,6 +100,9 @@ int Run66(x64emu_t *emu, rex_t rex)
|
||||
case 0x0F: /* more opcdes */
|
||||
return Run660F(emu, rex);
|
||||
|
||||
case 0x64: /* FS: */
|
||||
return Run6664(emu, rex);
|
||||
|
||||
case 0x81: /* GRP3 Ew,Iw */
|
||||
case 0x83: /* GRP3 Ew,Ib */
|
||||
nextop = F8;
|
||||
|
60
src/emu/x64run6664.c
Normal file
60
src/emu/x64run6664.c
Normal file
@ -0,0 +1,60 @@
|
||||
#define _GNU_SOURCE
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "box64stack.h"
|
||||
#include "x64emu.h"
|
||||
#include "x64run.h"
|
||||
#include "x64emu_private.h"
|
||||
#include "x64run_private.h"
|
||||
#include "x64primop.h"
|
||||
#include "x64trace.h"
|
||||
#include "x87emu_private.h"
|
||||
#include "box64context.h"
|
||||
#include "bridge.h"
|
||||
//#include "signals.h"
|
||||
#ifdef DYNAREC
|
||||
#include "../dynarec/arm_lock_helper.h"
|
||||
#endif
|
||||
|
||||
#include "modrm.h"
|
||||
|
||||
int Run6664(x64emu_t *emu, rex_t rex)
|
||||
{
|
||||
uint8_t opcode;
|
||||
uint8_t nextop;
|
||||
reg64_t *oped, *opgd;
|
||||
uintptr_t tlsdata = GetFSBaseEmu(emu);
|
||||
|
||||
opcode = F8;
|
||||
// REX prefix before the F0 are ignored
|
||||
rex.rex = 0;
|
||||
while(opcode>=0x40 && opcode<=0x4f) {
|
||||
rex.rex = opcode;
|
||||
opcode = F8;
|
||||
}
|
||||
|
||||
switch(opcode) {
|
||||
|
||||
case 0x8B: /* MOV Gd,Ed */
|
||||
nextop = F8;
|
||||
GETEW_OFFS(0, tlsdata);
|
||||
GETGW;
|
||||
if(rex.w)
|
||||
GW->q[0] = EW->q[0];
|
||||
else
|
||||
GW->word[0] = EW->word[0];
|
||||
break;
|
||||
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -99,6 +99,7 @@ int Run0F(x64emu_t *emu, rex_t rex);
|
||||
int Run64(x64emu_t *emu, rex_t rex);
|
||||
int Run66(x64emu_t *emu, rex_t rex);
|
||||
int Run660F(x64emu_t *emu, rex_t rex);
|
||||
int Run6664(x64emu_t *emu, rex_t rex);
|
||||
//int Run67(x64emu_t *emu, rex_t rex);
|
||||
int RunD8(x64emu_t *emu, rex_t rex);
|
||||
int RunD9(x64emu_t *emu, rex_t rex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user