remove loop endpoint

This commit is contained in:
Dmitry Vagner 2022-12-29 14:12:03 -08:00
parent de8637ce8c
commit 77798f889e
3 changed files with 5 additions and 6 deletions

View File

@ -444,8 +444,7 @@ pub fn inv_fp12(f: Fp12) -> Fp12 {
}
pub fn power(f: Fp12) -> Fp12 {
const EXPS4: [(usize, usize, usize); 65] = [
(1, 1, 1),
const EXPS4: [(usize, usize, usize); 64] = [
(1, 1, 0),
(1, 1, 1),
(1, 1, 1),

View File

@ -14,7 +14,7 @@ global power_data_4:
BYTES 010, 100, 110, 010, 110, 100, 110, 101, 101, 001
BYTES 001, 110, 110, 110, 010, 110, 101, 001, 010, 010
BYTES 110, 110, 110, 010, 101, 110, 101, 010, 101, 001
BYTES 000, 111, 111, 110, 111
BYTES 000, 111, 111, 110
global power_data_2:
BYTES 11, 01, 11, 10, 11, 10, 01, 10, 00, 01

View File

@ -27,8 +27,8 @@ global power:
// stack: 1, 1, 1, ptr, out, retdest
%mstore_kernel_general(200) %mstore_kernel_general(224) %mstore_kernel_general(212)
// stack: ptr, out, retdest {200: y0, 212: y2, 224: y4}
PUSH 65 PUSH 62 PUSH 65
// stack: 65, 62, 65, ptr, out, retdest {200: y0, 212: y2, 224: y4}
PUSH 65 PUSH 62 PUSH 64
// stack: 64, 62, 65, ptr, out, retdest {200: y0, 212: y2, 224: y4}
%jump(power_loop_4)
power_return:
@ -75,7 +75,7 @@ power_return_5:
%jump(mul_fp12)
/// def power_loop_4():
/// for i in range(65):
/// for i in range(64):
/// abc = load(i, power_data_4)
/// if a:
/// y4 *= acc