Verified Commit 1797871e authored by Camil Staps's avatar Camil Staps 🚀

Fix update_r implementation

parent cc60d352
Pipeline #43611 passed with stages
in 13 minutes and 8 seconds
......@@ -3186,15 +3186,12 @@ all_instructions opts t = bootstrap $ collect_instructions opts $ map (\i -> i t
advance_ptr Pc 3 :.
new_local (TPtr TWord) (to_word_ptr (A @ 0)) \elems ->
advance_ptr elems ((n_a+n_b) * to_ptr_offset (B @ 0) + lit_hword 3) :.
elems @ 0 .= A @ -1 :.
elems @ 1 .= A @ -2 :.
unrolled_loop [3..30] (\i -> n_a <. lit_hword i) (\i -> elems @ (i-1) .= A @ (0-i)) :.
for [0..4] (\i -> elems @ i .= A @ (-1-i)) :.
unrolled_loop [6..30] (\i -> n_a <. lit_hword i) (\i -> elems @ (i-1) .= A @ (0-i)) :.
A @ (lit_hword 0 - n_a) .= A @ 0 :.
shrink_a n_a :.
advance_ptr elems n_a :.
elems @ 0 .= B @ 1 :.
elems @ 1 .= B @ 2 :.
unrolled_loop [3..30] (\i -> n_b <. lit_hword i) (\i -> elems @ (i-1) .= B @ i) :.
unrolled_loop [1..30] (\i -> n_b <. lit_hword i) (\i -> elems @ (i-1) .= B @ i) :.
shrink_b (n_b + lit_hword 1)
, instr "xorI" (Just 0) $
B @ 1 .= xorI (B @ 0) (B @ 1) :.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment