Litmus test without line numbers
[Posted December 6, 2011 by corbet]
Paste the following text into
this site to follow along
with the article:
PPC SB+lwsync-RMW-lwsync+isync-simple
""
{
0:r2=x; 0:r3=2; 0:r4=y; 0:r10=0 ; 0:r11=0; 0:r12=z ;
1:r2=y; 1:r4=x;
}
P0 | P1 ;
li r1,1 | li r1,1 ;
stw r1,0(r2) | stw r1,0(r2) ;
lwsync | sync ;
| lwz r3,0(r4) ;
lwarx r11,r10,r12 | ;
stwcx. r11,r10,r12 | ;
bne Fail1 | ;
isync | ;
lwz r3,0(r4) | ;
Fail1: | ;
exists
(0:r3=0 /\ 1:r3=0)
(
Log in to post comments)