Architecture gap
PTO-SPEC currently decodes register-offset AGU SrcRType as 0=unchanged, 1=.sw, 2=.uw, 3=.neg. LinxISA v0.58.5 Sail and compiler output use the shared arithmetic modifier encoding 0=.sw, 1=.uw, 2=.neg, 3=unchanged.
A real add_i32_lat ELF emits lw [t#1, t#2<<2] with raw SrcRType=3. PTO therefore negates index 1 on the second loop iteration and loads the wrong address.
Proposed architecture decision
Adopt the LinxISA v0.58.5 arithmetic modifier mapping for every register-offset AGU form:
00: sign-extend low 32 bits (.sw)
01: zero-extend low 32 bits (.uw)
10: negate the full XLEN value (.neg)
11: unchanged (omitted modifier)
Keep modifier-before-shift ordering and all existing fault/atomicity rules. Update owning ASL/contracts and add exact encoded loop/address regressions.
Evidence
- LinxISA Sail:
apply_srcrtype_arith64 in isa/sail/model/lib/common.sail
- LinxISA Sail
exec_lw applies that helper before shamt
- Compiler ELF instruction
0x179c2f89 decodes as LW with SrcRType=3, plain disassembly
- PTO focused two-iteration ELF-shaped test passes iteration 0 and loads zero at iteration 1 under the current mapping
Target: 0.58.5. This issue is architecture-only; hosted runner and sidecar behavior remain in PTO-ISA/asl-model docs.
Architecture gap
PTO-SPEC currently decodes register-offset AGU
SrcRTypeas0=unchanged, 1=.sw, 2=.uw, 3=.neg. LinxISA v0.58.5 Sail and compiler output use the shared arithmetic modifier encoding0=.sw, 1=.uw, 2=.neg, 3=unchanged.A real
add_i32_latELF emitslw [t#1, t#2<<2]with rawSrcRType=3. PTO therefore negates index 1 on the second loop iteration and loads the wrong address.Proposed architecture decision
Adopt the LinxISA v0.58.5 arithmetic modifier mapping for every register-offset AGU form:
00: sign-extend low 32 bits (.sw)01: zero-extend low 32 bits (.uw)10: negate the full XLEN value (.neg)11: unchanged (omitted modifier)Keep modifier-before-shift ordering and all existing fault/atomicity rules. Update owning ASL/contracts and add exact encoded loop/address regressions.
Evidence
apply_srcrtype_arith64inisa/sail/model/lib/common.sailexec_lwapplies that helper beforeshamt0x179c2f89decodes as LW withSrcRType=3, plain disassemblyTarget: 0.58.5. This issue is architecture-only; hosted runner and sidecar behavior remain in
PTO-ISA/asl-modeldocs.