mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-05-28 04:39:55 +00:00
remove loop endpoint
This commit is contained in:
parent
de8637ce8c
commit
77798f889e
@ -444,8 +444,7 @@ pub fn inv_fp12(f: Fp12) -> Fp12 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn power(f: Fp12) -> Fp12 {
|
pub fn power(f: Fp12) -> Fp12 {
|
||||||
const EXPS4: [(usize, usize, usize); 65] = [
|
const EXPS4: [(usize, usize, usize); 64] = [
|
||||||
(1, 1, 1),
|
|
||||||
(1, 1, 0),
|
(1, 1, 0),
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
|
|||||||
@ -14,7 +14,7 @@ global power_data_4:
|
|||||||
BYTES 010, 100, 110, 010, 110, 100, 110, 101, 101, 001
|
BYTES 010, 100, 110, 010, 110, 100, 110, 101, 101, 001
|
||||||
BYTES 001, 110, 110, 110, 010, 110, 101, 001, 010, 010
|
BYTES 001, 110, 110, 110, 010, 110, 101, 001, 010, 010
|
||||||
BYTES 110, 110, 110, 010, 101, 110, 101, 010, 101, 001
|
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:
|
global power_data_2:
|
||||||
BYTES 11, 01, 11, 10, 11, 10, 01, 10, 00, 01
|
BYTES 11, 01, 11, 10, 11, 10, 01, 10, 00, 01
|
||||||
|
|||||||
@ -27,8 +27,8 @@ global power:
|
|||||||
// stack: 1, 1, 1, ptr, out, retdest
|
// stack: 1, 1, 1, ptr, out, retdest
|
||||||
%mstore_kernel_general(200) %mstore_kernel_general(224) %mstore_kernel_general(212)
|
%mstore_kernel_general(200) %mstore_kernel_general(224) %mstore_kernel_general(212)
|
||||||
// stack: ptr, out, retdest {200: y0, 212: y2, 224: y4}
|
// stack: ptr, out, retdest {200: y0, 212: y2, 224: y4}
|
||||||
PUSH 65 PUSH 62 PUSH 65
|
PUSH 65 PUSH 62 PUSH 64
|
||||||
// stack: 65, 62, 65, ptr, out, retdest {200: y0, 212: y2, 224: y4}
|
// stack: 64, 62, 65, ptr, out, retdest {200: y0, 212: y2, 224: y4}
|
||||||
%jump(power_loop_4)
|
%jump(power_loop_4)
|
||||||
|
|
||||||
power_return:
|
power_return:
|
||||||
@ -75,7 +75,7 @@ power_return_5:
|
|||||||
%jump(mul_fp12)
|
%jump(mul_fp12)
|
||||||
|
|
||||||
/// def power_loop_4():
|
/// def power_loop_4():
|
||||||
/// for i in range(65):
|
/// for i in range(64):
|
||||||
/// abc = load(i, power_data_4)
|
/// abc = load(i, power_data_4)
|
||||||
/// if a:
|
/// if a:
|
||||||
/// y4 *= acc
|
/// y4 *= acc
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user