ssa:inlineAsmFull

This commit is contained in:
luoliwoshang
2025-08-20 20:49:55 +08:00
parent ae36ef4a0e
commit f5d4f93ed7
4 changed files with 42 additions and 16 deletions

View File

@@ -2,16 +2,12 @@ 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),
"value": 42,
})
_ = result
println("Result:", result)
}