summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-12-30 20:40:46 -0500
committerLioncash <mathew1800@gmail.com>2020-12-30 20:49:20 -0500
commitcca0dffebdae6f36dda49e2056391335d7e9760e (patch)
treed20e28fd96d53100ab7d1ae51018e76f0780bce6 /Source/Core/Common
parent6046a15267c5aa5bab4333182d4bb7798f4fa4a9 (diff)
Arm64Emitter: Add shorthand member functions for hint instructions
Allows for more concise code.
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Arm64Emitter.cpp14
-rw-r--r--Source/Core/Common/Arm64Emitter.h7
2 files changed, 14 insertions, 7 deletions
diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp
index ff1a6b137f..ef569cbd3a 100644
--- a/Source/Core/Common/Arm64Emitter.cpp
+++ b/Source/Core/Common/Arm64Emitter.cpp
@@ -965,7 +965,7 @@ FixupBranch ARM64XEmitter::CBZ(ARM64Reg Rt)
branch.ptr = m_code;
branch.type = FixupBranch::Type::CBZ;
branch.reg = Rt;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::CBNZ(ARM64Reg Rt)
@@ -974,7 +974,7 @@ FixupBranch ARM64XEmitter::CBNZ(ARM64Reg Rt)
branch.ptr = m_code;
branch.type = FixupBranch::Type::CBNZ;
branch.reg = Rt;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::B(CCFlags cond)
@@ -983,7 +983,7 @@ FixupBranch ARM64XEmitter::B(CCFlags cond)
branch.ptr = m_code;
branch.type = FixupBranch::Type::BConditional;
branch.cond = cond;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::TBZ(ARM64Reg Rt, u8 bit)
@@ -993,7 +993,7 @@ FixupBranch ARM64XEmitter::TBZ(ARM64Reg Rt, u8 bit)
branch.type = FixupBranch::Type::TBZ;
branch.reg = Rt;
branch.bit = bit;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::TBNZ(ARM64Reg Rt, u8 bit)
@@ -1003,7 +1003,7 @@ FixupBranch ARM64XEmitter::TBNZ(ARM64Reg Rt, u8 bit)
branch.type = FixupBranch::Type::TBNZ;
branch.reg = Rt;
branch.bit = bit;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::B()
@@ -1011,7 +1011,7 @@ FixupBranch ARM64XEmitter::B()
FixupBranch branch{};
branch.ptr = m_code;
branch.type = FixupBranch::Type::B;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
FixupBranch ARM64XEmitter::BL()
@@ -1019,7 +1019,7 @@ FixupBranch ARM64XEmitter::BL()
FixupBranch branch{};
branch.ptr = m_code;
branch.type = FixupBranch::Type::BL;
- HINT(SystemHint::NOP);
+ NOP();
return branch;
}
diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h
index 3e752dbf07..47787c2bba 100644
--- a/Source/Core/Common/Arm64Emitter.h
+++ b/Source/Core/Common/Arm64Emitter.h
@@ -603,6 +603,13 @@ public:
void CNTVCT(ARM64Reg Rt);
void HINT(SystemHint op);
+ void NOP() { HINT(SystemHint::NOP); }
+ void SEV() { HINT(SystemHint::SEV); }
+ void SEVL() { HINT(SystemHint::SEVL); }
+ void WFE() { HINT(SystemHint::WFE); }
+ void WFI() { HINT(SystemHint::WFI); }
+ void YIELD() { HINT(SystemHint::YIELD); }
+
void CLREX();
void DSB(BarrierType type);
void DMB(BarrierType type);