1
1
openmpi/opal/asm/base/POWERPC32.asm
Jeff Squyres 3a9179a0d7 Initial population of the opal tree
This commit was SVN r6267.
2005-07-02 13:43:20 +00:00

157 строки
2.8 KiB
NASM

START_FILE
TEXT
ALIGN(4)
START_FUNC(ompi_atomic_mb)
sync
blr
END_FUNC(ompi_atomic_mb)
START_FUNC(ompi_atomic_rmb)
lwsync
blr
END_FUNC(ompi_atomic_rmb)
START_FUNC(ompi_atomic_wmb)
eieio
blr
END_FUNC(ompi_atomic_wmb)
START_FUNC(ompi_atomic_cmpset_32)
LSYM(1) lwarx r0, 0, r3
cmpw 0, r0, r4
bne- REFLSYM(2)
stwcx. r5, 0, r3
bne- REFLSYM(1)
LSYM(2)
xor r3,r0,r4
subfic r5,r3,0
adde r3,r5,r3
blr
END_FUNC(ompi_atomic_cmpset_32)
START_FUNC(ompi_atomic_cmpset_acq_32)
LSYM(3) lwarx r0, 0, r3
cmpw 0, r0, r4
bne- REFLSYM(4)
stwcx. r5, 0, r3
bne- REFLSYM(3)
sync
LSYM(4)
xor r3,r0,r4
subfic r5,r3,0
adde r3,r5,r3
lwsync
blr
END_FUNC(ompi_atomic_cmpset_acq_32)
START_FUNC(ompi_atomic_cmpset_rel_32)
eieio
LSYM(5) lwarx r0, 0, r3
cmpw 0, r0, r4
bne- REFLSYM(6)
stwcx. r5, 0, r3
bne- REFLSYM(5)
sync
LSYM(6)
xor r3,r0,r4
subfic r5,r3,0
adde r3,r5,r3
blr
END_FUNC(ompi_atomic_cmpset_rel_32)
#START_64BIT
START_FUNC(ompi_atomic_cmpset_64)
stw r4,-32(r1)
stw r5,-28(r1)
stw r6,-24(r1)
stw r7,-20(r1)
ld r5,-32(r1)
ld r7,-24(r1)
LSYM(7) ldarx r9, 0, r3
cmpd 0, r9, r5
bne- REFLSYM(8)
stdcx. r7, 0, r3
bne- REFLSYM(7)
LSYM(8)
xor r3,r5,r9
subfic r5,r3,0
adde r3,r5,r3
blr
END_FUNC(ompi_atomic_cmpset_64)
START_FUNC(ompi_atomic_cmpset_acq_64)
stw r4,-32(r1)
stw r5,-28(r1)
stw r6,-24(r1)
stw r7,-20(r1)
ld r5,-32(r1)
ld r7,-24(r1)
LSYM(9) ldarx r9, 0, r3
cmpd 0, r9, r5
bne- REFLSYM(10)
stdcx. r7, 0, r3
bne- REFLSYM(9)
LSYM(10)
xor r3,r5,r9
subfic r5,r3,0
adde r3,r5,r3
blr
lwsync
blr
END_FUNC(ompi_atomic_cmpset_acq_64)
START_FUNC(ompi_atomic_cmpset_rel_64)
stw r4,-32(r1)
stw r5,-28(r1)
stw r6,-24(r1)
stw r7,-20(r1)
ld r5,-32(r1)
ld r7,-24(r1)
eieio
LSYM(11) ldarx r9, 0, r3
cmpd 0, r9, r5
bne- REFLSYM(12)
stdcx. r7, 0, r3
bne- REFLSYM(11)
LSYM(12)
xor r3,r5,r9
subfic r5,r3,0
adde r3,r5,r3
blr
lwsync
blr
END_FUNC(ompi_atomic_cmpset_rel_64)
#END_64BIT
START_FUNC(ompi_atomic_add_32)
LSYM(13) lwarx r0, 0, r3
add r0, r4, r0
stwcx. r0, 0, r3
bne- REFLSYM(13)
lwz r3,0(r3)
blr
END_FUNC(ompi_atomic_add_32)
START_FUNC(ompi_atomic_sub_32)
LSYM(14) lwarx r0,0,r3
subf r0,r4,r0
stwcx. r0,0,r3
bne- REFLSYM(14)
lwz r3,0(r3)
blr
END_FUNC(ompi_atomic_sub_32)