sbreak

RISC-V sbreak Pseudo-Instruction Details

Assembler pseudo-instruction

Older breakpoint pseudo-instruction name, expanding to ebreak. It preserves compatibility with earlier assembly spelling; modern code typically writes EBREAK directly.

What You Write
sbreak
Typical Real Expansion
ebreak

What This Pseudo Instruction Is Saving You From Writing

Earlier RISC-V assembly and teaching material used the sbreak name; keeping the alias helps old code, while the modern official name is EBREAK.

sbreak primarily means "Older alias for EBREAK". It is assembler-level shorthand; when debugging, auditing, or reading machine code, reason from the real expansion and relocation semantics listed on this page.

Official Semantics Checklist

The official assembly manual treats sbreak as an assembler-level pseudo-instruction or alias; hardware executes the expanded real instruction sequence.
The real semantics come from the ISA definitions of EBREAK and the other expanded instructions, not from a separate sbreak hardware opcode.

How To Read The Expansion

Step 1
Assembler encodes the old name sbreak as EBREAK.

What You May See In objdump / Disassembly

Disassembly may show either the pseudo-instruction or the expanded real instruction, depending on tool options and context.

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.

When To Think Of It First

Read or port old RISC-V assembly
Preserve old teaching examples for breakpoints
Confirm that sbreak in old code actually corresponds to ebreak

Pitfalls / Common Confusions

This is an older alias; prefer ebreak in new code
EBREAK exception/debug behavior depends on the execution environment and privileged architecture
Do not use sbreak for system calls; the older system-call name is scall, corresponding to ecall

FAQ

Is sbreak a real RISC-V instruction?

sbreak is an assembler pseudo-instruction or alias, not a separate hardware opcode. The “Typical Real Expansion” section lists the official expansion, and behavior is defined by the expanded ISA instructions.

What is the main trap when using sbreak?

This is an older alias; prefer ebreak in new code