feat(lint): nonportable amd64 register name rule
This commit is contained in:
@@ -449,6 +449,11 @@ func lintText(t *ast.Text, tab *arch.Table, archKnown bool, cfg Config, macros m
|
||||
out = append(out, checkABI0Args(t)...)
|
||||
}
|
||||
|
||||
// Non-portable register spellings (RAX/EAX under go tool asm).
|
||||
if cfg.Arch == arch.AMD64 && !cfg.Disable[CodeNonportableRegister] {
|
||||
out = append(out, scanNonportableRegisters(t)...)
|
||||
}
|
||||
|
||||
// FUNCDATA / PCDATA structural validation.
|
||||
out = append(out, checkFuncdata(t, cfg)...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user