From f356cf5df8590e1f46612ba5e205777769923c16 Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Thu, 3 Feb 2022 13:42:19 -0800 Subject: [PATCH] [x64] Add `VECTOR_ROTATE_LEFT_I32` overflow-test Edit one of the lanes in this unit-test to be larger than the width of the element-size to ensure that this case is handled correctly. It should only mask the lower `log2(32)=5` bits of the input, causing `33`(`100001`) to be `1`(`000001`). --- src/xenia/cpu/testing/vector_rotate_left_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/testing/vector_rotate_left_test.cc b/src/xenia/cpu/testing/vector_rotate_left_test.cc index 406caa157..d7d76c542 100644 --- a/src/xenia/cpu/testing/vector_rotate_left_test.cc +++ b/src/xenia/cpu/testing/vector_rotate_left_test.cc @@ -2,7 +2,7 @@ ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** - * Copyright 2014 Ben Vanik. All rights reserved. * + * Copyright 2022 Ben Vanik. All rights reserved. * * Released under the BSD license - see LICENSE in the root for more details. * ****************************************************************************** */ @@ -62,7 +62,7 @@ TEST_CASE("VECTOR_ROTATE_LEFT_I32", "[instr]") { test.Run( [](PPCContext* ctx) { ctx->v[4] = vec128i(0x00000001, 0x00000001, 0x80000000, 0x80000000); - ctx->v[5] = vec128i(0, 1, 1, 2); + ctx->v[5] = vec128i(0, 1, 33, 2); }, [](PPCContext* ctx) { auto result = ctx->v[3];