diff --git a/basis/compiler/cfg/instructions/instructions.factor b/basis/compiler/cfg/instructions/instructions.factor index 8e668c8f11..de18a9b5f9 100644 --- a/basis/compiler/cfg/instructions/instructions.factor +++ b/basis/compiler/cfg/instructions/instructions.factor @@ -303,11 +303,13 @@ literal: rep ; PURE-INSN: ##unpack-vector-head def: dst use: src +temp: temp literal: rep ; PURE-INSN: ##unpack-vector-tail def: dst use: src +temp: temp literal: rep ; PURE-INSN: ##integer>float-vector @@ -813,8 +815,6 @@ UNION: def-is-use-insn ##box-displaced-alien ##compare-vector ##not-vector -##unpack-vector-head -##unpack-vector-tail ##string-nth ##unbox-any-c-ptr ; diff --git a/basis/cpu/architecture/architecture.factor b/basis/cpu/architecture/architecture.factor index 67f5018f58..b1417a590e 100644 --- a/basis/cpu/architecture/architecture.factor +++ b/basis/cpu/architecture/architecture.factor @@ -234,8 +234,8 @@ HOOK: %merge-vector-head cpu ( dst src1 src2 rep -- ) HOOK: %merge-vector-tail cpu ( dst src1 src2 rep -- ) HOOK: %signed-pack-vector cpu ( dst src1 src2 rep -- ) HOOK: %unsigned-pack-vector cpu ( dst src1 src2 rep -- ) -HOOK: %unpack-vector-head cpu ( dst src rep -- ) -HOOK: %unpack-vector-tail cpu ( dst src rep -- ) +HOOK: %unpack-vector-head cpu ( dst src temp rep -- ) +HOOK: %unpack-vector-tail cpu ( dst src temp rep -- ) HOOK: %integer>float-vector cpu ( dst src rep -- ) HOOK: %float>integer-vector cpu ( dst src rep -- ) HOOK: %compare-vector cpu ( dst src1 src2 temp rep cc -- ) diff --git a/basis/cpu/x86/x86.factor b/basis/cpu/x86/x86.factor index 4d3a3203a8..ef0ccf971e 100644 --- a/basis/cpu/x86/x86.factor +++ b/basis/cpu/x86/x86.factor @@ -783,23 +783,25 @@ M: x86 %unsigned-pack-vector-reps { longlong-2-rep [ PCMPGTQ ] } } case ; -:: (%unpack-vector-dest) ( dst src rep -- ) +:: (%unpack-vector-signs) ( dst src rep -- ) dst rep signed-int-vector-rep? [ src rep %sign-extension-vector ] [ rep %zero-vector ] if ; -M: x86 %unpack-vector-head ( dst src rep -- ) - [ (%unpack-vector-dest) ] 3keep - unsign-rep { +M:: x86 %unpack-vector-head ( dst src temp rep -- ) + temp src rep (%unpack-vector-signs) + dst src rep %copy + dst temp rep unsign-rep { { char-16-rep [ PUNPCKLBW ] } { short-8-rep [ PUNPCKLWD ] } { int-4-rep [ PUNPCKLDQ ] } { longlong-2-rep [ PUNPCKLQDQ ] } } case ; -M: x86 %unpack-vector-tail ( dst src rep -- ) - [ (%unpack-vector-dest) ] 3keep - unsign-rep { +M:: x86 %unpack-vector-tail ( dst src temp rep -- ) + temp src rep (%unpack-vector-signs) + dst src rep %copy + dst temp rep unsign-rep { { char-16-rep [ PUNPCKHBW ] } { short-8-rep [ PUNPCKHWD ] } { int-4-rep [ PUNPCKHDQ ] }