Changeset 16805


Ignore:
Timestamp:
Dec 22, 2016, 4:25:18 PM (3 years ago)
Author:
wws
Message:

Fix SUBTAG-BYTES for x8632, x8664, ppc32, & arm, so
that fasl dump and load work correctly for complex single-float and
double-float vectors.

I did NOT fix the PPC64 case. Somebody with that hardware will have to
do that.

Addresses #1396.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-array.lisp

    r16685 r16805  
    766766                (if (= subtag target::subtag-double-float-vector)
    767767                  6
    768                   0)))))
     768                  (if (= subtag target::subtag-complex-double-float-vector)
     769                      (return-from subtag-bytes
     770                        ;; There's a 32-bit pad at the beginning of the vector.
     771                        (+ 4 (ash element-count 4)))
     772                      (if (= subtag target::subtag-complex-single-float-vector)
     773                          (return-from subtag-bytes
     774                            ;; There's a 32-bit pad at the beginning of the vector.
     775                            (+ 4 (ash element-count 3)))
     776                          0)))))))
    769777         (total-bits (ash element-count element-bit-shift)))
    770778    (ash (+ 7 total-bits) -3)))
     
    804812                (if (= subtag x8632::subtag-double-float-vector)
    805813                  6
    806                   0)))))
     814                  (if (= subtag x8632::subtag-complex-double-float-vector)
     815                      (return-from subtag-bytes
     816                        ;; There's a 32-bit pad at the beginning of the vector.
     817                        (+ 4 (ash element-count 4)))
     818                      (if (= subtag x8632::subtag-complex-single-float-vector)
     819                          (return-from subtag-bytes
     820                            ;; There's a 32-bit pad at the beginning of the vector.
     821                            (+ 4 (ash element-count 3)))
     822                          0)))))))
    807823         (total-bits (ash element-count element-bit-shift)))
    808824    (ash (+ 7 total-bits) -3)))
     
    824840                (if (= subtag x8664::subtag-bit-vector)
    825841                  0
    826                   (if (>= subtag x8664::min-8-bit-ivector-subtag)
    827                     3
    828                     4)))))
     842                  (if (= subtag x8664::subtag-complex-double-float-vector)
     843                      (return-from subtag-bytes
     844                        ;; There's a 64-bit pad at the beginning of the vector.
     845                        (+ 8 (ash element-count 4)))
     846                      (if (>= subtag x8664::min-8-bit-ivector-subtag)
     847                          3
     848                          4))))))
    829849         (total-bits (ash element-count element-bit-shift)))
    830850    (declare (fixnum ivector-class element-bit-shift total-bits))
Note: See TracChangeset for help on using the changeset viewer.