build: unify Label function signatures
The Context.Label method and LABEL global function did not agree. Also breaks the convention I'd like to set that capitalized functions must agree with existing Go assembly syntax. To help avoid a conflict with `avo.Label`, attributes were moved to their own package. Fixes #35
This commit is contained in:
@@ -14,14 +14,14 @@ func main() {
|
||||
n := Load(Param("xs").Len(), GP64())
|
||||
s := GP64()
|
||||
XORQ(s, s)
|
||||
LABEL("loop")
|
||||
Label("loop")
|
||||
CMPQ(n, Imm(0))
|
||||
JE(LabelRef("done"))
|
||||
ADDQ(Mem{Base: ptr}, s)
|
||||
ADDQ(Imm(8), ptr)
|
||||
DECQ(n)
|
||||
JMP(LabelRef("loop"))
|
||||
LABEL("done")
|
||||
Label("done")
|
||||
Store(s, ReturnIndex(0))
|
||||
RET()
|
||||
Generate()
|
||||
|
||||
Reference in New Issue
Block a user