xEmitter: Convert PrefetchLevel to enum class

This commit is contained in:
Dentomologist
2023-06-17 11:48:03 -07:00
parent 93d9e90798
commit 04fcf68176
3 changed files with 10 additions and 10 deletions

View File

@ -920,7 +920,7 @@ void XEmitter::UD2()
void XEmitter::PREFETCH(PrefetchLevel level, OpArg arg)
{
ASSERT_MSG(DYNA_REC, !arg.IsImm(), "PREFETCH - Imm argument");
arg.operandReg = (u8)level;
arg.operandReg = static_cast<u8>(level);
arg.WriteREX(this, 0, 0);
Write8(0x0F);
Write8(0x18);

View File

@ -481,12 +481,12 @@ public:
void BSR(int bits, X64Reg dest, const OpArg& src); // Top bit to bottom bit
// Cache control
enum PrefetchLevel
enum class PrefetchLevel : u8
{
PF_NTA, // Non-temporal (data used once and only once)
PF_T0, // All cache levels
PF_T1, // Levels 2+ (aliased to T0 on AMD)
PF_T2, // Levels 3+ (aliased to T0 on AMD)
NTA = 0, // Non-temporal (data used once and only once)
T0 = 1, // All cache levels
T1 = 2, // Levels 2+ (aliased to T0 on AMD)
T2 = 3, // Levels 3+ (aliased to T0 on AMD)
};
void PREFETCH(PrefetchLevel level, OpArg arg);
void MOVNTI(int bits, const OpArg& dest, X64Reg src);