pass,printer: display required ISA features (#120)

Fixes #119
This commit is contained in:
Michael McLoughlin
2020-01-19 16:45:09 -08:00
committed by GitHub
parent b0ac74488c
commit cde7e9483b
14 changed files with 2042 additions and 0 deletions

View File

@@ -63,6 +63,10 @@ func (p *goasm) function(f *ir.Function) {
p.NL()
p.Comment(f.Stub())
if len(f.ISA) > 0 {
p.Comment("Requires: " + strings.Join(f.ISA, ", "))
}
// Reference: https://github.com/golang/go/blob/b115207baf6c2decc3820ada4574ef4e5ad940ec/src/cmd/internal/obj/util.go#L166-L176
//
// if p.As == ATEXT {