get the basic add example working

This commit is contained in:
Michael McLoughlin
2018-12-08 22:02:02 -08:00
parent 5431f2edef
commit 20525e1437
4 changed files with 63 additions and 9 deletions

View File

@@ -2,12 +2,14 @@ package main
import (
. "github.com/mmcloughlin/avo/build"
"github.com/mmcloughlin/avo/reg"
)
func main() {
TEXT("add", "func(x, y uint64) uint64")
ADDQ(reg.R8, reg.R11)
x := Load(Param("x"), GP64v())
y := Load(Param("y"), GP64v())
ADDQ(x, y)
Store(x, ReturnIndex(0))
RET()
EOF()
}