slight bugfix for shr_i16x2 in the interpreter

It's doing an arithmetic shift at head,
but we want a logical shift there...

Change-Id: I82eba87ccc3fba6a9511bf3a4d3ff88d90c29585
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220855
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-06-13 15:50:23 -05:00 committed by Skia Commit-Bot
parent 2b5be0aa34
commit 7b50231112

View File

@ -28,7 +28,8 @@ namespace SK_OPTS_NS {
using U32 = skvx::Vec<K, uint32_t>;
using U8 = skvx::Vec<K, uint8_t>;
using I16x2 = skvx::Vec<2*K, int16_t>;
using I16x2 = skvx::Vec<2*K, int16_t>;
using U16x2 = skvx::Vec<2*K, uint16_t>;
union Slot {
I32 i32;
@ -133,7 +134,7 @@ namespace SK_OPTS_NS {
r(d).i32 = skvx::bit_pun<I32>(skvx::bit_pun<I16x2>(r(x ).i32) *
skvx::bit_pun<I16x2>(r(y.id).i32) ); break;
CASE(Op::shr_i16x2):
r(d).i32 = skvx::bit_pun<I32>(skvx::bit_pun<I16x2>(r(x).i32) >> y.imm);
r(d).i32 = skvx::bit_pun<I32>(skvx::bit_pun<U16x2>(r(x).i32) >> y.imm);
break;
CASE(Op::bit_and): r(d).i32 = r(x).i32 & r(y.id).i32; break;