Core: In jump ops, Only add label symbol if logging

This commit is contained in:
zilmar 2024-11-14 07:30:39 +10:30
parent 97b2579b4b
commit 61aa53f1a5
1 changed files with 72 additions and 18 deletions

View File

@ -209,110 +209,164 @@ void CX86Ops::Fsub(const asmjit::x86::Mem & Mem)
} }
void CX86Ops::JaeLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JaeLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jae(JumpLabel); jae(JumpLabel);
} }
void CX86Ops::JaLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JaLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
ja(JumpLabel); ja(JumpLabel);
} }
void CX86Ops::JbLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JbLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jb(JumpLabel); jb(JumpLabel);
} }
void CX86Ops::JbeLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JbeLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jbe(JumpLabel); jbe(JumpLabel);
} }
void CX86Ops::JecxzLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JecxzLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jecxz(JumpLabel); jecxz(JumpLabel);
} }
void CX86Ops::JeLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JeLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
je(JumpLabel); je(JumpLabel);
} }
void CX86Ops::JgeLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JgeLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jge(JumpLabel); jge(JumpLabel);
} }
void CX86Ops::JgLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JgLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jg(JumpLabel); jg(JumpLabel);
} }
void CX86Ops::JleLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JleLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jle(JumpLabel); jle(JumpLabel);
} }
void CX86Ops::JlLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JlLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jl(JumpLabel); jl(JumpLabel);
} }
void CX86Ops::JmpLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JmpLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jmp(JumpLabel); jmp(JumpLabel);
} }
void CX86Ops::JneLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JneLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jne(JumpLabel); jne(JumpLabel);
} }
void CX86Ops::JnpLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JnpLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jnp(JumpLabel); jnp(JumpLabel);
} }
void CX86Ops::JnsLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JnsLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jns(JumpLabel); jns(JumpLabel);
} }
void CX86Ops::JnzLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JnzLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jnz(JumpLabel); jnz(JumpLabel);
} }
void CX86Ops::JsLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JsLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
js(JumpLabel); js(JumpLabel);
} }
void CX86Ops::JoLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JoLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jo(JumpLabel); jo(JumpLabel);
} }
void CX86Ops::JzLabel(const char * LabelName, asmjit::Label & JumpLabel) void CX86Ops::JzLabel(const char * LabelName, asmjit::Label & JumpLabel)
{
if (CDebugSettings::bRecordRecompilerAsm())
{ {
AddLabelSymbol(JumpLabel, LabelName); AddLabelSymbol(JumpLabel, LabelName);
}
jz(JumpLabel); jz(JumpLabel);
} }