From 559f93f35327d47df19fb887707ac0e9a01a01e8 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Tue, 24 Nov 2020 00:05:47 -0600 Subject: [PATCH] GSdx: Fix sse2 build on clang --- plugins/GSdx/GSVector4i.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSVector4i.h b/plugins/GSdx/GSVector4i.h index c68f90b640..b67afee4fa 100644 --- a/plugins/GSdx/GSVector4i.h +++ b/plugins/GSdx/GSVector4i.h @@ -777,10 +777,11 @@ public: #else + // The `& 0xF` keeps the compiler happy on cases that won't actually be hit if(i == 0) return *this; - else if(i < 16) return srl() | v.sll<16 - i>(); + else if(i < 16) return srl() | v.sll<(16 - i) & 0xF>(); else if(i == 16) return v; - else if(i < 32) return v.srl(); + else if(i < 32) return v.srl<(i - 16) & 0xF>(); else return zero(); #endif