mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-04-20 03:03:25 -04:00
Fix sum test.
This commit is contained in:
@@ -961,7 +961,7 @@ pol constant p_instr_dec_CNT = [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
pol constant p_instr_jmp = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + [1]*;
|
||||
pol constant p_instr_jmp_param_l = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 9] + [9]*;
|
||||
pol constant p_instr_jmpz = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
pol constant p_instr_jmpz_param_l = [0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
pol constant p_instr_jmpz_param_l = [0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
pol constant p_read_X_A = [0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0] + [0]*;
|
||||
pol constant p_read_X_CNT = [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
pol constant p_read_X_pc = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + [0]*;
|
||||
|
||||
@@ -33,7 +33,7 @@ instr assert_zero X { XIsZero = 1 }
|
||||
CNT <=X= ${ ("input", 1) };
|
||||
|
||||
start::
|
||||
jmpz CNT, end;
|
||||
jmpz CNT, check;
|
||||
A <=X= A + ${ ("input", CNT + 1) };
|
||||
// Could use "CNT <=X= CNT - 1", but that would need X.
|
||||
dec_CNT;
|
||||
|
||||
Reference in New Issue
Block a user