4
.globl _ATL_DecAtomicCount
7
#if defined(ATL_USE64BITS)
9
* Official Program Descripter section, seg fault w/o it on Linux/PPC64
16
.quad Mjoin(.,ATL_DecAtomicCount),.TOC.@tocbase,0
18
.type Mjoin(.,ATL_DecAtomicCount),@function
20
.globl Mjoin(.,ATL_DecAtomicCount)
23
.globl ATL_DecAtomicCount
27
#error "Code is not reliable on PPC, don't know why"
29
/* int ATL_DecAtomicCount(void *vp) */
31
lwarx r5, 0, r3 /* Read int from mem, place reservation */
32
addi r5, r5, -1 /* decrement value */
33
stwcx. r5, 0, r3 /* attempt to store decremented value back to mem */
34
bne- RETRY /* If store failed, retry */