Latest compatible version of Classicube from the original GitHub repository (https://github.com/ClassiCube/ClassiCube) that can be compiled on Classicube for PowerMac PPC running Mac OS X 10.4.
This commit is contained in:
49
third_party/dsiwifi/common/source/spinlock.s
vendored
Normal file
49
third_party/dsiwifi/common/source/spinlock.s
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifdef ARM7
|
||||
.arch armv4t
|
||||
.cpu arm7tdmi
|
||||
#else
|
||||
#ifdef ARM9
|
||||
.arch armv5te
|
||||
.cpu arm946e-s
|
||||
#endif
|
||||
#endif
|
||||
.text
|
||||
.arm
|
||||
.global SLasm_Acquire
|
||||
.type SLasm_Acquire STT_FUNC
|
||||
@---------------------------------------------------------------------------------
|
||||
SLasm_Acquire:
|
||||
@---------------------------------------------------------------------------------
|
||||
ldr r2,[r0]
|
||||
cmp r2,#0
|
||||
movne r0,#1
|
||||
bxne lr
|
||||
mov r2,r1
|
||||
swp r2,r2,[r0]
|
||||
cmp r2,#0
|
||||
cmpne r2,r1
|
||||
moveq r0,#0
|
||||
bxeq lr
|
||||
swp r2,r2,[r0]
|
||||
mov r0,#1
|
||||
bx lr
|
||||
|
||||
.global SLasm_Release
|
||||
.type SLasm_Release STT_FUNC
|
||||
@---------------------------------------------------------------------------------
|
||||
SLasm_Release:
|
||||
@---------------------------------------------------------------------------------
|
||||
ldr r2,[r0]
|
||||
cmp r2,r1
|
||||
movne r0,#2
|
||||
bxne lr
|
||||
mov r2,#0
|
||||
swp r2,r2,[r0]
|
||||
cmp r2,r1
|
||||
moveq r0,#0
|
||||
movne r0,#2
|
||||
bx lr
|
||||
|
||||
.pool
|
||||
.end
|
||||
|
||||
Reference in New Issue
Block a user