diff --git a/.drone.yml b/.drone.yml index 921ec87..ead7a52 100644 --- a/.drone.yml +++ b/.drone.yml @@ -212,4 +212,31 @@ steps: - apk add --no-cache git bash - apk add --no-cache wasmtime --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing - PATH=$PATH:$(go env GOROOT)/misc/wasm go test -tags purego -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v . +--- +kind: pipeline +type: docker +name: go-wasm-tinygo +platform: + os: linux + arch: arm64 + +environment: + GOPROXY: direct + GOARCH: wasm + GOOS: wasip1 + GOTRACEBACK: 2 + GOEXPERIMENT: "cgocheck2,newinliner" + CGO_ENABLED: "0" + +workspace: + path: /drone/src + +steps: + - name: test + image: tinygo/tinygo:0.31.2 + commands: + - apt-get update + - apt-get install -y git curl bash + - curl https://wasmtime.dev/install.sh -sSf | bash + - PATH=$PATH:$(go env GOROOT)/misc/wasm tinygo test -tags purego -p 1 -gcflags=-d=checkptr -v . ... \ No newline at end of file diff --git a/asm/cpuid_amd64.go b/asm/cpuid_amd64.go index 494e896..cade155 100644 --- a/asm/cpuid_amd64.go +++ b/asm/cpuid_amd64.go @@ -3,5 +3,3 @@ package asm func Cpuid(op uint32) (eax, ebx, ecx, edx uint32) -func Cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -func Xgetbv(index uint32) (eax, edx uint32) diff --git a/asm/cpuid_amd64.s b/asm/cpuid_amd64.s index aa5073d..ccecba5 100644 --- a/asm/cpuid_amd64.s +++ b/asm/cpuid_amd64.s @@ -14,21 +14,3 @@ TEXT ·Cpuid(SB), 7, $0 RET -// func Cpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -TEXT ·Cpuidex(SB), 7, $0 - MOVL op+0(FP), AX - MOVL op2+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func xgetbv(index uint32) (eax, edx uint32) -TEXT ·Xgetbv(SB), 7, $0 - MOVL index+0(FP), CX - BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV - MOVL AX, eax+8(FP) - MOVL DX, edx+12(FP) - RET