feat:llgo.Asm

test:asm test with `nop`
This commit is contained in:
luoliwoshang
2025-08-17 13:53:55 +08:00
parent b2c6534c92
commit a148964878
6 changed files with 80 additions and 0 deletions

18
_demo/asmcall/asmcall.go Normal file
View File

@@ -0,0 +1,18 @@
package main
import (
"fmt"
"time"
)
//llgo:link asm llgo.asm
func asm(instruction string) {}
func main() {
start := time.Now()
for i := 0; i < 100000; i++ {
asm("nop")
}
duration := time.Since(start)
fmt.Println("Duration:", duration)
}