Can stack_adj be any multiple of 16?
No. The register list and XLEN determine base; only base, base+16, base+32, and base+48 are encodable.
Restore registers, a0=0, deallocate frame, and ret
CM.POPRETZ (Zcmp) pops registers in {reg_list}, sets a0 to zero, adjusts sp, then ret. Used for function epilogues returning zero. Differs from POPRET by explicitly zeroing a0. Reuses c.fsdsp encoding. Part of Zcmp, depends on Zca.
Shows only Zcmp architectural sequences and conditions; access order, grouping, or replay does not imply implementation detail.
Zcmp depends on Zca and is incompatible with Zcd. Correct execution requires idempotent memory at sp; RV32E permits rlist=4-6 only. Values are pre-store registers or successfully loaded memory values; complete assumes the EEI permits all accesses, not that every address succeeds.
Load the listed registers from the stack, then add stack_adj to sp. Set a0 to zero and return through restored ra.
RV32I Zcmp, accesses complete: {ra,s0-s2} occupies 16 bytes; stack_adj=64 encodes rlist=7, spimm=3. PUSH saves below old sp then sp-=64; POP forms restore from old sp+48 through old sp+60 then sp+=64. Return forms use restored ra; POPRETZ also zeros a0.
No. The register list and XLEN determine base; only base, base+16, base+32, and base+48 are encodable.
No. Some destination registers may already be loaded. The sequence re-executes after the trap handler; the loads are not collectively atomic.