build: support comments in functions (#41)

This commit is contained in:
Michael McLoughlin
2019-01-11 10:33:41 -08:00
parent 27cea3be8b
commit 284ee13ada
10 changed files with 117 additions and 23 deletions

16
tests/fmt/fmt.s Normal file
View File

@@ -0,0 +1,16 @@
// Code generated by command: go run asm.go -out fmt.s -stubs stub.go. DO NOT EDIT.
#include "textflag.h"
// func Formatting()
TEXT ·Formatting(SB), NOSPLIT, $0
ADDQ R8, R8
// One comment line between instructions.
ADDQ R8, R8
// Comment before label.
label:
// Comment after label.
ADDQ R8, R8
RET