Three small fixes for avx512

arthur miller <[email protected]>
Newsgroups gmane.lisp.steel-bank.devel
Message-ID <AM6PR09MB2487A8BDD8251CB3925139D196DD2@AM6PR09MB2487.eurprd09.prod.outlook.com>
I hope these are OK, sorry for goofing up.

_______________________________________________
Sbcl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-devel
0001-fix-movdqu64-in-move-for-avx512-test-warning.patch (text/x-patch, 2 KB)
From 8b4b6f0ff519153857b90ea5b353a3afbe11c946 Mon Sep 17 00:00:00 2001
From: arthur <[email protected]>
Date: Tue, 11 Aug 2026 21:48:22 +0200
Subject: [PATCH] fix movdqu64 in move for avx512 + test warning

---
 src/compiler/x86-64/macros.lisp |  3 +--
 tests/simd-pack-512.pure.lisp   | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp
index 498c3b3fd..24ce5c509 100644
--- a/src/compiler/x86-64/macros.lisp
+++ b/src/compiler/x86-64/macros.lisp
@@ -43,11 +43,10 @@
       ((single-avx2-reg double-avx2-reg)
        (aver (xmm-tn-p src))
        (inst vmovaps dst src))
-      ;; fixme512: check if this is correct
       #+sb-simd-pack-512
       (int-avx512-reg
        (aver (xmm-tn-p src))
-       (inst vmovdqu dst src))
+       (inst vmovdqu64 dst src))
       #+sb-simd-pack-512
       ((single-avx512-reg double-avx512-reg)
        (aver (xmm-tn-p src))
diff --git a/tests/simd-pack-512.pure.lisp b/tests/simd-pack-512.pure.lisp
index c41f7df2d..e6cb3ddea 100644
--- a/tests/simd-pack-512.pure.lisp
+++ b/tests/simd-pack-512.pure.lisp
@@ -274,12 +274,13 @@
                    'simd-pack-512))))
 
 (with-test (:name :simd-pack-512-type-errors)
-  ;; Bignum overflow
-  (assert-error (sb-ext:%make-simd-pack-512-ub64
-                 (1+ (ldb (byte 64 0) -1)) 0 0 0 0 0 0 0)
-                type-error)
-  ;; Float mismatch
-  (assert-error (sb-ext:%make-simd-pack-512-single
-                 1d0 0f0 0f0 0f0 0f0 0f0 0f0 0f0
-                 0f0 0f0 0f0 0f0 0f0 0f0 0f0 0f0)
-                type-error))
+  (locally (declare (muffle-conditions warning))
+    ;; Bignum overflow
+    (assert-error (sb-ext:%make-simd-pack-512-ub64
+                   (1+ (ldb (byte 64 0) -1)) 0 0 0 0 0 0 0)
+                  type-error)
+    ;; Float mismatch
+    (assert-error (sb-ext:%make-simd-pack-512-single
+                   1d0 0f0 0f0 0f0 0f0 0f0 0f0 0f0
+                   0f0 0f0 0f0 0f0 0f0 0f0 0f0 0f0)
+                  type-error)))
-- 
2.55.0
0001-Remove-duplicate-primtype-definition-for-simd-pack-5.patch (text/x-patch, 1.5 KB)
From 01edd79d28c24e54a4eaf41a2f96ffbfebe30b68 Mon Sep 17 00:00:00 2001
From: arthur <[email protected]>
Date: Tue, 11 Aug 2026 20:38:13 +0200
Subject: [PATCH] Remove duplicate primtype definition for simd-pack-512

---
 src/compiler/generic/objdef.lisp | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp
index f3290993f..0639cf44e 100644
--- a/src/compiler/generic/objdef.lisp
+++ b/src/compiler/generic/objdef.lisp
@@ -467,22 +467,6 @@ during backtrace.
     (p6 :c-type "long" :type (unsigned-byte 64))
     (p7 :c-type "long" :type (unsigned-byte 64)))
 
-#+sb-simd-pack-512
-(define-primitive-object (simd-pack-512
-                          :lowtag other-pointer-lowtag
-                          :widetag simd-pack-512-widetag)
-    (tag :ref-trans %simd-pack-512-tag
-         :attributes (movable flushable)
-         :type (unsigned-byte 4))
-  (p0 :c-type "long" :type (unsigned-byte 64))
-  (p1 :c-type "long" :type (unsigned-byte 64))
-  (p2 :c-type "long" :type (unsigned-byte 64))
-  (p3 :c-type "long" :type (unsigned-byte 64))
-  (p4 :c-type "long" :type (unsigned-byte 64))
-  (p5 :c-type "long" :type (unsigned-byte 64))
-  (p6 :c-type "long" :type (unsigned-byte 64))
-  (p7 :c-type "long" :type (unsigned-byte 64)))
-
 ;;; Define some slots that precede 'struct thread' so that each may be read
 ;;; using a small negative 1-byte displacement.
 (defconstant-eqx +thread-header-slot-names+ #()
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.