beqz

RISC-V beqz Pseudo-Instruction Details

Assembler pseudo-instruction

The RISC-V beqz pseudo-instruction has the beqz expansion BEQ rs, x0, offset and branches if the register equals zero. Its conditional branch range is plus or minus 4 KiB.

What You Write
beqz rs, offset
Typical Real Expansion
beq rs, x0, offset

What This Pseudo Instruction Is Saving You From Writing

Assembly Manual lists this pseudo-instruction form.

How To Read The Expansion

Step 1
Assembly Manual expands beqz rs, offset to beq rs, x0, offset.

Assembly Forms And Real Instructions

The RISC-V Assembly Programmer's Manual lists beqz as BEQ rs, x0, offset.

Official References And Reading Order

This page treats pseudo-instructions as assembler-level aliases or macros: first read what real instructions they expand to, then use the official ISA manual for the behavior of those real instructions. ABI, relocation, and linker-relaxation details follow the psABI document.

FAQ

What does beqz expand to?

the RISC-V Assembly Programmer's Manual gives beqz rs, offset as beq rs, x0, offset.