Repository navigation
simd(s390x): vector-facility kernels; native-endian AT_HWCAP - #37
Merged
Merged
Conversation
…div; native-endian AT_HWCAP Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
asmgen/s390x/gen.go→sum_s390x.s), for sum, dot (VFMADB), sqrt (VFSQDB) and add/sub/mul/div (VFADB/VFSDB/VFMDB/VFDDB). Each loop takes eight float64 in four two-lane registers (VLM/VSTM), then a scalar tail. No WORDs.HWCAP_S390_VXRS(bit 11). Every z13+ has the facility, but a kernel can disable it.VFSDB V1, V2, V3gives V3 = V2 − V1;VFDDBfollows the same pattern;VFMADB V1, V2, V3, V4gives V4 = V1·V2 + V3;FSUB F1, F0gives F0 = F0 − F1.hwcapFromparsed/proc/self/auxvas little-endian, which is wrong on big-endian s390x. It now usesbinary.NativeEndian, and its test builds auxv in native order too. Under emulation,useVXcomes out true as it should.reduce_generic.go/dot_generic.gonow cover only the 32-bit targets. The fence and guard tests include s390x. The s390x qemu lane regenerates and checkssum_s390x.s.Validation — ⚠ emulation only
No s390x host was reachable (the LinuxONE timed out), so nothing here is a performance claim. Docs, README and SECURITY.md all say so.
useVX = true.sub n=8 [0]: simd=-1286.9…, scalar=1286.9…), and a dot that does not advanceb(Dot1DP … != …).go vetpasses on 8 architectures, andgo test -cbuilds on every dist pair.Version: v0.8.0: kernels on the last 64-bit target, plus the AT_HWCAP byte-order fix.
🤖 Generated with Claude Code