mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-10 17:53:06 +00:00
segment
This commit is contained in:
parent
c6492bc5d5
commit
9e60ee2567
@ -1,3 +1,11 @@
|
||||
// Load a single value from bn254 pairings memory.
|
||||
%macro mload_bn254_pairings
|
||||
// stack: offset
|
||||
%mload_kernel(@SEGMENT_BN254_PAIRINGS)
|
||||
// stack: value
|
||||
%endmacro
|
||||
|
||||
|
||||
// fp254_2 macros
|
||||
|
||||
%macro load_fp254_2
|
||||
|
||||
@ -40,10 +40,11 @@ pub(crate) enum Segment {
|
||||
ShiftTable = 16,
|
||||
JumpdestBits = 17,
|
||||
EcdsaTable = 18,
|
||||
BN254Pairings = 19,
|
||||
}
|
||||
|
||||
impl Segment {
|
||||
pub(crate) const COUNT: usize = 19;
|
||||
pub(crate) const COUNT: usize = 20;
|
||||
|
||||
pub(crate) fn all() -> [Self; Self::COUNT] {
|
||||
[
|
||||
@ -66,6 +67,7 @@ impl Segment {
|
||||
Self::ShiftTable,
|
||||
Self::JumpdestBits,
|
||||
Self::EcdsaTable,
|
||||
Self::BN254Pairings,
|
||||
]
|
||||
}
|
||||
|
||||
@ -91,6 +93,7 @@ impl Segment {
|
||||
Segment::ShiftTable => "SEGMENT_SHIFT_TABLE",
|
||||
Segment::JumpdestBits => "SEGMENT_JUMPDEST_BITS",
|
||||
Segment::EcdsaTable => "SEGMENT_KERNEL_ECDSA_TABLE",
|
||||
Segment::BN254Pairings => "SEGMENT_BN254_PAIRINGS",
|
||||
}
|
||||
}
|
||||
|
||||
@ -116,6 +119,7 @@ impl Segment {
|
||||
Segment::ShiftTable => 256,
|
||||
Segment::JumpdestBits => 1,
|
||||
Segment::EcdsaTable => 256,
|
||||
Segment::BN254Pairings => 256,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user