# RISC-V Instructions

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

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

Every instruction and pseudo-instruction of RV32 and RV64.

263 entries, each with its own page of markdown:

## Data movement

- [`auipc`](https://asm-editor.specy.app/documentation/risc-v/instruction/auipc.md) `t1, imm20`: Adds an upper 20-bit immediate, shifted left by 12 bits, to the PC and stores the result in a register.
- [`la`](https://asm-editor.specy.app/documentation/risc-v/instruction/la.md) `t1, label` (Pseudo-instruction): Loads the address of label into a register.
- [`li`](https://asm-editor.specy.app/documentation/risc-v/instruction/li.md) `t1, imm` (Pseudo-instruction): Loads an immediate constant into a register, using as many instructions as the value needs.
- [`lui`](https://asm-editor.specy.app/documentation/risc-v/instruction/lui.md) `t1, imm20`: Sets a register to a 20-bit immediate followed by 12 zero bits.
- [`mv`](https://asm-editor.specy.app/documentation/risc-v/instruction/mv.md) `t1, t2` (Pseudo-instruction): Copies the value of the second register into the first.

## Load and store

- [`lb`](https://asm-editor.specy.app/documentation/risc-v/instruction/lb.md) `t1, imm12(t2)`: Loads the byte at the address in the second register plus an offset into the first, sign-extended to the register width.
- [`lbu`](https://asm-editor.specy.app/documentation/risc-v/instruction/lbu.md) `t1, imm12(t2)`: Loads the byte at the address in the second register plus an offset into the first, zero-extended to the register width.
- [`ld`](https://asm-editor.specy.app/documentation/risc-v/instruction/ld.md) `t1, imm12(t2)` (RV64 only): Loads the 64-bit double word at the address in the second register plus an offset into the first.
- [`lh`](https://asm-editor.specy.app/documentation/risc-v/instruction/lh.md) `t1, imm12(t2)`: Loads the 16-bit halfword at the address in the second register plus an offset into the first, sign-extended to the register width.
- [`lhu`](https://asm-editor.specy.app/documentation/risc-v/instruction/lhu.md) `t1, imm12(t2)`: Loads the 16-bit halfword at the address in the second register plus an offset into the first, zero-extended to the register width.
- [`lw`](https://asm-editor.specy.app/documentation/risc-v/instruction/lw.md) `t1, imm12(t2)`: Loads the 32-bit word at the address in the second register plus an offset into the first, sign-extended on RV64.
- [`lwu`](https://asm-editor.specy.app/documentation/risc-v/instruction/lwu.md) `t1, imm12(t2)` (RV64 only): Loads the 32-bit word at the address in the second register plus an offset into the first, zero-extended to 64 bits.
- [`sb`](https://asm-editor.specy.app/documentation/risc-v/instruction/sb.md) `t1, imm12(t2)`: Stores the low 8 bits of the first register at the address in the second plus an offset.
- [`sd`](https://asm-editor.specy.app/documentation/risc-v/instruction/sd.md) `t1, imm12(t2)` (RV64 only): Stores the 64-bit value of the first register at the address in the second plus an offset.
- [`sh`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh.md) `t1, imm12(t2)`: Stores the low 16 bits of the first register at the address in the second plus an offset.
- [`sw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sw.md) `t1, imm12(t2)`: Stores the low 32 bits of the first register at the address in the second plus an offset.

## Arithmetic

- [`add`](https://asm-editor.specy.app/documentation/risc-v/instruction/add.md) `t1, t2, t3`: Adds the second and third registers and stores the sum in the first.
- [`add.uw`](https://asm-editor.specy.app/documentation/risc-v/instruction/add.uw.md) `t1, t2, t3` (RV64 only): Sets the first register to the low 32 bits of the second, zero-extended, plus the third.
- [`addi`](https://asm-editor.specy.app/documentation/risc-v/instruction/addi.md) `t1, t2, imm12`: Adds a sign-extended 12-bit immediate to the second register and stores the sum in the first.
- [`addiw`](https://asm-editor.specy.app/documentation/risc-v/instruction/addiw.md) `t1, t2, imm12` (RV64 only): Adds a signed 12-bit immediate to the low 32 bits of the second register and sign-extends the sum into the first.
- [`addw`](https://asm-editor.specy.app/documentation/risc-v/instruction/addw.md) `t1, t2, t3` (RV64 only): Adds the low 32 bits of the second and third registers and sign-extends the 32-bit sum into the first.
- [`div`](https://asm-editor.specy.app/documentation/risc-v/instruction/div.md) `t1, t2, t3`: Divides the second register by the third as signed integers and stores the quotient in the first.
- [`divu`](https://asm-editor.specy.app/documentation/risc-v/instruction/divu.md) `t1, t2, t3`: Divides the second register by the third as unsigned integers and stores the quotient in the first.
- [`divuw`](https://asm-editor.specy.app/documentation/risc-v/instruction/divuw.md) `t1, t2, t3` (RV64 only): Divides the low 32 bits of the second register by those of the third as unsigned values and sign-extends the quotient into the first.
- [`divw`](https://asm-editor.specy.app/documentation/risc-v/instruction/divw.md) `t1, t2, t3` (RV64 only): Divides the low 32 bits of the second register by those of the third as signed values and sign-extends the quotient into the first.
- [`max`](https://asm-editor.specy.app/documentation/risc-v/instruction/max.md) `t1, t2, t3`: Sets the first register to the larger of the second and third, comparing as signed.
- [`maxu`](https://asm-editor.specy.app/documentation/risc-v/instruction/maxu.md) `t1, t2, t3`: Sets the first register to the larger of the second and third, comparing as unsigned.
- [`min`](https://asm-editor.specy.app/documentation/risc-v/instruction/min.md) `t1, t2, t3`: Sets the first register to the smaller of the second and third, comparing as signed.
- [`minu`](https://asm-editor.specy.app/documentation/risc-v/instruction/minu.md) `t1, t2, t3`: Sets the first register to the smaller of the second and third, comparing as unsigned.
- [`mul`](https://asm-editor.specy.app/documentation/risc-v/instruction/mul.md) `t1, t2, t3`: Multiplies the second register by the third and stores the low register-width bits of the product in the first.
- [`mulh`](https://asm-editor.specy.app/documentation/risc-v/instruction/mulh.md) `t1, t2, t3`: Multiplies the second register by the third, both signed, and stores the high register-width bits of the product in the first.
- [`mulhsu`](https://asm-editor.specy.app/documentation/risc-v/instruction/mulhsu.md) `t1, t2, t3`: Multiplies the second register, as signed, by the third, as unsigned, and stores the high register-width bits of the product in the first.
- [`mulhu`](https://asm-editor.specy.app/documentation/risc-v/instruction/mulhu.md) `t1, t2, t3`: Multiplies the second register by the third, both unsigned, and stores the high register-width bits of the product in the first.
- [`mulw`](https://asm-editor.specy.app/documentation/risc-v/instruction/mulw.md) `t1, t2, t3` (RV64 only): Multiplies the low 32 bits of the second and third registers and sign-extends the low 32 bits of the product into the first.
- [`neg`](https://asm-editor.specy.app/documentation/risc-v/instruction/neg.md) `t1, t2` (Pseudo-instruction): Sets the first register to the arithmetic negation of the second.
- [`negw`](https://asm-editor.specy.app/documentation/risc-v/instruction/negw.md) `t1, t2` (Pseudo-instruction, RV64 only): Sets the first register to the negation of the low 32 bits of the second, sign-extended.
- [`rem`](https://asm-editor.specy.app/documentation/risc-v/instruction/rem.md) `t1, t2, t3`: Sets the first register to the remainder of the second divided by the third, as signed integers.
- [`remu`](https://asm-editor.specy.app/documentation/risc-v/instruction/remu.md) `t1, t2, t3`: Sets the first register to the remainder of the second divided by the third, as unsigned integers.
- [`remuw`](https://asm-editor.specy.app/documentation/risc-v/instruction/remuw.md) `t1, t2, t3` (RV64 only): Sets the first register to the remainder of the low 32 bits of the second divided by those of the third, as unsigned values, sign-extended.
- [`remw`](https://asm-editor.specy.app/documentation/risc-v/instruction/remw.md) `t1, t2, t3` (RV64 only): Sets the first register to the remainder of the low 32 bits of the second divided by those of the third, as signed values, sign-extended.
- [`sext.b`](https://asm-editor.specy.app/documentation/risc-v/instruction/sext.b.md) `t1, t2`: Sets the first register to the low byte of the second, sign-extended to the register width.
- [`sext.h`](https://asm-editor.specy.app/documentation/risc-v/instruction/sext.h.md) `t1, t2`: Sets the first register to the low 16 bits of the second, sign-extended to the register width.
- [`sext.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/sext.w.md) `t1, t2` (Pseudo-instruction, RV64 only): Sets the first register to the low 32 bits of the second, sign-extended to 64 bits.
- [`sh1add`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh1add.md) `t1, t2, t3`: Sets the first register to the second shifted left by 1, plus the third.
- [`sh1add.uw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh1add.uw.md) `t1, t2, t3` (RV64 only): Sets the first register to the low 32 bits of the second, zero-extended and shifted left by 1, plus the third.
- [`sh2add`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh2add.md) `t1, t2, t3`: Sets the first register to the second shifted left by 2, plus the third.
- [`sh2add.uw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh2add.uw.md) `t1, t2, t3` (RV64 only): Sets the first register to the low 32 bits of the second, zero-extended and shifted left by 2, plus the third.
- [`sh3add`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh3add.md) `t1, t2, t3`: Sets the first register to the second shifted left by 3, plus the third.
- [`sh3add.uw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sh3add.uw.md) `t1, t2, t3` (RV64 only): Sets the first register to the low 32 bits of the second, zero-extended and shifted left by 3, plus the third.
- [`sub`](https://asm-editor.specy.app/documentation/risc-v/instruction/sub.md) `t1, t2, t3`: Subtracts the third register from the second and stores the difference in the first.
- [`subw`](https://asm-editor.specy.app/documentation/risc-v/instruction/subw.md) `t1, t2, t3` (RV64 only): Subtracts the third register from the low 32 bits of the second and sign-extends the 32-bit difference into the first.
- [`zext.b`](https://asm-editor.specy.app/documentation/risc-v/instruction/zext.b.md) `t1, t2` (Pseudo-instruction): Sets the first register to the low byte of the second, with the rest of the register cleared.
- [`zext.h`](https://asm-editor.specy.app/documentation/risc-v/instruction/zext.h.md) `t1, t2`: Sets the first register to the low 16 bits of the second, with the rest of the register cleared.
- [`zext.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/zext.w.md) `t1, t2` (Pseudo-instruction, RV64 only): Sets the first register to the low 32 bits of the second, zero-extended.

## Logic

- [`and`](https://asm-editor.specy.app/documentation/risc-v/instruction/and.md) `t1, t2, t3`: Sets the first register to the bitwise AND of the second and third.
- [`andi`](https://asm-editor.specy.app/documentation/risc-v/instruction/andi.md) `t1, t2, imm12`: Sets the first register to the bitwise AND of the second and a sign-extended 12-bit immediate.
- [`andn`](https://asm-editor.specy.app/documentation/risc-v/instruction/andn.md) `t1, t2, t3`: Sets the first register to the bitwise AND of the second and the bitwise NOT of the third.
- [`bclr`](https://asm-editor.specy.app/documentation/risc-v/instruction/bclr.md) `t1, t2, t3`: Copies the second register into the first with one bit cleared: the bit whose index is in the low bits of the third.
- [`bclri`](https://asm-editor.specy.app/documentation/risc-v/instruction/bclri.md) `t1, t2, imm6`: Copies the second register into the first with the bit numbered by the immediate cleared.
- [`bext`](https://asm-editor.specy.app/documentation/risc-v/instruction/bext.md) `t1, t2, t3`: Sets the first register to the value, 0 or 1, of one bit of the second: the bit whose index is in the low bits of the third.
- [`bexti`](https://asm-editor.specy.app/documentation/risc-v/instruction/bexti.md) `t1, t2, imm6`: Sets the first register to the value, 0 or 1, of the bit of the second numbered by the immediate.
- [`binv`](https://asm-editor.specy.app/documentation/risc-v/instruction/binv.md) `t1, t2, t3`: Copies the second register into the first with one bit flipped: the bit whose index is in the low bits of the third.
- [`binvi`](https://asm-editor.specy.app/documentation/risc-v/instruction/binvi.md) `t1, t2, imm6`: Copies the second register into the first with the bit numbered by the immediate flipped.
- [`bset`](https://asm-editor.specy.app/documentation/risc-v/instruction/bset.md) `t1, t2, t3`: Copies the second register into the first with one bit set: the bit whose index is in the low bits of the third.
- [`bseti`](https://asm-editor.specy.app/documentation/risc-v/instruction/bseti.md) `t1, t2, imm6`: Copies the second register into the first with the bit numbered by the immediate set.
- [`clz`](https://asm-editor.specy.app/documentation/risc-v/instruction/clz.md) `t1, t2`: Sets the first register to the number of 0 bits above the most significant 1 bit of the second, or the register width when the second is zero.
- [`clzw`](https://asm-editor.specy.app/documentation/risc-v/instruction/clzw.md) `t1, t2` (RV64 only): Sets the first register to the number of 0 bits above the most significant 1 bit of the low 32 bits of the second, or 32 when they are zero.
- [`cpop`](https://asm-editor.specy.app/documentation/risc-v/instruction/cpop.md) `t1, t2`: Sets the first register to the number of 1 bits in the second.
- [`cpopw`](https://asm-editor.specy.app/documentation/risc-v/instruction/cpopw.md) `t1, t2` (RV64 only): Sets the first register to the number of 1 bits in the low 32 bits of the second.
- [`ctz`](https://asm-editor.specy.app/documentation/risc-v/instruction/ctz.md) `t1, t2`: Sets the first register to the number of 0 bits below the least significant 1 bit of the second, or the register width when the second is zero.
- [`ctzw`](https://asm-editor.specy.app/documentation/risc-v/instruction/ctzw.md) `t1, t2` (RV64 only): Sets the first register to the number of 0 bits below the least significant 1 bit of the low 32 bits of the second, or 32 when they are zero.
- [`not`](https://asm-editor.specy.app/documentation/risc-v/instruction/not.md) `t1, t2` (Pseudo-instruction): Sets the first register to the bitwise NOT of the second, flipping every bit.
- [`or`](https://asm-editor.specy.app/documentation/risc-v/instruction/or.md) `t1, t2, t3`: Sets the first register to the bitwise OR of the second and third.
- [`orc.b`](https://asm-editor.specy.app/documentation/risc-v/instruction/orc.b.md) `t1, t2`: Sets each byte of the first register to all 1 bits if the matching byte of the second is nonzero, and to 0 otherwise.
- [`ori`](https://asm-editor.specy.app/documentation/risc-v/instruction/ori.md) `t1, t2, imm12`: Sets the first register to the bitwise OR of the second and a sign-extended 12-bit immediate.
- [`orn`](https://asm-editor.specy.app/documentation/risc-v/instruction/orn.md) `t1, t2, t3`: Sets the first register to the bitwise OR of the second and the bitwise NOT of the third.
- [`rev8`](https://asm-editor.specy.app/documentation/risc-v/instruction/rev8.md) `t1, t2`: Copies the second register into the first with its bytes in reverse order, converting between little and big endian.
- [`xnor`](https://asm-editor.specy.app/documentation/risc-v/instruction/xnor.md) `t1, t2, t3`: Sets the first register to the bitwise NOT of the XOR of the second and third, so each bit is 1 where they agree.
- [`xor`](https://asm-editor.specy.app/documentation/risc-v/instruction/xor.md) `t1, t2, t3`: Sets the first register to the bitwise XOR of the second and third.
- [`xori`](https://asm-editor.specy.app/documentation/risc-v/instruction/xori.md) `t1, t2, imm12`: Sets the first register to the bitwise XOR of the second and a sign-extended 12-bit immediate.

## Shifts and rotates

- [`rol`](https://asm-editor.specy.app/documentation/risc-v/instruction/rol.md) `t1, t2, t3`: Rotates the second register left by the amount in the low bits of the third and stores the result in the first.
- [`rolw`](https://asm-editor.specy.app/documentation/risc-v/instruction/rolw.md) `t1, t2, t3` (RV64 only): Rotates the low 32 bits of the second register left by the low 5 bits of the third and sign-extends the result into the first.
- [`ror`](https://asm-editor.specy.app/documentation/risc-v/instruction/ror.md) `t1, t2, t3`: Rotates the second register right by the amount in the low bits of the third and stores the result in the first.
- [`rori`](https://asm-editor.specy.app/documentation/risc-v/instruction/rori.md) `t1, t2, imm6`: Rotates the second register right by an immediate amount and stores the result in the first.
- [`roriw`](https://asm-editor.specy.app/documentation/risc-v/instruction/roriw.md) `t1, t2, imm5` (RV64 only): Rotates the low 32 bits of the second register right by an immediate amount and sign-extends the result into the first.
- [`rorw`](https://asm-editor.specy.app/documentation/risc-v/instruction/rorw.md) `t1, t2, t3` (RV64 only): Rotates the low 32 bits of the second register right by the low 5 bits of the third and sign-extends the result into the first.
- [`sll`](https://asm-editor.specy.app/documentation/risc-v/instruction/sll.md) `t1, t2, t3`: Shifts the second register left by the amount in the low 5 bits of the third (6 on RV64) and stores the result in the first.
- [`slli`](https://asm-editor.specy.app/documentation/risc-v/instruction/slli.md) `t1, t2, imm6`: Shifts the second register left by an immediate amount and stores the result in the first.
- [`slli.uw`](https://asm-editor.specy.app/documentation/risc-v/instruction/slli.uw.md) `t1, t2, imm5` (RV64 only): Sets the first register to the low 32 bits of the second, zero-extended and shifted left by an immediate amount.
- [`slliw`](https://asm-editor.specy.app/documentation/risc-v/instruction/slliw.md) `t1, t2, imm5` (RV64 only): Shifts the low 32 bits of the second register left by an immediate amount and sign-extends the result into the first.
- [`sllw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sllw.md) `t1, t2, t3` (RV64 only): Shifts the low 32 bits of the second register left by the amount in the low 5 bits of the third and sign-extends the result into the first.
- [`sra`](https://asm-editor.specy.app/documentation/risc-v/instruction/sra.md) `t1, t2, t3`: Shifts the second register right by the amount in the low 5 bits of the third (6 on RV64), filling with the sign bit, and stores the result in the first.
- [`srai`](https://asm-editor.specy.app/documentation/risc-v/instruction/srai.md) `t1, t2, imm6`: Shifts the second register right by an immediate amount, filling with the sign bit, and stores the result in the first.
- [`sraiw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sraiw.md) `t1, t2, imm5` (RV64 only): Shifts the low 32 bits of the second register right by an immediate amount, filling with the sign bit, and sign-extends into the first.
- [`sraw`](https://asm-editor.specy.app/documentation/risc-v/instruction/sraw.md) `t1, t2, t3` (RV64 only): Shifts the low 32 bits of the second register right by the amount in the low 5 bits of the third, filling with the sign bit, and sign-extends into the first.
- [`srl`](https://asm-editor.specy.app/documentation/risc-v/instruction/srl.md) `t1, t2, t3`: Shifts the second register right by the amount in the low 5 bits of the third (6 on RV64), filling with zeros, and stores the result in the first.
- [`srli`](https://asm-editor.specy.app/documentation/risc-v/instruction/srli.md) `t1, t2, imm6`: Shifts the second register right by an immediate amount, filling with zeros, and stores the result in the first.
- [`srliw`](https://asm-editor.specy.app/documentation/risc-v/instruction/srliw.md) `t1, t2, imm5` (RV64 only): Shifts the low 32 bits of the second register right by an immediate amount, filling with zeros, and sign-extends the result into the first.
- [`srlw`](https://asm-editor.specy.app/documentation/risc-v/instruction/srlw.md) `t1, t2, t3` (RV64 only): Shifts the low 32 bits of the second register right by the amount in the low 5 bits of the third, filling with zeros, and sign-extends into the first.

## Comparison

- [`seqz`](https://asm-editor.specy.app/documentation/risc-v/instruction/seqz.md) `t1, t2` (Pseudo-instruction): Sets the first register to 1 if the second is zero, otherwise to 0.
- [`sgt`](https://asm-editor.specy.app/documentation/risc-v/instruction/sgt.md) `t1, t2, t3` (Pseudo-instruction): Sets the first register to 1 if the second is greater than the third as signed integers, otherwise to 0.
- [`sgtu`](https://asm-editor.specy.app/documentation/risc-v/instruction/sgtu.md) `t1, t2, t3` (Pseudo-instruction): Sets the first register to 1 if the second is greater than the third as unsigned integers, otherwise to 0.
- [`sgtz`](https://asm-editor.specy.app/documentation/risc-v/instruction/sgtz.md) `t1, t2` (Pseudo-instruction): Sets the first register to 1 if the second is greater than zero, otherwise to 0.
- [`slt`](https://asm-editor.specy.app/documentation/risc-v/instruction/slt.md) `t1, t2, t3`: Sets the first register to 1 if the second is less than the third as signed integers, otherwise to 0.
- [`slti`](https://asm-editor.specy.app/documentation/risc-v/instruction/slti.md) `t1, t2, imm12`: Sets the first register to 1 if the second is less than a sign-extended 12-bit immediate as signed, otherwise to 0.
- [`sltiu`](https://asm-editor.specy.app/documentation/risc-v/instruction/sltiu.md) `t1, t2, imm12`: Sets the first register to 1 if the second is less than a sign-extended 12-bit immediate as unsigned, otherwise to 0.
- [`sltu`](https://asm-editor.specy.app/documentation/risc-v/instruction/sltu.md) `t1, t2, t3`: Sets the first register to 1 if the second is less than the third as unsigned integers, otherwise to 0.
- [`sltz`](https://asm-editor.specy.app/documentation/risc-v/instruction/sltz.md) `t1, t2` (Pseudo-instruction): Sets the first register to 1 if the second is less than zero, otherwise to 0.
- [`snez`](https://asm-editor.specy.app/documentation/risc-v/instruction/snez.md) `t1, t2` (Pseudo-instruction): Sets the first register to 1 if the second is nonzero, otherwise to 0.

## Control flow

- [`b`](https://asm-editor.specy.app/documentation/risc-v/instruction/b.md) `label` (Pseudo-instruction): Branches unconditionally to label.
- [`beq`](https://asm-editor.specy.app/documentation/risc-v/instruction/beq.md) `t1, t2, label`: Branches to label if the two registers are equal.
- [`beqz`](https://asm-editor.specy.app/documentation/risc-v/instruction/beqz.md) `t1, label` (Pseudo-instruction): Branches to label if the register is zero.
- [`bge`](https://asm-editor.specy.app/documentation/risc-v/instruction/bge.md) `t1, t2, label`: Branches to label if the first register is greater than or equal to the second, comparing as signed.
- [`bgeu`](https://asm-editor.specy.app/documentation/risc-v/instruction/bgeu.md) `t1, t2, label`: Branches to label if the first register is greater than or equal to the second, comparing as unsigned.
- [`bgez`](https://asm-editor.specy.app/documentation/risc-v/instruction/bgez.md) `t1, label` (Pseudo-instruction): Branches to label if the register is greater than or equal to zero.
- [`bgt`](https://asm-editor.specy.app/documentation/risc-v/instruction/bgt.md) `t1, t2, label` (Pseudo-instruction): Branches to label if the first register is greater than the second, comparing as signed.
- [`bgtu`](https://asm-editor.specy.app/documentation/risc-v/instruction/bgtu.md) `t1, t2, label` (Pseudo-instruction): Branches to label if the first register is greater than the second, comparing as unsigned.
- [`bgtz`](https://asm-editor.specy.app/documentation/risc-v/instruction/bgtz.md) `t1, label` (Pseudo-instruction): Branches to label if the register is greater than zero.
- [`ble`](https://asm-editor.specy.app/documentation/risc-v/instruction/ble.md) `t1, t2, label` (Pseudo-instruction): Branches to label if the first register is less than or equal to the second, comparing as signed.
- [`bleu`](https://asm-editor.specy.app/documentation/risc-v/instruction/bleu.md) `t1, t2, label` (Pseudo-instruction): Branches to label if the first register is less than or equal to the second, comparing as unsigned.
- [`blez`](https://asm-editor.specy.app/documentation/risc-v/instruction/blez.md) `t1, label` (Pseudo-instruction): Branches to label if the register is less than or equal to zero.
- [`blt`](https://asm-editor.specy.app/documentation/risc-v/instruction/blt.md) `t1, t2, label`: Branches to label if the first register is less than the second, comparing as signed.
- [`bltu`](https://asm-editor.specy.app/documentation/risc-v/instruction/bltu.md) `t1, t2, label`: Branches to label if the first register is less than the second, comparing as unsigned.
- [`bltz`](https://asm-editor.specy.app/documentation/risc-v/instruction/bltz.md) `t1, label` (Pseudo-instruction): Branches to label if the register is less than zero.
- [`bne`](https://asm-editor.specy.app/documentation/risc-v/instruction/bne.md) `t1, t2, label`: Branches to label if the two registers are not equal.
- [`bnez`](https://asm-editor.specy.app/documentation/risc-v/instruction/bnez.md) `t1, label` (Pseudo-instruction): Branches to label if the register is nonzero.
- [`call`](https://asm-editor.specy.app/documentation/risc-v/instruction/call.md) `label` (Pseudo-instruction): Calls the subroutine at label, even when it is too far away for a single jump, and saves the return address in ra.
- [`j`](https://asm-editor.specy.app/documentation/risc-v/instruction/j.md) `label` (Pseudo-instruction): Jumps to label.
- [`jal`](https://asm-editor.specy.app/documentation/risc-v/instruction/jal.md) `t1, label`: Saves the return address in a register and jumps to label, or saves it in ra when only a label is given.
- [`jalr`](https://asm-editor.specy.app/documentation/risc-v/instruction/jalr.md) `t1, t2, imm12`: Saves the return address in the first register and jumps to the address in the second plus an offset, or with one register links through ra.
- [`jr`](https://asm-editor.specy.app/documentation/risc-v/instruction/jr.md) `t0 | t0, imm12` (Pseudo-instruction): Jumps to the address held in a register.
- [`ret`](https://asm-editor.specy.app/documentation/risc-v/instruction/ret.md) (Pseudo-instruction): Returns from a subroutine by jumping to the address in ra.
- [`tail`](https://asm-editor.specy.app/documentation/risc-v/instruction/tail.md) `label` (Pseudo-instruction): Jumps to the far-away subroutine at label without saving a return address.

## Floating point

- [`fabs.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fabs.d.md) `f1, f2` (Pseudo-instruction): Sets the first register to the absolute value of the double-precision value in the second.
- [`fabs.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fabs.s.md) `f1, f2` (Pseudo-instruction): Sets the first register to the absolute value of the single-precision value in the second.
- [`fadd.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fadd.d.md) `f1, f2, f3, rm`: Adds the double-precision values in the second and third registers and stores the sum in the first.
- [`fadd.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fadd.s.md) `f1, f2, f3, rm`: Adds the single-precision values in the second and third registers and stores the sum in the first.
- [`fclass.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fclass.d.md) `t1, f1`: Sets the first register to a bit mask that identifies the class of the double-precision value in the second, such as NaN or zero.
- [`fclass.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fclass.s.md) `t1, f1`: Sets the first register to a bit mask that identifies the class of the single-precision value in the second, such as NaN or zero.
- [`fcvt.d.l`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.d.l.md) `f1, t1, rm` (RV64 only): Converts the signed 64-bit integer in the second register to double precision and stores it in the first.
- [`fcvt.d.lu`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.d.lu.md) `f1, t1, rm` (RV64 only): Converts the unsigned 64-bit integer in the second register to double precision and stores it in the first.
- [`fcvt.d.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.d.s.md) `f1, f2, rm`: Converts the single-precision value in the second register to double precision and stores it in the first.
- [`fcvt.d.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.d.w.md) `f1, t1, rm`: Converts the signed 32-bit integer in the second register to double precision and stores it in the first.
- [`fcvt.d.wu`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.d.wu.md) `f1, t1, rm`: Converts the unsigned 32-bit integer in the second register to double precision and stores it in the first.
- [`fcvt.l.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.l.d.md) `t1, f1, rm` (RV64 only): Rounds the double-precision value in the second register to a signed 64-bit integer and stores it in the first.
- [`fcvt.l.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.l.s.md) `t1, f1, rm` (RV64 only): Rounds the single-precision value in the second register to a signed 64-bit integer and stores it in the first.
- [`fcvt.lu.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.lu.d.md) `t1, f1, rm` (RV64 only): Rounds the double-precision value in the second register to an unsigned 64-bit integer and stores it in the first.
- [`fcvt.lu.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.lu.s.md) `t1, f1, rm` (RV64 only): Rounds the single-precision value in the second register to an unsigned 64-bit integer and stores it in the first.
- [`fcvt.s.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.s.d.md) `f1, f2, rm`: Converts the double-precision value in the second register to single precision and stores it in the first.
- [`fcvt.s.l`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.s.l.md) `f1, t1, rm` (RV64 only): Converts the signed 64-bit integer in the second register to single precision and stores it in the first.
- [`fcvt.s.lu`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.s.lu.md) `f1, t1, rm` (RV64 only): Converts the unsigned 64-bit integer in the second register to single precision and stores it in the first.
- [`fcvt.s.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.s.w.md) `f1, t1, rm`: Converts the signed 32-bit integer in the second register to single precision and stores it in the first.
- [`fcvt.s.wu`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.s.wu.md) `f1, t1, rm`: Converts the unsigned 32-bit integer in the second register to single precision and stores it in the first.
- [`fcvt.w.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.w.d.md) `t1, f1, rm`: Rounds the double-precision value in the second register to a signed 32-bit integer and stores it in the first.
- [`fcvt.w.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.w.s.md) `t1, f1, rm`: Rounds the single-precision value in the second register to a signed 32-bit integer and stores it in the first.
- [`fcvt.wu.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.wu.d.md) `t1, f1, rm`: Rounds the double-precision value in the second register to an unsigned 32-bit integer and stores it in the first.
- [`fcvt.wu.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fcvt.wu.s.md) `t1, f1, rm`: Rounds the single-precision value in the second register to an unsigned 32-bit integer and stores it in the first.
- [`fdiv.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fdiv.d.md) `f1, f2, f3, rm`: Divides the second register by the third in double precision and stores the quotient in the first.
- [`fdiv.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fdiv.s.md) `f1, f2, f3, rm`: Divides the second register by the third in single precision and stores the quotient in the first.
- [`feq.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/feq.d.md) `t1, f1, f2`: Sets the first register to 1 if the double-precision values in the second and third are equal, otherwise to 0.
- [`feq.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/feq.s.md) `t1, f1, f2`: Sets the first register to 1 if the single-precision values in the second and third are equal, otherwise to 0.
- [`fge.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fge.d.md) `t1, f2, f3` (Pseudo-instruction): Sets the first register to 1 if the double-precision value in the second is greater than or equal to the value in the third, otherwise to 0.
- [`fge.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fge.s.md) `t1, f2, f3` (Pseudo-instruction): Sets the first register to 1 if the single-precision value in the second is greater than or equal to the value in the third, otherwise to 0.
- [`fgt.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fgt.d.md) `t1, f2, f3` (Pseudo-instruction): Sets the first register to 1 if the double-precision value in the second is greater than the value in the third, otherwise to 0.
- [`fgt.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fgt.s.md) `t1, f2, f3` (Pseudo-instruction): Sets the first register to 1 if the single-precision value in the second is greater than the value in the third, otherwise to 0.
- [`fld`](https://asm-editor.specy.app/documentation/risc-v/instruction/fld.md) `f1, imm12(t1)`: Loads a double-precision value from the address in the second register plus an offset into the first.
- [`fle.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fle.d.md) `t1, f1, f2`: Sets the first register to 1 if the double-precision value in the second is less than or equal to the value in the third, otherwise to 0.
- [`fle.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fle.s.md) `t1, f1, f2`: Sets the first register to 1 if the single-precision value in the second is less than or equal to the value in the third, otherwise to 0.
- [`flt.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/flt.d.md) `t1, f1, f2`: Sets the first register to 1 if the double-precision value in the second is less than the value in the third, otherwise to 0.
- [`flt.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/flt.s.md) `t1, f1, f2`: Sets the first register to 1 if the single-precision value in the second is less than the value in the third, otherwise to 0.
- [`flw`](https://asm-editor.specy.app/documentation/risc-v/instruction/flw.md) `f1, imm12(t1)`: Loads a single-precision value from the address in the second register plus an offset into the first.
- [`fmadd.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmadd.d.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers and adds the fourth, in double precision with a single rounding, and stores the result in the first.
- [`fmadd.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmadd.s.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers and adds the fourth, in single precision with a single rounding, and stores the result in the first.
- [`fmax.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmax.d.md) `f1, f2, f3`: Stores the larger of the double-precision values in the second and third registers in the first.
- [`fmax.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmax.s.md) `f1, f2, f3`: Stores the larger of the single-precision values in the second and third registers in the first.
- [`fmin.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmin.d.md) `f1, f2, f3`: Stores the smaller of the double-precision values in the second and third registers in the first.
- [`fmin.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmin.s.md) `f1, f2, f3`: Stores the smaller of the single-precision values in the second and third registers in the first.
- [`fmsub.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmsub.d.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers and subtracts the fourth, in double precision with a single rounding, and stores the result in the first.
- [`fmsub.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmsub.s.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers and subtracts the fourth, in single precision with a single rounding, and stores the result in the first.
- [`fmul.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmul.d.md) `f1, f2, f3, rm`: Multiplies the second and third registers in double precision and stores the product in the first.
- [`fmul.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmul.s.md) `f1, f2, f3, rm`: Multiplies the second and third registers in single precision and stores the product in the first.
- [`fmv.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.d.md) `f1, f2` (Pseudo-instruction): Copies the double-precision value in the second register into the first.
- [`fmv.d.x`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.d.x.md) `f1, t1` (RV64 only): Copies the raw 64 bits of the second register into the first without converting them.
- [`fmv.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.s.md) `f1, f2` (Pseudo-instruction): Copies the single-precision value in the second register into the first.
- [`fmv.s.x`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.s.x.md) `f1, t1`: Copies the raw low 32 bits of the second register into the first without converting them, as the older name of fmv.w.x.
- [`fmv.w.x`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.w.x.md) `f1, t1` (Pseudo-instruction): Copies the raw low 32 bits of the second register into the first without converting them.
- [`fmv.x.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.x.d.md) `t1, f1` (RV64 only): Copies the raw 64 bits of the second register into the first without converting them.
- [`fmv.x.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.x.s.md) `t1, f1`: Copies the raw 32 bits of the second register into the first without converting them, as the older name of fmv.x.w.
- [`fmv.x.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/fmv.x.w.md) `t1, f1` (Pseudo-instruction): Copies the raw 32 bits of the second register into the first without converting them, sign-extending on RV64.
- [`fneg.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fneg.d.md) `f1, f2` (Pseudo-instruction): Sets the first register to the negation of the double-precision value in the second.
- [`fneg.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fneg.s.md) `f1, f2` (Pseudo-instruction): Sets the first register to the negation of the single-precision value in the second.
- [`fnmadd.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fnmadd.d.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers, adds the fourth and negates the sum, in double precision with a single rounding, and stores the result in the first.
- [`fnmadd.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fnmadd.s.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers, adds the fourth and negates the sum, in single precision with a single rounding, and stores the result in the first.
- [`fnmsub.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fnmsub.d.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers, subtracts the fourth and negates the difference, in double precision with a single rounding, and stores the result in the first.
- [`fnmsub.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fnmsub.s.md) `f1, f2, f3, f4, rm`: Multiplies the second and third registers, subtracts the fourth and negates the difference, in single precision with a single rounding, and stores the result in the first.
- [`frcsr`](https://asm-editor.specy.app/documentation/risc-v/instruction/frcsr.md) `t1` (Pseudo-instruction): Reads the FP control and status register (fcsr) into a register.
- [`frflags`](https://asm-editor.specy.app/documentation/risc-v/instruction/frflags.md) `t1` (Pseudo-instruction): Reads the FP exception flags into a register.
- [`frrm`](https://asm-editor.specy.app/documentation/risc-v/instruction/frrm.md) `t1` (Pseudo-instruction): Reads the FP rounding mode into a register.
- [`frsr`](https://asm-editor.specy.app/documentation/risc-v/instruction/frsr.md) `t1` (Pseudo-instruction): Reads the FP control and status register into a register, as an alias of frcsr.
- [`fscsr`](https://asm-editor.specy.app/documentation/risc-v/instruction/fscsr.md) `t1, t2 | t1` (Pseudo-instruction): Swaps the second register into the FP control and status register, storing its old value in the first, or, when given one register, only writes that register.
- [`fsd`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsd.md) `f1, imm12(t1)`: Stores the double-precision value in the first register at the address in the second plus an offset.
- [`fsflags`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsflags.md) `t1, t2 | t1` (Pseudo-instruction): Swaps the second register into the FP exception flags, storing the old flags in the first, or, when given one register, only writes that register.
- [`fsgnj.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnj.d.md) `f1, f2, f3`: Copies the second register into the first with the sign bit taken from the third, in double precision.
- [`fsgnj.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnj.s.md) `f1, f2, f3`: Copies the second register into the first with the sign bit taken from the third, in single precision.
- [`fsgnjn.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnjn.d.md) `f1, f2, f3`: Copies the second register into the first with the sign bit opposite to that of the third, in double precision.
- [`fsgnjn.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnjn.s.md) `f1, f2, f3`: Copies the second register into the first with the sign bit opposite to that of the third, in single precision.
- [`fsgnjx.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnjx.d.md) `f1, f2, f3`: Copies the second register into the first with its sign bit XORed with the sign bit of the third, in double precision.
- [`fsgnjx.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsgnjx.s.md) `f1, f2, f3`: Copies the second register into the first with its sign bit XORed with the sign bit of the third, in single precision.
- [`fsqrt.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsqrt.d.md) `f1, f2, rm`: Stores the square root of the double-precision value in the second register in the first.
- [`fsqrt.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsqrt.s.md) `f1, f2, rm`: Stores the square root of the single-precision value in the second register in the first.
- [`fsrm`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsrm.md) `t1, t2 | t1` (Pseudo-instruction): Swaps the second register into the FP rounding mode, storing the old mode in the first, or, when given one register, only writes that register.
- [`fssr`](https://asm-editor.specy.app/documentation/risc-v/instruction/fssr.md) `t1, t2 | t1` (Pseudo-instruction): Swaps the second register into the FP control and status register, storing its old value in the first, as an alias of fscsr.
- [`fsub.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsub.d.md) `f1, f2, f3, rm`: Subtracts the third register from the second in double precision and stores the difference in the first.
- [`fsub.s`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsub.s.md) `f1, f2, f3, rm`: Subtracts the third register from the second in single precision and stores the difference in the first.
- [`fsw`](https://asm-editor.specy.app/documentation/risc-v/instruction/fsw.md) `f1, imm12(t1)`: Stores the single-precision value in the first register at the address in the second plus an offset.

## Atomic

- [`amoadd.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoadd.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the sum of that value and the second register back there, atomically.
- [`amoadd.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoadd.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the sum of that value and the second register back there, atomically.
- [`amoand.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoand.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores its bitwise AND with the second register back there, atomically.
- [`amoand.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoand.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores its bitwise AND with the second register back there, atomically.
- [`amomax.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomax.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the larger of it and the second register there, compared as signed, atomically.
- [`amomax.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomax.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the larger of it and the second register back there, compared as signed, atomically.
- [`amomaxu.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomaxu.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the larger of it and the second register there, compared as unsigned, atomically.
- [`amomaxu.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomaxu.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the larger of it and the second register back there, compared as unsigned, atomically.
- [`amomin.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomin.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the smaller of it and the second register there, compared as signed, atomically.
- [`amomin.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amomin.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the smaller of it and the second register back there, compared as signed, atomically.
- [`amominu.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amominu.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the smaller of it and the second register there, compared as unsigned, atomically.
- [`amominu.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amominu.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the smaller of it and the second register back there, compared as unsigned, atomically.
- [`amoor.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoor.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores its bitwise OR with the second register there, atomically.
- [`amoor.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoor.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores its bitwise OR with the second register back there, atomically.
- [`amoswap.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoswap.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores the second register there, atomically.
- [`amoswap.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoswap.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores the second register there, atomically.
- [`amoxor.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoxor.d.md) `t1, t2, (t3)` (RV64 only): Loads the double word at the address in the third register into the first and stores its bitwise XOR with the second register there, atomically.
- [`amoxor.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/amoxor.w.md) `t1, t2, (t3)`: Loads the word at the address in the third register into the first and stores its bitwise XOR with the second register back there, atomically.
- [`fence`](https://asm-editor.specy.app/documentation/risc-v/instruction/fence.md) `imm5, imm5`: Makes memory and I/O accesses before the fence take effect before those after it, as other threads see them.
- [`fence.i`](https://asm-editor.specy.app/documentation/risc-v/instruction/fence.i.md): Ensures that stores to instruction memory are visible to instruction fetches.
- [`lr.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/lr.d.md) `t1, (t2)` (RV64 only): Loads the double word at the address in the second register into the first and reserves that address for a following sc.d.
- [`lr.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/lr.w.md) `t1, (t2)`: Loads the word at the address in the second register into the first and reserves that address for a following sc.w.
- [`sc.d`](https://asm-editor.specy.app/documentation/risc-v/instruction/sc.d.md) `t1, t2, (t3)` (RV64 only): Stores the second register at the address in the third only if the reservation from lr.d still holds, and sets the first to 0 on success or 1 on failure.
- [`sc.w`](https://asm-editor.specy.app/documentation/risc-v/instruction/sc.w.md) `t1, t2, (t3)`: Stores the second register at the address in the third only if the reservation from lr.w still holds, and sets the first to 0 on success or 1 on failure.

## System

- [`csrc`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrc.md) `t1, csr` (Pseudo-instruction): Clears the CSR bits that are set in a register, leaving the other bits unchanged.
- [`csrci`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrci.md) `csr, imm12` (Pseudo-instruction): Clears the CSR bits that are set in a 5-bit constant, leaving the other bits unchanged.
- [`csrr`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrr.md) `t1, csr` (Pseudo-instruction): Reads the CSR into a register without writing to the CSR.
- [`csrrc`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrc.md) `t0, csr, t1`: Reads the CSR into the first register and clears the CSR bits that are set in the last register, as one atomic step.
- [`csrrci`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrci.md) `t0, csr, imm5`: Reads the CSR into a register and clears the CSR bits that are set in a 5-bit constant, as one atomic step.
- [`csrrs`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrs.md) `t0, csr, t1`: Reads the CSR into the first register and sets the CSR bits that are set in the last register, as one atomic step.
- [`csrrsi`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrsi.md) `t0, csr, imm5`: Reads the CSR into a register and sets the CSR bits that are set in a 5-bit constant, as one atomic step.
- [`csrrw`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrw.md) `t0, csr, t1`: Reads the CSR into the first register and writes the last register into the CSR, as one atomic step.
- [`csrrwi`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrrwi.md) `t0, csr, imm5`: Reads the CSR into a register and writes a 5-bit constant into the CSR, as one atomic step.
- [`csrs`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrs.md) `t1, csr` (Pseudo-instruction): Sets the CSR bits that are set in a register, leaving the other bits unchanged.
- [`csrsi`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrsi.md) `csr, imm12` (Pseudo-instruction): Sets the CSR bits that are set in a 5-bit constant, leaving the other bits unchanged.
- [`csrw`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrw.md) `t1, csr` (Pseudo-instruction): Writes a register into the CSR and discards the value the CSR held before.
- [`csrwi`](https://asm-editor.specy.app/documentation/risc-v/instruction/csrwi.md) `csr, imm12` (Pseudo-instruction): Writes a 5-bit constant into the CSR and discards the value it held before.
- [`ebreak`](https://asm-editor.specy.app/documentation/risc-v/instruction/ebreak.md): Pauses execution so that a debugger or the simulator can take control.
- [`ecall`](https://asm-editor.specy.app/documentation/risc-v/instruction/ecall.md): Executes the system call specified by the value in a7.
- [`nop`](https://asm-editor.specy.app/documentation/risc-v/instruction/nop.md) (Pseudo-instruction): Does nothing and moves on to the next instruction.
- [`rdcycle`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdcycle.md) `t1` (Pseudo-instruction): Reads the cycle counter into a register.
- [`rdcycleh`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdcycleh.md) `t1` (Pseudo-instruction): Reads the upper 32 bits of the cycle counter into a register (RV32 only).
- [`rdinstret`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdinstret.md) `t1` (Pseudo-instruction): Reads the count of retired instructions into a register.
- [`rdinstreth`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdinstreth.md) `t1` (Pseudo-instruction): Reads the upper 32 bits of the retired-instruction count into a register (RV32 only).
- [`rdtime`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdtime.md) `t1` (Pseudo-instruction): Reads the real-time counter into a register.
- [`rdtimeh`](https://asm-editor.specy.app/documentation/risc-v/instruction/rdtimeh.md) `t1` (Pseudo-instruction): Reads the upper 32 bits of the real-time counter into a register (RV32 only).
- [`uret`](https://asm-editor.specy.app/documentation/risc-v/instruction/uret.md): Returns from a user-mode interrupt or exception handler to the address in uepc.
- [`wfi`](https://asm-editor.specy.app/documentation/risc-v/instruction/wfi.md): Waits for an interrupt enabled in uie, such as the timer reaching timecmp or a keyboard interrupt. Executes no instructions while waiting.
