mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 16:50:43 +00:00
An [[encoding_variant]] re-encodes a declared form in another family: it names the form, the family, its opcode there and that encoding's operand rule, and inherits the rest. The XML check runs on the inherited declaration, and the generator rejects variants of undeclared forms, in the form's own family, duplicates, rules that cannot encode the form and forms that use a variant-only rule. It emits from_<family>_word and <family>_assembly_name on the base enum and one FORMS row per variant. rdna2/vop3.toml declares the vop3_vgpr2 rule (the subset the hand-written decoder accepted: VGPR sources, no modifiers, unused SRC2) and the VOP3 encoding of V_ADD_NC_U32. The decoder dispatches it through VectorAluOp::from_vop3_word into Instruction::VectorAluVop3, which replaces AddNoCarryU32; the shader lowers it through the VOP2 form's template and still admits only v_add_nc_u32_e64 inside a runtime s_cbranch_vccz region. Goldens, known answers and the LLVM oracle are unchanged. Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>