From 6a675659e4eb61251b37f76334267d8327ba2693 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sun, 16 Aug 2015 03:15:37 -0500 Subject: [PATCH] Really fix vupkhsb/vupklsb. --- src/xenia/cpu/backend/x64/x64_sequences.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/backend/x64/x64_sequences.cc b/src/xenia/cpu/backend/x64/x64_sequences.cc index 907a672c4..cee273e16 100644 --- a/src/xenia/cpu/backend/x64/x64_sequences.cc +++ b/src/xenia/cpu/backend/x64/x64_sequences.cc @@ -6875,7 +6875,8 @@ struct UNPACK : Sequence> { assert_always(); } else { // signed -> signed - e.vpunpckhbw(i.dest, i.src1, i.src1); + e.vpshufb(i.dest, i.src1, e.GetXmmConstPtr(XMMByteOrderMask)); + e.vpunpckhbw(i.dest, i.dest, i.dest); e.vpsraw(i.dest, 8); } } @@ -6895,7 +6896,8 @@ struct UNPACK : Sequence> { assert_always(); } else { // signed -> signed - e.vpunpcklbw(i.dest, i.src1, i.src1); + e.vpshufb(i.dest, i.src1, e.GetXmmConstPtr(XMMByteOrderMask)); + e.vpunpcklbw(i.dest, i.dest, i.dest); e.vpsraw(i.dest, 8); } }