2021-10-29 01:18:34 -07:00
|
|
|
//go:build ignore
|
2019-01-11 10:33:41 -08:00
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
. "github.com/mmcloughlin/avo/build"
|
2019-04-15 19:42:11 -07:00
|
|
|
. "github.com/mmcloughlin/avo/operand"
|
2019-01-11 10:33:41 -08:00
|
|
|
. "github.com/mmcloughlin/avo/reg"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
TEXT("Formatting", NOSPLIT, "func()")
|
|
|
|
|
Doc("Formatting contains various cases to test the formatter.")
|
|
|
|
|
|
|
|
|
|
ADDQ(R8, R8)
|
|
|
|
|
Comment("One comment line between instructions.")
|
|
|
|
|
ADDQ(R8, R8)
|
|
|
|
|
|
|
|
|
|
Comment("Comment before label.")
|
|
|
|
|
Label("label")
|
|
|
|
|
Comment("Comment after label.")
|
|
|
|
|
ADDQ(R8, R8)
|
2019-04-15 19:42:11 -07:00
|
|
|
JMP(LabelRef("label"))
|
2019-01-11 10:33:41 -08:00
|
|
|
|
|
|
|
|
RET()
|
|
|
|
|
|
|
|
|
|
Generate()
|
|
|
|
|
}
|