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:
@@ -11,7 +11,7 @@ import (
|
||||
var unroll = 6
|
||||
|
||||
func main() {
|
||||
TEXT("Dot", "func(x, y []float32) float32")
|
||||
TEXT("Dot", NOSPLIT, "func(x, y []float32) float32")
|
||||
x := Mem{Base: Load(Param("x").Base(), GP64())}
|
||||
y := Mem{Base: Load(Param("y").Base(), GP64())}
|
||||
n := Load(Param("x").Len(), GP64())
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Code generated by command: go run asm.go -out dot.s -stubs stub.go. DO NOT EDIT.
|
||||
|
||||
#include "textflag.h"
|
||||
|
||||
// func Dot(x []float32, y []float32) float32
|
||||
TEXT ·Dot(SB), $0-52
|
||||
TEXT ·Dot(SB), NOSPLIT, $0-52
|
||||
MOVQ x_base(FP), AX
|
||||
MOVQ y_base+24(FP), CX
|
||||
MOVQ x_len+8(FP), DX
|
||||
|
||||
Reference in New Issue
Block a user