diff --git a/basis/cpu/ppc/ppc.factor b/basis/cpu/ppc/ppc.factor index de37cd6ee3..11dbc27ac0 100644 --- a/basis/cpu/ppc/ppc.factor +++ b/basis/cpu/ppc/ppc.factor @@ -397,13 +397,13 @@ M: ppc %alien-cell LWZ ; M: ppc %alien-float LFS ; M: ppc %alien-double LFD ; -M: ppc %set-alien-integer-1 swapd STB ; -M: ppc %set-alien-integer-2 swapd STH ; +M: ppc %set-alien-integer-1 -rot STB ; +M: ppc %set-alien-integer-2 -rot STH ; -M: ppc %set-alien-cell swapd STW ; +M: ppc %set-alien-cell -rot STW ; -M: ppc %set-alien-float swapd STFS ; -M: ppc %set-alien-double swapd STFD ; +M: ppc %set-alien-float -rot STFS ; +M: ppc %set-alien-double -rot STFD ; : load-zone-ptr ( reg -- ) "nursery" %load-vm-field-addr ; diff --git a/basis/math/vectors/simd/functor/functor.factor b/basis/math/vectors/simd/functor/functor.factor index 5b72c544ae..ad45a2c902 100644 --- a/basis/math/vectors/simd/functor/functor.factor +++ b/basis/math/vectors/simd/functor/functor.factor @@ -7,6 +7,7 @@ math.vectors.specialization parser prettyprint.custom sequences sequences.private strings words definitions macros cpu.architecture namespaces arrays quotations combinators sets layouts ; QUALIFIED-WITH: alien.c-types c +QUALIFIED: math.private IN: math.vectors.simd.functor ERROR: bad-length got expected ; @@ -16,8 +17,8 @@ MACRO: simd-boa ( rep class -- simd-array ) : can-be-unboxed? ( type -- ? ) { - { c:float [ t ] } - { c:double [ t ] } + { c:float [ \ math.private:float+ "intrinsic" word-prop ] } + { c:double [ \ math.private:float+ "intrinsic" word-prop ] } [ c:heap-size cell < ] } case ; @@ -37,7 +38,7 @@ MACRO: simd-boa ( rep class -- simd-array ) : simd-with ( rep class x -- simd-array ) [ rep-components ] [ new ] [ '[ _ ] ] tri* swap replicate-as ; inline -: simd-with-fast? ( rep -- ? ) +: simd-with/nth-fast? ( rep -- ? ) [ \ (simd-vshuffle) supported-simd-op? ] [ rep-component-type can-be-unboxed? ] bi and ; @@ -45,16 +46,11 @@ MACRO: simd-boa ( rep class -- simd-array ) :: define-with-custom-inlining ( word rep class -- ) word [ drop - rep simd-with-fast? [ + rep simd-with/nth-fast? [ [ rep rep-coerce rep (simd-with) class boa ] ] [ word def>> ] if ] "custom-inlining" set-word-prop ; -: simd-nth-fast? ( rep -- ? ) - [ \ (simd-vshuffle) supported-simd-op? ] - [ rep-component-type can-be-unboxed? ] - bi and ; - : simd-nth-fast ( rep -- quot ) [ rep-components ] keep '[ swap _ '[ _ _ (simd-select) ] 2array ] map-index @@ -64,7 +60,7 @@ MACRO: simd-boa ( rep class -- simd-array ) rep-component-type dup c:c-type-getter-boxer c:array-accessor ; MACRO: simd-nth ( rep -- x ) - dup simd-nth-fast? [ simd-nth-fast ] [ simd-nth-slow ] if ; + dup simd-with/nth-fast? [ simd-nth-fast ] [ simd-nth-slow ] if ; : boa-effect ( rep n -- effect ) [ rep-components ] dip *