diff --git a/pilgen/src/lib.rs b/pilgen/src/lib.rs index 6c4fa77eb..fe059c3b6 100644 --- a/pilgen/src/lib.rs +++ b/pilgen/src/lib.rs @@ -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]*; diff --git a/test_data/asm/simple_sum.asm b/test_data/asm/simple_sum.asm index f74bdf525..1f5a791c1 100644 --- a/test_data/asm/simple_sum.asm +++ b/test_data/asm/simple_sum.asm @@ -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;