> For the complete documentation index, see [llms.txt](https://validium.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://validium.gitbook.io/docs/components/compiler/specification/instructions/instruction-reference.md).

# Instruction Reference

***

In this specification, instructions are grouped by their relevance to the EVM instruction set:

* [Native EVM instructions](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evm).
* [Yul auxiliary instructions](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/yul).
* [EVM legacy assembly auxiliary instructions](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evmla).

Most of the EVM native instructions are represented in both Yul and EVM legacy assembly IRs. If they are not, it is stated explicitly in the description of each instruction.

### Addressing modes <a href="#addressing-modes" id="addressing-modes"></a>

EraVM is a register-based virtual machine with different addressing modes. It overrides all stack mechanics described in [the original EVM opcodes documentation](https://www.evm.codes/) including errors they produce on EVM.

### Solidity Intermediate Representations (IRs) <a href="#solidity-intermediate-representations-irs" id="solidity-intermediate-representations-irs"></a>

Every instruction is translated via two IRs available in the Solidity compiler unless stated otherwise:

1. Yul
2. EVM legacy assembly

### Yul Extensions <a href="#yul-extensions" id="yul-extensions"></a>

At the moment there is no way of adding  Validium Network-specific instructions to Yul as long as we use the official Solidity compiler, which would produce an error on an unknown instruction.

There are two ways of supporting such instructions: one for Solidity and one for Yul.

#### The Solidity Mode <a href="#the-solidity-mode" id="the-solidity-mode"></a>

In Solidity we have introduced **call simulations**. They are not actual calls, as they are substituted by our Yul translator with the needed instruction, depending on the constant address. This way the Solidity compiler is not optimizing them out and is not emitting compilation errors.

The reference of such extensions is coming soon.

#### The Yul Mode <a href="#the-yul-mode" id="the-yul-mode"></a>

The non-call  Validium Network-specific instructions are only available in the Yul mode of **zksolc**. To have better compatibility, they are implemented as `verbatim` instructions with some predefined keys.

The reference of such extensions is coming soon.

<br>
