2005-02-10 03:06:54 +03:00
|
|
|
START_FILE
|
2005-01-27 04:39:55 +03:00
|
|
|
TEXT
|
|
|
|
|
|
|
|
ALIGN(4)
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_mb)
|
2005-01-27 04:39:55 +03:00
|
|
|
sync
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_mb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_rmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
lwsync
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_rmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_wmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
eieio
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_wmb)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_32)
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(1) lwarx r0, 0, r3
|
2005-01-27 04:39:55 +03:00
|
|
|
cmpw 0, r0, r4
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(2)
|
2005-01-27 04:39:55 +03:00
|
|
|
stwcx. r5, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(1)
|
|
|
|
LSYM(2)
|
2005-01-27 04:39:55 +03:00
|
|
|
xor r3,r0,r4
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-27 04:39:55 +03:00
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_acq_32)
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(3) lwarx r0, 0, r3
|
2005-01-27 04:39:55 +03:00
|
|
|
cmpw 0, r0, r4
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(4)
|
2005-01-27 04:39:55 +03:00
|
|
|
stwcx. r5, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(3)
|
2005-01-27 04:39:55 +03:00
|
|
|
sync
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(4)
|
2005-01-27 04:39:55 +03:00
|
|
|
xor r3,r0,r4
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-27 04:39:55 +03:00
|
|
|
lwsync
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_acq_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_rel_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
eieio
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(5) lwarx r0, 0, r3
|
2005-01-27 04:39:55 +03:00
|
|
|
cmpw 0, r0, r4
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(6)
|
2005-01-27 04:39:55 +03:00
|
|
|
stwcx. r5, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(5)
|
2005-01-27 04:39:55 +03:00
|
|
|
sync
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(6)
|
2005-01-27 04:39:55 +03:00
|
|
|
xor r3,r0,r4
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-27 04:39:55 +03:00
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_rel_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
#START_64BIT
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_64)
|
2005-01-29 02:32:44 +03:00
|
|
|
stw r4,-32(r1)
|
|
|
|
stw r5,-28(r1)
|
|
|
|
stw r6,-24(r1)
|
|
|
|
stw r7,-20(r1)
|
|
|
|
ld r5,-32(r1)
|
|
|
|
ld r7,-24(r1)
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(7) ldarx r9, 0, r3
|
2005-01-29 02:32:44 +03:00
|
|
|
cmpd 0, r9, r5
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(8)
|
2005-01-29 02:32:44 +03:00
|
|
|
stdcx. r7, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(7)
|
|
|
|
LSYM(8)
|
2005-01-29 02:32:44 +03:00
|
|
|
xor r3,r5,r9
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-27 04:39:55 +03:00
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_64)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_acq_64)
|
2005-01-29 02:32:44 +03:00
|
|
|
stw r4,-32(r1)
|
|
|
|
stw r5,-28(r1)
|
|
|
|
stw r6,-24(r1)
|
|
|
|
stw r7,-20(r1)
|
|
|
|
ld r5,-32(r1)
|
|
|
|
ld r7,-24(r1)
|
|
|
|
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(9) ldarx r9, 0, r3
|
2005-01-29 02:32:44 +03:00
|
|
|
cmpd 0, r9, r5
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(10)
|
2005-01-29 02:32:44 +03:00
|
|
|
stdcx. r7, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(9)
|
|
|
|
LSYM(10)
|
2005-01-29 02:32:44 +03:00
|
|
|
xor r3,r5,r9
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-29 02:32:44 +03:00
|
|
|
blr
|
2005-01-27 04:39:55 +03:00
|
|
|
lwsync
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_acq_64)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_cmpset_rel_64)
|
2005-01-29 02:32:44 +03:00
|
|
|
stw r4,-32(r1)
|
|
|
|
stw r5,-28(r1)
|
|
|
|
stw r6,-24(r1)
|
|
|
|
stw r7,-20(r1)
|
|
|
|
ld r5,-32(r1)
|
|
|
|
ld r7,-24(r1)
|
|
|
|
|
2005-01-27 04:39:55 +03:00
|
|
|
eieio
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(11) ldarx r9, 0, r3
|
2005-01-29 02:32:44 +03:00
|
|
|
cmpd 0, r9, r5
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(12)
|
2005-01-29 02:32:44 +03:00
|
|
|
stdcx. r7, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(11)
|
|
|
|
LSYM(12)
|
2005-01-29 02:32:44 +03:00
|
|
|
xor r3,r5,r9
|
2005-04-29 01:57:31 +04:00
|
|
|
subfic r5,r3,0
|
|
|
|
adde r3,r5,r3
|
2005-01-29 02:32:44 +03:00
|
|
|
blr
|
|
|
|
lwsync
|
2005-01-27 04:39:55 +03:00
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_cmpset_rel_64)
|
2005-01-27 04:39:55 +03:00
|
|
|
#END_64BIT
|
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_add_32)
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(13) lwarx r0, 0, r3
|
2005-01-27 04:39:55 +03:00
|
|
|
add r0, r4, r0
|
|
|
|
stwcx. r0, 0, r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(13)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
lwz r3,0(r3)
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_add_32)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
|
2005-07-04 01:38:51 +04:00
|
|
|
START_FUNC(opal_atomic_sub_32)
|
2005-02-10 03:06:54 +03:00
|
|
|
LSYM(14) lwarx r0,0,r3
|
2005-01-27 04:39:55 +03:00
|
|
|
subf r0,r4,r0
|
|
|
|
stwcx. r0,0,r3
|
2005-02-10 03:06:54 +03:00
|
|
|
bne- REFLSYM(14)
|
2005-01-27 04:39:55 +03:00
|
|
|
|
|
|
|
lwz r3,0(r3)
|
|
|
|
blr
|
2005-07-04 01:38:51 +04:00
|
|
|
END_FUNC(opal_atomic_sub_32)
|
2005-08-24 01:50:23 +04:00
|
|
|
|
|
|
|
START_FUNC(opal_sys_timer_get_cycles)
|
|
|
|
LSYM(15)
|
|
|
|
mftbu r0
|
|
|
|
mftb r11
|
|
|
|
mftbu r2
|
|
|
|
cmpw cr7,r2,r0
|
|
|
|
bne+ cr7,REFLSYM(14)
|
|
|
|
li r4,0
|
|
|
|
li r9,0
|
|
|
|
or r3,r2,r9
|
|
|
|
or r4,r4,r11
|
|
|
|
blr
|
|
|
|
END_FUNC(opal_sys_timer_get_cycles)
|