From 23cff4d7c51ca9f7851a337c92cb229fa49e09fb Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 4 Jan 2024 12:31:26 +1030 Subject: [PATCH] Core: Add x86 asm opcode Jnp --- Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp | 6 ++++++ Source/Project64-core/N64System/Recompiler/x86/x86ops.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp index 7fbff72ab..5530a2310 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp @@ -299,6 +299,12 @@ void CX86Ops::JneLabel(const char * LabelName, asmjit::Label & JumpLabel) jne(JumpLabel); } +void CX86Ops::JnpLabel(const char * LabelName, asmjit::Label & JumpLabel) +{ + AddSymbol(stdstr_f("L%d", JumpLabel.id()).c_str(), LabelName); + jnp(JumpLabel); +} + void CX86Ops::JnsLabel(const char * LabelName, asmjit::Label & JumpLabel) { AddSymbol(stdstr_f("L%d", JumpLabel.id()).c_str(), LabelName); diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h index 6bdd0a263..41cd58d0f 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h @@ -55,6 +55,7 @@ public: void JlLabel(const char * LabelName, asmjit::Label & JumpLabel); void JmpLabel(const char * LabelName, asmjit::Label & JumpLabel); void JneLabel(const char * LabelName, asmjit::Label & JumpLabel); + void JnpLabel(const char * LabelName, asmjit::Label & JumpLabel); void JnsLabel(const char * LabelName, asmjit::Label & JumpLabel); void JnzLabel(const char * LabelName, asmjit::Label & JumpLabel); void JoLabel(const char * LabelName, asmjit::Label & JumpLabel);