examples/sha1: single block

This commit is contained in:
Michael McLoughlin
2018-12-21 00:30:59 -08:00
parent 224cccd2b1
commit f464082484
8 changed files with 1525 additions and 11 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/mmcloughlin/avo"
"github.com/mmcloughlin/avo/gotypes"
"github.com/mmcloughlin/avo/operand"
"github.com/mmcloughlin/avo/reg"
"golang.org/x/tools/go/packages"
)
@@ -69,6 +70,10 @@ func (c *Context) types() *types.Package {
return c.pkg.Types
}
func (c *Context) AllocLocal(size int) operand.Mem {
return c.activefunc().AllocLocal(size)
}
func (c *Context) Instruction(i *avo.Instruction) {
c.activefunc().AddNode(i)
}