summaryrefslogtreecommitdiff
path: root/Userland/DevTools/UserspaceEmulator
diff options
context:
space:
mode:
authorHendiadyoin1 <leon.a@serenityos.org>2022-04-06 16:31:45 +0200
committerAndreas Kling <kling@serenityos.org>2022-04-06 18:30:22 +0200
commit7ba2e5e3e74e42d9cadee0aaec317c20e431dc2d (patch)
treef5f54957d5b102071cd8de912962d00e467b99ad /Userland/DevTools/UserspaceEmulator
parent688782efab6ac083150833d39751938b01d6417f (diff)
downloadserenity-7ba2e5e3e74e42d9cadee0aaec317c20e431dc2d.zip
LibX86: Add CMPXCHG8B, RDRAND and RDSEED
With this we can run following script with no errors: ```sh for /usr/lib/*.so { disasm "$it" > /dev/zero } ```
Diffstat (limited to 'Userland/DevTools/UserspaceEmulator')
-rw-r--r--Userland/DevTools/UserspaceEmulator/SoftCPU.cpp4
-rw-r--r--Userland/DevTools/UserspaceEmulator/SoftCPU.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp
index 4f8eb02acc..f0bd530026 100644
--- a/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp
+++ b/Userland/DevTools/UserspaceEmulator/SoftCPU.cpp
@@ -2902,6 +2902,10 @@ FPU_INSTRUCTION(MOVD_rm32_mm2);
FPU_INSTRUCTION(MOVQ_rm64_mm2); // long mode
FPU_INSTRUCTION(EMMS);
+void SoftCPU::CMPXCHG8B_m64(X86::Instruction const&) { TODO_INSN(); }
+void SoftCPU::RDRAND_reg(X86::Instruction const&) { TODO_INSN(); }
+void SoftCPU::RDSEED_reg(X86::Instruction const&) { TODO_INSN(); }
+
VPU_INSTRUCTION(PREFETCHTNTA);
VPU_INSTRUCTION(PREFETCHT0);
VPU_INSTRUCTION(PREFETCHT1);
diff --git a/Userland/DevTools/UserspaceEmulator/SoftCPU.h b/Userland/DevTools/UserspaceEmulator/SoftCPU.h
index e8540cdae3..0a0a600754 100644
--- a/Userland/DevTools/UserspaceEmulator/SoftCPU.h
+++ b/Userland/DevTools/UserspaceEmulator/SoftCPU.h
@@ -1109,6 +1109,10 @@ private:
virtual void MOVQ_rm64_mm2(const X86::Instruction&) override; // long mode
virtual void EMMS(const X86::Instruction&) override;
+ virtual void CMPXCHG8B_m64(X86::Instruction const&) override;
+ virtual void RDRAND_reg(X86::Instruction const&) override;
+ virtual void RDSEED_reg(X86::Instruction const&) override;
+
virtual void PREFETCHTNTA(X86::Instruction const&) override;
virtual void PREFETCHT0(X86::Instruction const&) override;
virtual void PREFETCHT1(X86::Instruction const&) override;