File: asm.go

package info (click to toggle)
golang-github-mmcloughlin-avo 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 15,024 kB
  • sloc: xml: 71,029; asm: 14,862; sh: 194; makefile: 21; ansic: 11
file content (22 lines) | stat: -rw-r--r-- 435 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//go:build ignore
// +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)
	r := GP32()
	MOVQ(xmm, r)
	Store(r, ReturnIndex(0))
	RET()
	Generate()
}