Files
Odin/core/rexcode
Brendan Punsky d951ee9963 rexcode/arm32: VFMA/VFMS carried VMLA/VMLS encodings; drop three duplicate mnemonics
Asking for a VFMA with a lane operand emitted a VMLA. NEON's fused multiply-add
has no by-element form at all -- llvm-mc rejects `vfma.f32 d0, d1, d2[0]` -- and
the four rows sitting under VFMA/VFMS held VMLA/VMLS's lane encodings, which
VMLA and VMLS already own. Their data type gave it away too: `.I32` on a
fused multiply-add, which is float-only. Deleted.

They were also the reason `bits & ~mask` looked wrong on those rows: as
authored they were F2A000C0, and clearing the Vn high bit -- correct, since
bit 7 is the top of the register number -- landed them exactly on VMLA's
F2A00040.

Found by asking which (bits, mask, mode) triples more than one mnemonic
claims. That check found 18; this commit takes it to 9.

Three of the eighteen were whole mnemonics duplicating a base:

  VRECPE_F, VRSQRTE_F   every form already present under VRECPE / VRSQRTE,
                        which carry both the U32 and F32 variants.
  VPADD_F               its F32 form duplicated VPADD's; its F16 form was the
                        only thing it owned, so that moves to VPADD, where the
                        data type now selects it.

All three were on the list of names no assembler spells, so that count goes
from 14 to 11 -- and nine of the remaining eleven are the *_LANE group, still
waiting on register-list and lane-index modelling. The other two are
`psb csync` and `tsb csync`, which are correct as they are.

Two smoke checks asserted the VFMA/VFMS by-element forms and are gone with
them; a third moved index.

Verified against llvm-mc: vpadd.i8/.f32/.f16, vrecpe.u32/.f32 and vrsqrte.f32
all byte-exact, 1656/1656 decode sweep, every suite at baseline.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 08:42:04 -04:00
..
2026-07-14 13:28:12 +01:00