Arithmetic
ADD
Original EVM instruction.
LLVM IR
%addition_result = add i256 %value1, %value2The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
EraVM Assembly
add r1, r2, r1For more detail, see the EraVM specification reference
MUL
Original EVM instruction.
The carry is written to the 2nd output register
LLVM IR
EraVM can output the carry of the multiplication operation. In this case, the result is a tuple of two values: the multiplication result and the carry. The carry is written to the 2nd output register. The snippet below returns the carry value.
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
EraVM Assembly
For more detail, see the EraVM specification reference
SUB
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
EraVM Assembly
For more detail, see the EraVM specification reference
DIV
Original EVM instruction.
The remainder is written to the 2nd output register
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
For more detail, see the EraVM specification reference
SDIV
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
EraVM does not have a similar instruction.
MOD
Original EVM instruction.
The remainder is written to the 2nd output register
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
For more detail, see the EraVM specification reference
SMOD
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
LLVM IR instruction documentation
EraVM does not have a similar instruction.
ADDMOD
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM does not have a similar instruction.
MULMOD
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM does not have a similar instruction.
EXP
Original EVM instruction.
LLVM IR
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM does not have a similar instruction.
SIGNEXTEND
Original EVM instruction.
The LLVM IR generator code is common for Yul and EVMLA representations.
EraVM does not have a similar instruction.
Last updated