mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-02-24 15:53:09 +00:00
Optimize asserts (#1411)
This commit is contained in:
parent
47e24306b7
commit
4ba7718e66
@ -24,13 +24,13 @@ global panic:
|
||||
%endmacro
|
||||
|
||||
%macro assert_eq
|
||||
EQ
|
||||
%assert_nonzero
|
||||
SUB
|
||||
%jumpi(panic)
|
||||
%endmacro
|
||||
|
||||
%macro assert_eq(ret)
|
||||
EQ
|
||||
%assert_nonzero($ret)
|
||||
SUB
|
||||
%jumpi($ret)
|
||||
%endmacro
|
||||
|
||||
%macro assert_lt
|
||||
@ -82,8 +82,9 @@ global panic:
|
||||
%endmacro
|
||||
|
||||
%macro assert_eq_const(c)
|
||||
%eq_const($c)
|
||||
%assert_nonzero
|
||||
PUSH $c
|
||||
SUB
|
||||
%jumpi(panic)
|
||||
%endmacro
|
||||
|
||||
%macro assert_lt_const(c)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user