hex.double_exact_xorΒΆ
{t3,t2,t1,t0} ^= src
{d3,d2,d1,d0} ^= src
t3,t2,t1,t0,d3,d2,d1,d0 are bit-addresses; src is hex.
SignatureΒΆ
def double_exact_xor t3, t2, t1, t0, d3, d2, d1, d0, src @ first_flip, second_flip, end { ... }
Defined in hex/logics.fj β lines 101β140 (view on GitHub).
ComplexityΒΆ
Time:
@+4Space:
@+28
See the complexity glossary for what @, w, dw, dbit, n mean.
SourceΒΆ
Click to view the macro body
def double_exact_xor t3, t2, t1, t0, d3, d2, d1, d0, src @ first_flip, second_flip, end {
wflip src+w, first_flip, src
pad 16
first_flip:
;end // 0
d0;second_flip+ 0*dw // 1
d1;second_flip+ 1*dw // 2
d1;second_flip+ 2*dw // 3
d2;second_flip+ 3*dw // 4
d2;second_flip+ 4*dw // 5
d2;second_flip+ 5*dw // 6
d2;second_flip+ 6*dw // 7
d3;second_flip+ 7*dw // 8
d3;second_flip+ 8*dw // 9
d3;second_flip+ 9*dw // 10
d3;second_flip+10*dw // 11
d3;second_flip+11*dw // 12
d3;second_flip+12*dw // 13
d3;second_flip+13*dw // 14
d3;second_flip+14*dw // 15
second_flip:
t0;end // 1
t1;end // 2
t1;first_flip+1*dw // 3
t2;end // 4
t2;first_flip+1*dw // 5
t2;first_flip+2*dw // 6
t2;first_flip+3*dw // 7
t3;end // 8
t3;first_flip+1*dw // 9
t3;first_flip+2*dw // 10
t3;first_flip+3*dw // 11
t3;first_flip+4*dw // 12
t3;first_flip+5*dw // 13
t3;first_flip+6*dw // 14
t3;first_flip+7*dw // 15
end:
wflip src+w, first_flip
}
Used byΒΆ
Example usesΒΆ
hex.double_xorinhex/logics.fj
β Previous: hex.address_and_variable_xor
Next: hex.address_and_variable_double_xor β