From 4b979bf206cc248ca74ab1a7ac980b3a014e43b2 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 16 Feb 2024 16:31:05 +0100 Subject: [ARM64_DYNAREC] Added 0F A0/A1/A8/A9 opcodes --- src/dynarec/arm64/dynarec_arm64_0f.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dynarec/arm64/dynarec_arm64_0f.c b/src/dynarec/arm64/dynarec_arm64_0f.c index 2ef482eb..79596c8a 100644 --- a/src/dynarec/arm64/dynarec_arm64_0f.c +++ b/src/dynarec/arm64/dynarec_arm64_0f.c @@ -1581,7 +1581,17 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin GOCOND(0x90, "SET", "Eb"); #undef GO - + case 0xA0: + INST_NAME("PUSH FS"); + LDRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_FS])); + PUSH1z(x2); + break; + case 0xA1: + INST_NAME("POP FS"); + POP1z(x2); + STRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_FS])); + STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_FS])); + break; case 0xA2: INST_NAME("CPUID"); NOTEST(x1); @@ -1641,6 +1651,18 @@ uintptr_t dynarec64_0F(dynarec_arm_t* dyn, uintptr_t addr, uintptr_t ip, int nin WBACK; break; + case 0xA8: + INST_NAME("PUSH GS"); + LDRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_GS])); + PUSH1z(x2); + break; + case 0xA9: + INST_NAME("POP GS"); + POP1z(x2); + STRH_U12(x2, xEmu, offsetof(x64emu_t, segs[_GS])); + STRw_U12(xZR, xEmu, offsetof(x64emu_t, segs_serial[_GS])); + break; + case 0xAB: INST_NAME("BTS Ed, Gd"); SETFLAGS(X_CF, SF_SUBSET); -- cgit 1.4.1