diff options
Diffstat (limited to 'src/emu/x64runavx.c')
| -rw-r--r-- | src/emu/x64runavx.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/emu/x64runavx.c b/src/emu/x64runavx.c new file mode 100644 index 00000000..78515b25 --- /dev/null +++ b/src/emu/x64runavx.c @@ -0,0 +1,72 @@ +#define _GNU_SOURCE +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <math.h> +#include <fenv.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 "my_cpuid.h" +#include "bridge.h" +#include "signals.h" +#include "x64shaext.h" +#ifdef DYNAREC +#include "custommem.h" +#include "../dynarec/native_lock.h" +#endif + +#include "modrm.h" + +#ifdef TEST_INTERPRETER +uintptr_t TestAVX(x64test_t *test, vex_t vex, uintptr_t addr, int *step) +#else +uintptr_t RunAVX(x64emu_t *emu, vex_t vex, uintptr_t addr, int *step) +#endif +{ + uint8_t opcode; + uint8_t nextop; + uint8_t tmp8u; + int8_t tmp8s; + int32_t tmp32s, tmp32s2; + uint32_t tmp32u, tmp32u2; + uint64_t tmp64u, tmp64u2; + int64_t tmp64s; + reg64_t *oped, *opgd; + sse_regs_t *opex, *opgx, eax1; + mmx87_regs_t *opem, *opgm, eam1; + +#ifdef TEST_INTERPRETER + x64emu_t *emu = test->emu; +#endif + opcode = F8; + + switch(opcode) { + + case 0x77: + if(!vex.l && (vex.m==VEX_M_0F) && (vex.p==VEX_P_NONE)) { + if(vex.v!=0) { + emit_signal(emu, SIGILL, (void*)R_RIP, 0); + } else { + memset(emu->ymm, 0, sizeof(sse_regs_t)*(vex.rex.is32bits)?16:8); + } + } else + return 0; + break; + default: + return 0; + } + return addr; +} |