This commit is contained in:
Dmitry Vagner 2023-02-13 11:25:46 -08:00
parent c6492bc5d5
commit 9e60ee2567
2 changed files with 13 additions and 1 deletions

View File

@ -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

View File

@ -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,
}
}
}