Source file test/codegen/wasmimport.go
1 // asmcheck 2 3 // Copyright 2026 The Go Authors. All rights reserved. 4 // Use of this source code is governed by a BSD-style 5 // license that can be found in the LICENSE file. 6 7 //go:build wasm 8 9 package codegen 10 11 // Imported 32-bit values should not be widened just to store them on the Go stack. 12 13 //go:wasmimport test int32 14 func ImportInt32() int32 // wasm:`I32Store\s` -`I64ExtendI32U` 15 16 //go:wasmimport test bool 17 func ImportBool() bool // wasm:`I32Store8` -`I64ExtendI32U` 18 19 // Pointer results must retain their full Go pointer width on each architecture. 20 21 //go:wasmimport test pointer 22 func ImportPointer() *byte // wasm:`I64ExtendI32U` `I64Store\s` 23 24 //go:wasmimport test int64 25 func ImportInt64() int64 // wasm:`I64Store\s` 26