restored neq macro

This commit is contained in:
Nicholas Ward 2023-03-20 14:34:17 -07:00
parent be9cbd5a81
commit 1a78f40050

View File

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