This commit is contained in:
wborgeaud 2022-07-05 21:24:51 +02:00
parent 8ffd25c127
commit 5bae732ea0
3 changed files with 7 additions and 8 deletions

View File

@ -9,12 +9,12 @@ use crate::cpu::kernel::parser::parse;
pub(crate) fn combined_kernel() -> Kernel {
let files = vec![
include_str!("asm/basic_macros.asm"),
// include_str!("asm/exp.asm"),
include_str!("asm/exp.asm"),
include_str!("asm/curve_mul.asm"),
include_str!("asm/curve_add.asm"),
include_str!("asm/moddiv.asm"),
// include_str!("asm/storage_read.asm"),
// include_str!("asm/storage_write.asm"),
include_str!("asm/storage_read.asm"),
include_str!("asm/storage_write.asm"),
];
let parsed_files = files.iter().map(|f| parse(f)).collect_vec();
@ -28,7 +28,6 @@ mod tests {
#[test]
fn make_kernel() {
// Make sure we can parse and assemble the entire kernel.
let ker = combined_kernel();
println!("{:?}", ker.code)
combined_kernel();
}
}

View File

@ -69,7 +69,7 @@ global ec_add:
// stack: retdest
JUMP
// Assumption (x0,y0) == (0,0)
// Assumption: (x0,y0) == (0,0)
ec_add_first_zero:
JUMPDEST
// stack: x0, y0, x1, y1, retdest
@ -109,7 +109,7 @@ ec_add_first_zero:
// stack: retdest
JUMP
// Assumption (x1,y1) == (0,0) and (x0,y0) != (0,0)
// Assumption: (x1,y1) == (0,0) and (x0,y0) != (0,0)
ec_add_snd_zero:
JUMPDEST
// stack: x0, y0, x1, y1, retdest

View File

@ -40,7 +40,7 @@ global ec_mul:
// stack: retdest
JUMP
// Same algorithm as `exp`
// Same algorithm as in `exp.asm`
ec_mul_valid_point:
JUMPDEST
// stack: x, y, s, retdest