diff options
| author | 2025-02-25 12:48:02 +0100 | |
|---|---|---|
| committer | 2025-02-25 12:48:02 +0100 | |
| commit | d2cf9de726c4b8b45a4b17f244e5e00f57f88c16 (patch) | |
| tree | ce2e2a8dcd8f07ff69158ab1eb1709bcfc1b8800 /vendor/github.com/tetratelabs/wazero/internal | |
| parent | [docs] Fix swagger operation descriptions (#3830) (diff) | |
| download | gotosocial-d2cf9de726c4b8b45a4b17f244e5e00f57f88c16.tar.xz | |
[chore]: Bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0 (#3827)
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.2...v1.9.0)
---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal')
5 files changed, 33 insertions, 25 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64/machine.go b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64/machine.go index 7c27c92af..fd0d69ca9 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64/machine.go +++ b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64/machine.go @@ -1918,6 +1918,9 @@ func (m *machine) lowerCall(si *ssa.Instruction) { for i := regalloc.RealReg(0); i < 16; i++ { m.insert(m.allocateInstr().asDefineUninitializedReg(regInfo.RealRegToVReg[xmm0+i])) } + // Since Go 1.24 it may also use DX, which is not reserved for the function call's 3 args. + // https://github.com/golang/go/blob/go1.24.0/src/runtime/memmove_amd64.s#L123 + m.insert(m.allocateInstr().asDefineUninitializedReg(regInfo.RealRegToVReg[rdx])) } if isDirectCall { @@ -1933,6 +1936,7 @@ func (m *machine) lowerCall(si *ssa.Instruction) { for i := regalloc.RealReg(0); i < 16; i++ { m.insert(m.allocateInstr().asNopUseReg(regInfo.RealRegToVReg[xmm0+i])) } + m.insert(m.allocateInstr().asNopUseReg(regInfo.RealRegToVReg[rdx])) } var index int diff --git a/vendor/github.com/tetratelabs/wazero/internal/platform/platform.go b/vendor/github.com/tetratelabs/wazero/internal/platform/platform.go index b9af094c1..532cc7b8c 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/platform/platform.go +++ b/vendor/github.com/tetratelabs/wazero/internal/platform/platform.go @@ -6,18 +6,28 @@ package platform import ( "runtime" -) -// archRequirementsVerified is set by platform-specific init to true if the platform is supported -var archRequirementsVerified bool + "github.com/tetratelabs/wazero/api" + "github.com/tetratelabs/wazero/experimental" +) // CompilerSupported includes constraints here and also the assembler. func CompilerSupported() bool { + return CompilerSupports(api.CoreFeaturesV2) +} + +func CompilerSupports(features api.CoreFeatures) bool { switch runtime.GOOS { case "linux", "darwin", "freebsd", "netbsd", "dragonfly", "windows": - return archRequirementsVerified + if runtime.GOARCH == "arm64" { + if features.IsEnabled(experimental.CoreFeaturesThreads) { + return CpuFeatures.Has(CpuFeatureArm64Atomic) + } + return true + } + fallthrough case "solaris", "illumos": - return runtime.GOARCH == "amd64" && archRequirementsVerified + return runtime.GOARCH == "amd64" && CpuFeatures.Has(CpuFeatureAmd64SSE4_1) default: return false } diff --git a/vendor/github.com/tetratelabs/wazero/internal/platform/platform_amd64.go b/vendor/github.com/tetratelabs/wazero/internal/platform/platform_amd64.go deleted file mode 100644 index 59aaf5eae..000000000 --- a/vendor/github.com/tetratelabs/wazero/internal/platform/platform_amd64.go +++ /dev/null @@ -1,7 +0,0 @@ -package platform - -// init verifies that the current CPU supports the required AMD64 instructions -func init() { - // Ensure SSE4.1 is supported. - archRequirementsVerified = CpuFeatures.Has(CpuFeatureAmd64SSE4_1) -} diff --git a/vendor/github.com/tetratelabs/wazero/internal/platform/platform_arm64.go b/vendor/github.com/tetratelabs/wazero/internal/platform/platform_arm64.go deleted file mode 100644 index a8df707c7..000000000 --- a/vendor/github.com/tetratelabs/wazero/internal/platform/platform_arm64.go +++ /dev/null @@ -1,7 +0,0 @@ -package platform - -// init verifies that the current CPU supports the required ARM64 features -func init() { - // Ensure atomic instructions are supported. - archRequirementsVerified = CpuFeatures.Has(CpuFeatureArm64Atomic) -} diff --git a/vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go b/vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go index a9b01eb6a..32d6ebb37 100644 --- a/vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go +++ b/vendor/github.com/tetratelabs/wazero/internal/sysfs/osfile.go @@ -4,7 +4,6 @@ import ( "io" "io/fs" "os" - "runtime" experimentalsys "github.com/tetratelabs/wazero/experimental/sys" "github.com/tetratelabs/wazero/internal/fsapi" @@ -12,11 +11,17 @@ import ( ) func newOsFile(path string, flag experimentalsys.Oflag, perm fs.FileMode, f *os.File) fsapi.File { - // Windows cannot read files written to a directory after it was opened. - // This was noticed in #1087 in zig tests. Use a flag instead of a - // different type. - reopenDir := runtime.GOOS == "windows" - return &osFile{path: path, flag: flag, perm: perm, reopenDir: reopenDir, file: f, fd: f.Fd()} + // On POSIX, if a file is removed from or added to the directory after the + // most recent call to opendir() or rewinddir(), whether a subsequent call + // to readdir() returns an entry for that file is unspecified. + // + // And Windows cannot read files added to a directory after it was opened. + // This was noticed in #1087 in zig tests. + // + // So there is no guarantee that files added after opendir() will be visible + // in readdir(). Since we want those files to be visible, we need to + // reopendir() to get the new state of the directory before readdir(). + return &osFile{path: path, flag: flag, perm: perm, reopenDir: true, file: f, fd: f.Fd()} } // osFile is a file opened with this package, and uses os.File or syscalls to @@ -270,6 +275,9 @@ func (f *osFile) Pwrite(buf []byte, off int64) (n int, errno experimentalsys.Err // Truncate implements the same method as documented on sys.File func (f *osFile) Truncate(size int64) (errno experimentalsys.Errno) { + if size < 0 { + return experimentalsys.EINVAL + } if errno = experimentalsys.UnwrapOSError(f.file.Truncate(size)); errno != 0 { // Defer validation overhead until we've already had an error. errno = fileError(f, f.closed, errno) |
