EVM Legacy Assembly

These instructions do not have a direct representation in EVM or ZKsync VM. Instead, they perform auxiliary operations required for generating the target bytecode.

PUSH $

The same as datasize.

LLVM IR codegen references:

  1. zksolc compiler
  2. Shared FE code

PUSH #$

The same as dataoffset.

LLVM IR codegen references:

  1. zksolc compiler
  2. Shared FE code

ASSIGNIMMUTABLE

The same as setimmutable.

For more information, see the Differences with Ethereum.

LLVM IR codegen references:

  1. zksolc compiler
  2. Shared FE code

PUSHIMMUTABLE

The same as loadimmutable.

For more information, see the Differences with Ethereum.

LLVM IR codegen references:

  1. zksolc compiler
  2. Shared FE code

PUSHLIB

The same as linkersymbol.

For more information, see the Differences with Ethereum.

The LLVM IR generator code.

PUSHDEPLOYADDRESS

Returns the address the contract is deployed to.

The LLVM IR generator code.

PUSHSIZE

Can be only found in deploy code. On EVM, returns the total size of the runtime code and constructor arguments.

On ZKsync VM, it is always 0, since ZKsync VM does not operate on runtime code in deploy code.

The LLVM IR generator code.

PUSH data

Pushes a data chunk onto the stack. Data chunks are resolved during the processing of input assembly JSON.

The LLVM IR generator code.

PUSH tag

Pushes an EVM Legacy Assembly destination block identifier onto the stack.

The LLVM IR generator code.

Tag

Starts a new EVM Legacy Assembly block. Tags are processed during the translation of EVM Legacy Assembly into EthIR.


Made with ❤️ by the ZKsync Community