# EVM Legacy Assembly

***

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

### PUSH $ <a href="#push" id="push"></a>

The same as [datasize](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul#datasize).

LLVM IR codegen references:

1. [zksolc compiler](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L144)
2. [Shared FE code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/zkevm/evm/create.rs#L149)

### PUSH #$ <a href="#push-1" id="push-1"></a>

The same as [dataoffset](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul#dataoffset).

LLVM IR codegen references:

1. [zksolc compiler](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L135)
2. [Shared FE code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/zkevm/evm/create.rs#L97)

### ASSIGNIMMUTABLE <a href="#assignimmutable" id="assignimmutable"></a>

The same as [setimmutable](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul#setimmutable).

For more information, see the [Differences with Ethereum](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

1. [zksolc compiler](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L760)
2. [Shared FE code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/zkevm/evm/immutable.rs#L79)

### PUSHIMMUTABLE <a href="#pushimmutable" id="pushimmutable"></a>

The same as [loadimmutable](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul#loadimmutable).

For more information, see the [Differences with Ethereum](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#setimmutable-loadimmutable).

LLVM IR codegen references:

1. [zksolc compiler](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L747)
2. [Shared FE code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/zkevm/evm/immutable.rs#L17)

### PUSHLIB <a href="#pushlib" id="pushlib"></a>

The same as [linkersymbol](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul#linkersymbol).

For more information, see the [Differences with Ethereum](https://docs.zksync.io/build/developer-reference/ethereum-differences/libraries).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/yul/parser/statement/expression/function_call/mod.rs#L956).

### PUSHDEPLOYADDRESS <a href="#pushdeployaddress" id="pushdeployaddress"></a>

Returns the address the contract is deployed to.

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/yul/parser/statement/expression/function_call/mod.rs#L956).

### PUSHSIZE <a href="#pushsize" id="pushsize"></a>

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

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

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/yul/parser/statement/expression/function_call/mod.rs#L907).

### PUSH data <a href="#push-data" id="push-data"></a>

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

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/ethereal_ir/function/block/element/mod.rs#L164).

### PUSH tag <a href="#push-tag" id="push-tag"></a>

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

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-solidity/blob/main/src/evmla/assembly/instruction/stack.rs#L31).

### Tag <a href="#tag" id="tag"></a>

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

<br>
