# `tail`

[RISC-V Documentation](https://asm-editor.specy.app/documentation/risc-v.md) › [Instructions](https://asm-editor.specy.app/documentation/risc-v/instruction.md)

Web page: https://asm-editor.specy.app/documentation/risc-v/instruction/tail

**Tail call** · Pseudo-instruction

Category: Control flow

Jumps to the far-away subroutine at label without saving a return address.

[RISC-V manual: jalr](https://docs.riscv.org/reference/isa/v20260120/unpriv/rv32.html#norm:jalr_op)

## Forms

- `tail label`
  - `tail label` → `auipc t1, pcrel_hi(label)`; `jalr zero, t1, pcrel_lo(label)`

## Operands

- `label`: A named address in the program, such as the start of a loop or a variable in `.data`.

## Example

```riscv
# tail transfers to done without saving a new return address. ra starts at 123 and t2 copies it after the jump.
.text
li ra, 123
tail done
li t2, 100
done:
mv t2, ra
# t2=123 shows that tail left ra unchanged.
```
