feat(lint): surface the amd64 extension layer's refusals
Assisted-by: GLM 5.3 Flash
This commit is contained in:
1 parent
5ee60c860b
commit
fa50521619
5 files changed
+281
-6
No files matched your search
@@ -71,6 +71,13 @@ func scanNonportableRegisters(t *ast.Text) []Diagnostic {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
// A statement pinned to the extension layer sits outside the
|
||||
// portability premise already: go tool asm knows none of its
|
||||
// mnemonics, so advising the canonical word spelling inside one is
|
||||
// noise on a statement the toolchain would refuse whole.
|
||||
if amd64ExtPinned(strings.ToUpper(in.Mnemonic.Text)) {
|
||||
continue
|
||||
}
|
||||
for _, op := range in.Operands {
|
||||
if op.Addr.Sym != nil && op.Addr.Sym.Pseudo == "" {
|
||||
report(op.Addr.Sym.Name, op.Pos)
|
||||
|
||||
Reference in new issue
Block a user