build: add attributes argument to TEXT

Brings the TEXT() function signature closer to how the directive works
in assembly.

Also update almost all examples to use NOSPLIT.

Closes #11
This commit is contained in:
Michael McLoughlin
2019-01-06 20:04:51 -08:00
parent 76db5bb03f
commit 304c7425d2
25 changed files with 105 additions and 72 deletions

View File

@@ -13,7 +13,7 @@ DATA bytes<>+39(SB)/1, $0x77
GLOBL bytes<>(SB), RODATA|NOPTR, $40
// func DataAt(i int) byte
TEXT ·DataAt(SB), $0-9
TEXT ·DataAt(SB), NOSPLIT, $0-9
MOVQ i(FP), AX
LEAQ bytes<>(SB), CX
MOVB (CX)(AX*1), AL