Test DETOUR0996

ARM DETOUR0996
"PosWW DetourW DpDatadW Wse DMBdWR Fre"
Cycle=Fre PosWW DetourW DpDatadW Wse DMBdWR
Prefetch=0:x=F,0:y=W,1:y=F,1:x=T
Com=Ws Fr
Orig=PosWW DetourW DpDatadW Wse DMBdWR Fre
{
%x0=x; %y0=y;
%x1=x;
%y2=y; %x2=x;
}
 P0           | P1           | P2           ;
 MOV R0,#1    | MOV R0,#3    | MOV R0,#2    ;
 STR R0,[%x0] | STR R0,[%x1] | STR R0,[%y2] ;
 MOV R1,#2    |              | DMB          ;
 STR R1,[%x0] |              | LDR R1,[%x2] ;
 LDR R2,[%x0] |              |              ;
 EOR R3,R2,R2 |              |              ;
 ADD R3,R3,#1 |              |              ;
 STR R3,[%y0] |              |              ;
Observed
    0:R2=3; 2:R1=1; y=1;
and 0:R2=3; 2:R1=0; y=2;
and 0:R2=3; 2:R1=1; y=2;
and 0:R2=3; 2:R1=2; y=2;