]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Tidy assembler code
authorOlivier Martin <olivier.martin@arm.com>
Sat, 1 Mar 2014 11:01:00 +0000 (11:01 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 1 Mar 2014 11:01:00 +0000 (11:01 +0000)
- Fixed typo
- Removed unreachable 'dead' loop

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15277 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Drivers/CpuDxe/AArch64/ExceptionSupport.S
ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S
ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S
ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm
ArmPlatformPkg/PrePeiCore/AArch64/Helper.S
ArmPlatformPkg/Sec/AArch64/Helper.S
ArmPlatformPkg/Sec/AArch64/SecEntryPoint.S
ArmPlatformPkg/Sec/Arm/Helper.S

index 981ffd5c3c27a011a838c5683eece14de2ba3165..a67477df83996ace8f550f11c3afca6bd9909180 100644 (file)
@@ -376,6 +376,3 @@ ASM_PFX(AsmCommonExceptionEntry):
 \r
 #undef REG_PAIR\r
 #undef REG_ONE\r
-\r
-dead:\r
-  b        dead\r
index f7cc55724532feffc281cacd7eb9d732b98948e4..12e6d0c82ba636bc500cb5d1408450a285f58df6 100644 (file)
@@ -74,16 +74,16 @@ ASM_PFX(ArmWriteCpacr):
 ASM_PFX(ArmWriteAuxCr):\r
   EL1_OR_EL2(x1)\r
 1:msr     actlr_el1, x0      // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3\r
-  b       3f\r
+  ret\r
 2:msr     actlr_el2, x0      // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3\r
-3:ret\r
+  ret\r
 \r
 ASM_PFX(ArmReadAuxCr):\r
   EL1_OR_EL2(x1)\r
 1:mrs     x0, actlr_el1      // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3\r
-  b       3f\r
+  ret\r
 2:mrs     x0, actlr_el2      // Aux Control Reg (ACTLR) at EL1. Also available in EL2 and EL3\r
-3:ret\r
+  ret\r
 \r
 ASM_PFX(ArmSetTTBR0):\r
   EL1_OR_EL2_OR_EL3(x1)\r
@@ -185,7 +185,7 @@ ASM_PFX(ArmWriteScr):
   ret\r
 \r
 ASM_PFX(ArmWriteMVBar):\r
-  msr    vbar_el3, x0            // Excpetion Vector Base address for Monitor on EL3\r
+  msr    vbar_el3, x0            // Exception Vector Base address for Monitor on EL3\r
   ret\r
 \r
 ASM_PFX(ArmCallWFE):\r
index 57b205a7a826033728374dd4b49f620711f957f3..a3de902cc63b0e61ea4399ec72e751b9dd7daf1f 100644 (file)
@@ -87,7 +87,7 @@ ASM_PFX(CPSRMaskInsert):    @ on entry, r0 is the mask and r1 is the field to in
   isb\r
   mov     sp, r3            @ restore stack pointer\r
   ldmfd   sp!, {r4-r12, lr} @ restore registers\r
-  bx      lr                @ return (hopefully thumb-safe!)             @ return (hopefully thumb-safe!)\r
+  bx      lr                @ return (hopefully thumb-safe!)\r
 \r
 ASM_PFX(CPSRRead):\r
   mrs     r0, cpsr\r
index a464e4d86cb18d6f8a6ec759d309c01be4c8a1eb..cb69f71bc71f218c3b7e86f25cf8f0dac7245804 100644 (file)
@@ -171,14 +171,14 @@ ArmWriteMVBar
   \r
 ArmCallWFE\r
   wfe\r
-  blx   lr\r
+  bx      lr\r
 \r
 ArmCallSEV\r
   sev\r
-  blx   lr\r
+  bx      lr\r
 \r
 ArmReadSctlr\r
-  mrc     p15, 0, R0, c1, c0, 0      // Read SCTLR into R0 (Read control register configuration data)\r
-  bx     lr\r
+  mrc     p15, 0, r0, c1, c0, 0      // Read SCTLR into R0 (Read control register configuration data)\r
+  bx       lr\r
 \r
   END\r
index 14e9cb8d8b5d13377678630f93df368f54ad8da2..a11cda06d1b74139eaf259d986d283452be98e5f 100644 (file)
@@ -45,7 +45,4 @@ ASM_PFX(SetupExceptionLevel2):
 \r
    ret\r
 \r
-dead:\r
-   b       dead\r
-\r
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r
index 4501be54a0cb386f03307ff4a514b7a7e7a47caf..490d3df12d765cb54cc001b9e804a96bb4f7fcb2 100644 (file)
@@ -92,7 +92,4 @@ ASM_PFX(set_non_secure_mode):
    msr     spsr_el3, x0\r
    ret\r
 \r
-dead:\r
-   b       dead\r
-\r
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r
index e678f4c18c1ffc6d13df4bef1327b6ae6ca5b12f..c16ede0831ee425d531b4031def584e69f413123 100644 (file)
@@ -1,5 +1,5 @@
 //\r
-//  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+//  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 //\r
 //  This program and the accompanying materials\r
 //  are licensed and made available under the terms and conditions of the BSD License\r
@@ -141,6 +141,3 @@ _PrepareArguments:
 ASM_PFX(JumpToPEI):\r
   LoadConstantToReg (FixedPcdGet32(PcdFvBaseAddress), x0)\r
   blr   x0\r
-\r
-dead:\r
-  b     dead\r
index c99987d3a1c2ee557dede0c0ce7827480a54cfb2..ae4bc4454024e1f05cd166da5902ce8171da784d 100644 (file)
@@ -1,5 +1,5 @@
 #========================================================================================\r
-#  Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
+#  Copyright (c) 2011-2014, ARM Limited. All rights reserved.\r
 #  \r
 #  This program and the accompanying materials                          \r
 #  are licensed and made available under the terms and conditions of the BSD License         \r
@@ -80,8 +80,5 @@ ASM_PFX(set_non_secure_mode):
     isb\r
     pop     { r1 }\r
     bx      lr                @ return (hopefully thumb-safe!)\r
-\r
-dead:\r
-    b       dead\r
     \r
 ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r