From 5c3f2fde226e11671f3c2351cb6d95b3eef614cc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 30 Dec 2020 20:18:03 -0500 Subject: [PATCH] Arm64Emitter: Make BarrierType enum an enum class Prevents namespace pollution and enforces strong typing. --- Source/Core/Common/Arm64Emitter.cpp | 6 +++--- Source/Core/Common/Arm64Emitter.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Core/Common/Arm64Emitter.cpp b/Source/Core/Common/Arm64Emitter.cpp index 68652ba5b4..b8e808513c 100644 --- a/Source/Core/Common/Arm64Emitter.cpp +++ b/Source/Core/Common/Arm64Emitter.cpp @@ -1247,15 +1247,15 @@ void ARM64XEmitter::CLREX() } void ARM64XEmitter::DSB(BarrierType type) { - EncodeSystemInst(0, 3, 3, type, 4, WSP); + EncodeSystemInst(0, 3, 3, static_cast(type), 4, WSP); } void ARM64XEmitter::DMB(BarrierType type) { - EncodeSystemInst(0, 3, 3, type, 5, WSP); + EncodeSystemInst(0, 3, 3, static_cast(type), 5, WSP); } void ARM64XEmitter::ISB(BarrierType type) { - EncodeSystemInst(0, 3, 3, type, 6, WSP); + EncodeSystemInst(0, 3, 3, static_cast(type), 6, WSP); } // Add/Subtract (extended register) diff --git a/Source/Core/Common/Arm64Emitter.h b/Source/Core/Common/Arm64Emitter.h index c654c4e8b6..b631de0760 100644 --- a/Source/Core/Common/Arm64Emitter.h +++ b/Source/Core/Common/Arm64Emitter.h @@ -364,7 +364,7 @@ enum class SystemHint SEVL, }; -enum BarrierType +enum class BarrierType { OSHLD = 1, OSHST = 2,