This commit is contained in:
parent
55d6161f6e
commit
cf86d65890
27
.drone.yml
27
.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 .
|
||||
...
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue