From 25c36b95d1523f22d4c46ec237acc03e00540e0a Mon Sep 17 00:00:00 2001 From: David Chase Date: Fri, 19 Sep 2025 13:07:59 -0400 Subject: [dev.simd] simd, cmd/compile: add 128 bit select-from-pair Using this name until a better one appears: x.Select128FromPair(3, 2, y) Includes test for constant and variable case. Checks for unexpected immediates (using the zeroing flag, which is not supported for this intrinsic) and panics. Change-Id: I9249475d6572968c127b4ee9e00328d717c07578 Reviewed-on: https://go-review.googlesource.com/c/go/+/705496 Reviewed-by: Junyang Shao LUCI-TryBot-Result: Go LUCI --- src/runtime/panic.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/runtime/panic.go') diff --git a/src/runtime/panic.go b/src/runtime/panic.go index 8c91c9435a..d7bce70fe5 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -341,6 +341,13 @@ func panicmemAddr(addr uintptr) { panic(errorAddressString{msg: "invalid memory address or nil pointer dereference", addr: addr}) } +var simdImmError = error(errorString("out-of-range immediate for simd intrinsic")) + +func panicSimdImm() { + panicCheck2("simd immediate error") + panic(simdImmError) +} + // Create a new deferred function fn, which has no arguments and results. // The compiler turns a defer statement into a call to this. func deferproc(fn func()) { -- cgit v1.3