Files
avo/tests/cast/asm.go
Michael McLoughlin 34ac353c14 all: remove +build tags (#377)
Commit 759be3dad9 bumped our Go
requirement to 1.18 which allows us to drop support for old-style
`+build` tags. This change runs `go fix ./...` to remove them, and
updates some remaining code generators that produced `+build` lines.
2023-03-05 20:30:01 -08:00

23 lines
472 B
Go

//go:build ignore
package main
import . "github.com/mmcloughlin/avo/build"
func main() {
TEXT("Split", NOSPLIT, "func(x uint64) (q uint64, l uint32, w uint16, b uint8)")
Doc(
"Split returns the low 64, 32, 16 and 8 bits of x.",
"Tests the As() methods of virtual general-purpose registers.",
)
x := GP64()
Load(Param("x"), x)
Store(x, Return("q"))
Store(x.As32(), Return("l"))
Store(x.As16(), Return("w"))
Store(x.As8(), Return("b"))
RET()
Generate()
}