forked from mmcloughlin/avo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: support comments in functions (mmcloughlin#41)
- Loading branch information
1 parent
27cea3b
commit 284ee13
Showing
10 changed files
with
117 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// +build ignore | ||
|
||
package main | ||
|
||
import ( | ||
. "github.com/mmcloughlin/avo/build" | ||
. "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) | ||
|
||
RET() | ||
|
||
Generate() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Code generated by command: go run asm.go -out fmt.s -stubs stub.go. DO NOT EDIT. | ||
|
||
#include "textflag.h" | ||
|
||
// func Formatting() | ||
TEXT ·Formatting(SB), NOSPLIT, $0 | ||
ADDQ R8, R8 | ||
|
||
// One comment line between instructions. | ||
ADDQ R8, R8 | ||
|
||
// Comment before label. | ||
label: | ||
// Comment after label. | ||
ADDQ R8, R8 | ||
RET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Package fmt tests assembly printer formatting. | ||
package fmt | ||
|
||
//go:generate go run asm.go -out fmt.s -stubs stub.go |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.