Merge pull request #18 from Sonicadvance1/Interpreter/vushr

Removes undefined behaviour in the VUSHR in interpreter
This commit is contained in:
Ryan Houdek authored and GitHub committed 2020-03-13 13:04:56 -07:00
commit 4459a048f7
1 file changed
+1 -1
@@ -2715,7 +2715,7 @@ void InterpreterCore::ExecuteCode(FEXCore::Core::InternalThreadState *Thread) {
uint8_t Tmp[16];
uint8_t Elements = Op->RegisterSize / Op->ElementSize;
auto Func = [](auto a, auto b) { return a >> b; };
auto Func = [](auto a, auto b) { return b >= (sizeof(a) * 8) ? 0 : a >> b; };
switch (Op->ElementSize) {
DO_VECTOR_OP(1, uint8_t, Func)