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.
internal/load: support additional MOVQ forms
The Go assembler merges MOVD/MOVQ instruction forms. The logic in the avo instruction loader was discarding the MOVD forms. This diff should merge them correctly. Updates mmcloughlin#50
- Loading branch information
1 parent
5dc9498
commit 220969f
Showing
11 changed files
with
280 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,21 @@ | ||
// +build ignore | ||
|
||
package main | ||
|
||
import ( | ||
. "github.com/mmcloughlin/avo/build" | ||
) | ||
|
||
func main() { | ||
TEXT("Issue50", NOSPLIT, "func(x uint32) uint32") | ||
Doc( | ||
"Issue50 reported that MOVD/MOVQ was missing the r32, xmm form.", | ||
"This function deliberately exercises this instruction form.", | ||
) | ||
x := Load(Param("x"), GP32()) | ||
xmm := XMM() | ||
MOVQ(x, xmm) | ||
Store(xmm, ReturnIndex(0)) | ||
RET() | ||
Generate() | ||
} |
Empty file.
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,15 @@ | ||
package issue50 | ||
|
||
import ( | ||
"testing" | ||
"testing/quick" | ||
) | ||
|
||
//go:generate go run asm.go -out issue50.s -stubs stub.go | ||
|
||
func TestIssue50(t *testing.T) { | ||
expect := func(x uint32) uint32 { return x } | ||
if err := quick.CheckEqual(Issue50, expect, nil); err != nil { | ||
t.Fatal(err) | ||
} | ||
} |
Empty file.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.