Does C.BEQZ write a return address?
No; it writes no link register. When the condition is true, PC updates to the target; otherwise execution continues at pc+2.
Branch if x[rs1'] is zero; otherwise PC+2. 16-bit CB format.
Extension condition: RV32C / RV64C; this page describes C extension version 2.0.
C.BEQZ uses the 16-bit CB format; its 3-bit rs1' selects x8-x15. If the register is zero, the target is the current instruction PC plus a sign-extended byte offset; otherwise execution continues at PC+2. The offset is even, from -256 through 254, including zero. It corresponds to beq rs1', x0, offset and writes no link register.
Three learning stages illustrate architectural rules, without modeling processor pipelines or cycles.
RV32C / RV64C; C sets IALIGN=16, so PC is an even byte address. Address arithmetic wraps at XLEN. Subsequent target instruction-fetch exceptions are outside this model.
c.beqz → Condition true; PC ← 0x00001020; no link register write
0xC005
Architectural result not committed yet.
C.BEQZ uses CB format, compares restricted rs1' with implicit x0, and adds a sign-extended offset to PC when the condition is true.
Understand this scenario with real code like «c.beqz x8, 32 # PC=0x1000: x8=0 -> PC=0x1020; x8!=0 -> PC=0x1002».
No; it writes no link register. When the condition is true, PC updates to the target; otherwise execution continues at pc+2.