{"record":{"id":"27babc4a220d9ed6","repo":"golang/go","slug":"invalid-arrangement-in-arm64-register-list","errorCode":null,"errorMessage":"invalid arrangement in ARM64 register list","messagePattern":"invalid arrangement in ARM64 register list","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmd/asm/internal/arch/arm64.go","lineNumber":271,"sourceCode":"\t\tcurSize = 3\n\t\tcurQ = 1\n\tcase \"B\":\n\t\tcurSize = 1\n\t\tcurQ = 2\n\tcase \"H\":\n\t\tcurSize = 2\n\t\tcurQ = 2\n\tcase \"S\":\n\t\tcurSize = 3\n\t\tcurQ = 2\n\tcase \"D\":\n\t\tcurSize = 1\n\t\tcurQ = 3\n\tcase \"Q\":\n\t\tcurSize = 2\n\t\tcurQ = 3\n\tdefault:\n\t\treturn 0, errors.New(\"invalid arrangement in ARM64 register list\")\n\t}\n\treturn (int64(prefix) << 32) | (int64(curQ) & 3 << 30) | (int64(curSize&3) << 10), nil\n}\n","sourceCodeStart":253,"sourceCodeEnd":275,"githubUrl":"https://github.com/golang/go/blob/b6b368adc57c96c3151d224d172029f233ead2c3/src/cmd/asm/internal/arch/arm64.go#L253-L275","documentation":"The Go assembler's ARM64RegisterArrangement returns this error when the arrangement string (the suffix after the register, e.g., .B16, .S2) does not match any known arrangement (arm64.go:270-272). The function recognizes a fixed set: B8, B16, H4, H8, S2, S4, D1, D2, B, H, S, D, Q. Any other suffix falls through to the default branch and is rejected, because no Q/size encoding exists for it.","triggerScenarios":"Triggered when the arrangement suffix on a V/Z/P register is misspelled or unrecognized (arm64.go:230-271). For example, `V0.W8` (W8 is not a valid arrangement), `V0.B32` (B32 only valid on Z, not V), or a completely spurious suffix like `V0.X4`.","commonSituations":"Using an arrangement valid for SVE (Z) on a NEON (V) register, e.g., `V0.Q` where Q is reserved for specific forms. Typos in the suffix (e.g., 'B61' instead of 'B16'). Copying arrangement syntax from a different toolchain (GNU as uses different suffix conventions in some cases).","solutions":["Use one of the recognized arrangements: B8, B16, H4, H8, S2, S4, D1, D2, B, H, S, D, Q.","Match the arrangement to the register type — NEON (V) arrangements are B8/B16/H4/H8/S2/S4/D1/D2; the bare B/H/S/D/Q forms apply to specific instruction classes.","Consult the Go assembler's ARM64 tests or the ARM ARM for the exact suffix the instruction expects.","If you intended a different element width, re-check the instruction mnemonic and its permitted arrangements."],"exampleFix":"; before — invalid arrangement 'W8'\nVADD V0.W8, V1.W8, V2.W8\n\n; after — use a recognized arrangement\nVADD V0.S4, V1.S4, V2.S4","handlingStrategy":"validation","validationCode":"// Validate the arrangement suffix against the recognized set.\nvar validArrangements = map[string]bool{\n    \"B8\": true, \"B16\": true, \"H4\": true, \"H8\": true,\n    \"S2\": true, \"S4\": true, \"D1\": true, \"D2\": true,\n    \"B\": true, \"H\": true, \"S\": true, \"D\": true, \"Q\": true,\n}\nfunc validArrangement(arng string) bool { return validArrangements[arng] }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only the recognized ARM64 arrangements: B8/B16/H4/H8/S2/S4/D1/D2/B/H/S/D/Q.","Match the arrangement to the register class (NEON V vs SVE Z).","Cross-check the instruction's permitted arrangements in the ARM ARM."],"tags":["go","asm","arm64","arrangement","assembler"],"backgroundTag":null,"analyzedSha":"b6b368adc57c96c3151d224d172029f233ead2c3","analyzedAt":"2026-08-12T00:22:02.250Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}