Files
Odin/core/rexcode/isa/arm32
Brendan Punsky d1cb08b72f rexcode/arm32: masks that could not separate sibling forms
Forty-one groups of forms differed only in bits their own mask left
free, so they all matched each other's words and whichever sorted first
answered for the lot. That is where the NEON element sizes went:
`vabs.s8`, `.s16` and `.s32` are three patterns differing at bits 19:18,
and with those bits outside the mask the first one spoke for all three.
121 rows.

Two things that exposed:

  - LDM and STM differ only in the writeback bit, and nothing in the
    operand model recorded it, so the two forms printed identically.
    Instruction carries it now and the base register wears its `!`.

  - The T32 shifts left the S bit free, and their patterns sort ahead of
    MOV's, so `movs.w r1, r2` came back as `lsl r1, r2, #0`. There is no
    LSLS form in the table for it to have become instead; pinning the
    bit at least stops it answering for a word that is not its own.

Also: r0 could not be used as an index register. The printer took a
register-offset operand to be immediate-only unless the index was
non-zero, when the class alone already says whether there is one --
`[r0, -r0]` printed as `[r0]`. And a displacement of zero lost its U
bit, which llvm-mc writes as `#-0` because it is a different word.

Against llvm-mc, A32 entries whose disassembly assembles back to the
same word: 760 of 1139, from 683. Wrong: 81, from 158.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018UmHLRF11EoWwNWCJ7JGaA
2026-08-29 00:18:16 -04:00
..