summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ArmPkg/Include/AsmMacroIoLibV8.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/ArmPkg/Include/AsmMacroIoLibV8.h b/ArmPkg/Include/AsmMacroIoLibV8.h
index a9f8491bc9..37fa255f84 100644
--- a/ArmPkg/Include/AsmMacroIoLibV8.h
+++ b/ArmPkg/Include/AsmMacroIoLibV8.h
@@ -24,23 +24,23 @@
#define EL1_OR_EL2(SAFE_XREG) \
mrs SAFE_XREG, CurrentEL ;\
cmp SAFE_XREG, #0x8 ;\
+ b.gt . ;\
b.eq 2f ;\
- cmp SAFE_XREG, #0x4 ;\
- b.ne . ;// We should never get here
-// EL1 code starts here
+ cbnz SAFE_XREG, 1f ;\
+ b . ;// We should never get here
+
// CurrentEL : 0xC = EL3; 8 = EL2; 4 = EL1
// This only selects between EL1 and EL2 and EL3, else we die.
// Provide the Macro with a safe temp xreg to use.
#define EL1_OR_EL2_OR_EL3(SAFE_XREG) \
mrs SAFE_XREG, CurrentEL ;\
- cmp SAFE_XREG, #0xC ;\
- b.eq 3f ;\
cmp SAFE_XREG, #0x8 ;\
+ b.gt 3f ;\
b.eq 2f ;\
- cmp SAFE_XREG, #0x4 ;\
- b.ne . ;// We should never get here
-// EL1 code starts here
+ cbnz SAFE_XREG, 1f ;\
+ b . ;// We should never get here
+
#if defined(__clang__)
// load x0 with _Data