| 1 |
|
| 2 |
|
| 3 |
package main |
| 4 |
|
| 5 |
import ( |
| 6 |
. "github.com/mmcloughlin/avo/build" |
| 7 |
. "github.com/mmcloughlin/avo/operand" |
| 8 |
. "github.com/mmcloughlin/avo/reg" |
| 9 |
) |
| 10 |
|
| 11 |
func main() { |
| 12 |
TEXT("Formatting", NOSPLIT, "func()") |
| 13 |
Doc("Formatting contains various cases to test the formatter.") |
| 14 |
|
| 15 |
ADDQ(R8, R8) |
| 16 |
Comment("One comment line between instructions.") |
| 17 |
ADDQ(R8, R8) |
| 18 |
|
| 19 |
Comment("Comment before label.") |
| 20 |
Label("label") |
| 21 |
Comment("Comment after label.") |
| 22 |
ADDQ(R8, R8) |
| 23 |
JMP(LabelRef("label")) |
| 24 |
|
| 25 |
RET() |
| 26 |
|
| 27 |
Generate() |
| 28 |
} |