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:
@@ -38,7 +38,7 @@ func makelabels(name string, n int) []string {
|
||||
|
||||
func main() {
|
||||
Package("github.com/mmcloughlin/avo/examples/stadtx")
|
||||
TEXT("Hash", "func(state *State, key []byte) uint64")
|
||||
TEXT("Hash", NOSPLIT, "func(state *State, key []byte) uint64")
|
||||
Doc("Hash computes the Stadtx hash.")
|
||||
|
||||
statePtr := Load(Param("state"), GP64())
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Code generated by command: go run asm.go -out stadtx.s -stubs stub.go. DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func Hash(state *State, key []byte) uint64
|
||||
TEXT ·Hash(SB), $0-40
|
||||
TEXT ·Hash(SB), NOSPLIT, $0-40
|
||||
MOVQ state(FP), AX
|
||||
MOVQ key_base+8(FP), CX
|
||||
MOVQ key_len+16(FP), DX
|
||||
|
||||
Reference in New Issue
Block a user