From: John Hodge Date: Tue, 17 Feb 2015 02:50:06 +0000 (+0800) Subject: Kernel/ARMv7 - Hacky (non-atomic) sync_and_fetch_4 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=93d0cdaafdf1edc4af1270e04bdb97159a51a30f;p=tpg%2Facess2.git Kernel/ARMv7 - Hacky (non-atomic) sync_and_fetch_4 --- diff --git a/KernelLand/Kernel/arch/armv7/lib.S b/KernelLand/Kernel/arch/armv7/lib.S index e2f06130..554d7a11 100644 --- a/KernelLand/Kernel/arch/armv7/lib.S +++ b/KernelLand/Kernel/arch/armv7/lib.S @@ -82,3 +82,11 @@ __divmod32_asm: pop {r4} mov pc, lr +.globl __sync_fetch_and_and_4 +__sync_fetch_and_and_4: + mov r2, r0 + ldr r0, [r2] + mov r3, r0 + and r3, r1 + str r3, [r2] + mov pc, lr