dvp-as: accept hex loi values and negative load/store offsets #7

Merged
techwritescode merged 1 commit from dvpas-loi-hex into main 2026-10-06 03:03:12 +00:00

openvcl emits "loi 0x43000000" and offsets such as "sq VF06, -1(VI03)". The Go assembler rejected both, so none of ps2gl's VU1 renderers assembled.

  • loi takes a 0x... operand as the raw 32 bits, in addition to a float literal.
  • The 11-bit load/store offset field is signed (-1024 to 2047, stored as two's complement).

Verified: Go masp (#6), then openvcl, then this dvp-as assembles all 13 ps2gl VU1 renderers to code that is byte-identical to GNU dvp-as. Added TestAssembleLoiHexAndNegativeOffsets with expected bytes taken from the GNU assembler.

🤖 Generated with Claude Code

openvcl emits "loi 0x43000000" and offsets such as "sq VF06, -1(VI03)". The Go assembler rejected both, so none of ps2gl's VU1 renderers assembled. - loi takes a 0x... operand as the raw 32 bits, in addition to a float literal. - The 11-bit load/store offset field is signed (-1024 to 2047, stored as two's complement). Verified: Go masp (#6), then openvcl, then this dvp-as assembles all 13 ps2gl VU1 renderers to code that is byte-identical to GNU dvp-as. Added TestAssembleLoiHexAndNegativeOffsets with expected bytes taken from the GNU assembler. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dvp-as: accept hex bit patterns for loi and negative load/store offsets
All checks were successful
Build / build (push) Successful in 56s
ba78c0f9b6
openvcl emits "loi 0x43000000" and offsets like "sq VF06, -1(VI03)", which the Go
assembler rejected. The loi hex value is taken as the raw bits, and the 11-bit offset
field is signed. With these, all 13 ps2gl VU1 renderers assemble to code that is
byte-identical to GNU dvp-as.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
techwritescode deleted branch dvpas-loi-hex 2026-10-06 03:03:12 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ps2/tools!7
No description provided.