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

@@ -44,6 +44,19 @@ func NewParamAddr(name string, offset int) Mem {
}
}
func NewStackAddr(offset int) Mem {
return Mem{
Disp: offset,
Base: reg.StackPointer,
}
}
func (m Mem) Idx(idx int) Mem {
a := m
a.Disp += idx
return a
}
func (m Mem) Asm() string {
a := m.Symbol.String()
if m.Disp != 0 {