Skip to content

sail: stage SSRGET/SSRSET/SSRSWAP#81

Open
zhoubot wants to merge 4 commits intomainfrom
codex/sail-coverage-c-ssrget-fpu
Open

sail: stage SSRGET/SSRSET/SSRSWAP#81
zhoubot wants to merge 4 commits intomainfrom
codex/sail-coverage-c-ssrget-fpu

Conversation

@zhoubot
Copy link
Collaborator

@zhoubot zhoubot commented Mar 2, 2026

Stages Sail semantics for SSR system-register access per ISA manual operation pseudocode:

  • SSRGET / SSRSET / SSRSWAP
  • HL.SSRGET / HL.SSRSET

Adds minimal SSR backing storage for base IDs used in bring-up: TP/GP + LB*/LC*.
Other SSR IDs remain explicit unimplemented(...) until privilege + E_ISSR wiring is finalized.

Coverage: marks the above mnemonics as implemented; C.SSRGET and LSRGET remain missing (no SSRID remap / LSR spec).

implemented_forms -> 500.

@zhoubot zhoubot requested a review from a team as a code owner March 2, 2026 03:58
@zhoubot
Copy link
Collaborator Author

zhoubot commented Mar 2, 2026

Update (per doc analysis + your answers):

  • Implemented C.SSRGET as direct low-bit SSRID domain (no remap): SSR_ID[4:0]=SSRID.
  • Added trap_illegal_inst and trap_illegal_ssr stub: illegal SSR access raises TRAPNUM=ILLEGAL_INST(4), CAUSE=0, BI=0, TRAPARG0=PC/TPC.
  • LSRGET remains unimplemented("lsrget") (engine-specific BARG access; spec TBD).

@zhoubot
Copy link
Collaborator Author

zhoubot commented Mar 2, 2026

Update: marked unscaled immediate loads as implemented (semantics already present in execute.sail):

  • LHI.U / LHUI.U / LWI.U / LWUI.U

Coverage refreshed (missing_mnemonics now 235).
Remaining non-V/HL missing are mainly: FPU ops, template ops (FENTRY/FEXIT/FRET.*, MCOPY/MSET, ESAVE/ERCOV), SSR conversions (SCVTF/UCVTF), XB, and LSRGET.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant