From 532418eed43254a6c18f30a11767d9c184819e71 Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Sat, 25 Oct 2025 17:45:49 +0900 Subject: [PATCH] [Tests] Fix broken xenia-cpu tests --- src/xenia/cpu/testing/load_vector_shl_shr_test.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/xenia/cpu/testing/load_vector_shl_shr_test.cc b/src/xenia/cpu/testing/load_vector_shl_shr_test.cc index d982083c8..d853eed55 100644 --- a/src/xenia/cpu/testing/load_vector_shl_shr_test.cc +++ b/src/xenia/cpu/testing/load_vector_shl_shr_test.cc @@ -17,7 +17,9 @@ using xe::cpu::ppc::PPCContext; TEST_CASE("LOAD_VECTOR_SHL", "[instr]") { TestFunction test([](HIRBuilder& b) { - StoreVR(b, 3, b.LoadVectorShl(b.Truncate(LoadGPR(b, 4), INT8_TYPE))); + StoreVR(b, 3, + b.LoadVectorShl(b.Truncate( + b.And(LoadGPR(b, 4), b.LoadConstantInt64(0xF)), INT8_TYPE))); b.Return(); }); test.Run([](PPCContext* ctx) { ctx->r[4] = 0; }, @@ -48,7 +50,9 @@ TEST_CASE("LOAD_VECTOR_SHL", "[instr]") { TEST_CASE("LOAD_VECTOR_SHR", "[instr]") { TestFunction test([](HIRBuilder& b) { - StoreVR(b, 3, b.LoadVectorShr(b.Truncate(LoadGPR(b, 4), INT8_TYPE))); + StoreVR(b, 3, + b.LoadVectorShr(b.Truncate( + b.And(LoadGPR(b, 4), b.LoadConstantInt64(0xF)), INT8_TYPE))); b.Return(); }); test.Run([](PPCContext* ctx) { ctx->r[4] = 0; },