# Return

***

### STOP <a href="#stop" id="stop"></a>

Original [EVM](https://www.evm.codes/#00?fork=shanghai) instruction.

This instruction is a [RETURN](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evm/return#return) with an empty data payload.

#### LLVM IR <a href="#llvm-ir" id="llvm-ir"></a>

The same as for [RETURN](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evm/return#return).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/evm/return.rs#L103) is common for Yul and EVMLA representations.

### RETURN <a href="#return" id="return"></a>

Original [EVM](https://www.evm.codes/#f3?fork=shanghai) instruction.

This instruction works differently in deploy code. For more information, see [the ZKsync Era documentation](https://docs.zksync.io/build/developer-reference/ethereum-differences/evm-instructions#return-stop).

#### LLVM IR <a href="#llvm-ir-1" id="llvm-ir-1"></a>

```llvm
define void @__return(i256 %0, i256 %1, i256 %2) "noinline-oz" #5 personality i32()* @__personality {
entry:
  %abi = call i256@__aux_pack_abi(i256 %0, i256 %1, i256 %2)
  tail call void @llvm.syncvm.return(i256 %abi)
  unreachable
}
```

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/evm/return.rs#L16) is common for Yul and EVMLA representations.

### REVERT <a href="#revert" id="revert"></a>

Original [EVM](https://www.evm.codes/#fd?fork=shanghai) instruction.

#### LLVM IR <a href="#llvm-ir-2" id="llvm-ir-2"></a>

```llvm
define void @__revert(i256 %0, i256 %1, i256 %2) "noinline-oz" #5 personality i32()* @__personality {
entry:
  %abi = call i256@__aux_pack_abi(i256 %0, i256 %1, i256 %2)
  tail call void @llvm.syncvm.revert(i256 %abi)
  unreachable
}
```

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/evm/return.rs#L86) is common for Yul and EVMLA representations.

#### EraVM <a href="#eravm" id="eravm"></a>

See also EraVM instruction `revert`: [when returning from near calls](https://matter-labs.github.io/eravm-spec/spec.html#NearRevertDefinition) and [when returning from far calls](https://matter-labs.github.io/eravm-spec/spec.html#FarRevertDefinition).

### INVALID <a href="#invalid" id="invalid"></a>

Original [EVM](https://www.evm.codes/#fe?fork=shanghai) instruction.

This instruction is a [REVERT](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evm/return#revert) with an empty data payload, but it also burns all the available gas.

#### LLVM IR <a href="#llvm-ir-3" id="llvm-ir-3"></a>

The same as for [REVERT](https://docs.zksync.io/zk-stack/components/compiler/specification/instructions/evm/return#revert).

[The LLVM IR generator code](https://github.com/matter-labs/era-compiler-llvm-context/blob/main/src/eravm/evm/return.rs#L115) is common for Yul and EVMLA representations.

#### EraVM <a href="#eravm-1" id="eravm-1"></a>

See also EraVM instruction `revert`: [when returning from near calls](https://matter-labs.github.io/eravm-spec/spec.html#NearRevertDefinition) and [when returning from far calls](https://matter-labs.github.io/eravm-spec/spec.html#FarRevertDefinition).

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://validium.gitbook.io/docs/components/compiler/specification/instructions/evm/return.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
