cl/instr:replace register & build constraints

This commit is contained in:
luoliwoshang
2025-08-20 19:40:22 +08:00
parent 485dbe4021
commit ae36ef4a0e
3 changed files with 247 additions and 5 deletions

17
cl/_testrt/asmfull/in.go Normal file
View File

@@ -0,0 +1,17 @@
package main
import _ "unsafe"
//go:linkname asm llgo.asm
func asm(instruction string)
//go:linkname asmFull llgo.asm
func asmFull(instruction string, regs map[string]any) uintptr
func main() {
asm("nop")
result := asmFull("mov {}, {value}", map[string]any{
"value": uint32(42),
})
_ = result
}