summaryrefslogtreecommitdiffstats
path: root/firmware/asm/arm/corelock.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/asm/arm/corelock.c')
-rw-r--r--firmware/asm/arm/corelock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/asm/arm/corelock.c b/firmware/asm/arm/corelock.c
index b36a40b45b..a60299436f 100644
--- a/firmware/asm/arm/corelock.c
+++ b/firmware/asm/arm/corelock.c
@@ -61,6 +61,7 @@ int corelock_try_lock(struct corelock *cl)
/* Relies on the fact that core IDs are complementary bitmasks (0x55,0xaa) */
asm volatile (
+ BEGIN_ARM_ASM_SYNTAX_UNIFIED
"mov r1, %[id] \n" /* r1 = PROCESSOR_ID */
"ldrb r1, [r1] \n"
"strb r1, [%[cl], r1, lsr #7] \n" /* cl->myl[core] = core */
@@ -71,8 +72,9 @@ int corelock_try_lock(struct corelock *cl)
"bne 1f \n" /* yes? lock acquired */
"ldrb %[rv], [%[cl], #2] \n" /* || cl->turn == core? */
"ands %[rv], %[rv], r1 \n"
- "streqb %[rv], [%[cl], r1, lsr #7] \n" /* if not, cl->myl[core] = 0 */
+ "strbeq %[rv], [%[cl], r1, lsr #7] \n" /* if not, cl->myl[core] = 0 */
"1: \n" /* Done */
+ END_ARM_ASM_SYNTAX_UNIFIED
: [rv] "=r"(rval)
: [id] "i" (&PROCESSOR_ID), [cl] "r" (cl)
: "r1","r2","cc"