mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-09 17:23:08 +00:00
restored neq macro
This commit is contained in:
parent
be9cbd5a81
commit
1a78f40050
@ -50,6 +50,14 @@
|
||||
%endrep
|
||||
%endmacro
|
||||
|
||||
%macro neq
|
||||
// stack: x, y
|
||||
EQ
|
||||
// stack: x == y
|
||||
ISZERO
|
||||
// stack: x != y
|
||||
%endmacro
|
||||
|
||||
%macro and_const(c)
|
||||
// stack: input, ...
|
||||
PUSH $c
|
||||
@ -345,3 +353,28 @@
|
||||
%endrep
|
||||
// stack: a || b || c || d
|
||||
%endmacro
|
||||
|
||||
// Charge gas.
|
||||
%macro charge_gas
|
||||
// stack: gas, kexit_info
|
||||
%shl_const(192)
|
||||
ADD
|
||||
// stack: kexit_info'
|
||||
%endmacro
|
||||
|
||||
// Charge a constant amount of gas.
|
||||
%macro charge_gas_const(gas)
|
||||
// stack: kexit_info
|
||||
PUSH $gas
|
||||
// stack: gas, kexit_info
|
||||
%charge_gas
|
||||
// stack: kexit_info'
|
||||
%endmacro
|
||||
|
||||
// Charge gas and exit kernel code.
|
||||
%macro charge_gas_and_exit
|
||||
// stack: gas, kexit_info
|
||||
%charge_gas
|
||||
// stack: kexit_info'
|
||||
EXIT_KERNEL
|
||||
%endmacro
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user