From 99d1036f6a1a0b9bd2702b12a45598abb058dc23 Mon Sep 17 00:00:00 2001 From: redthing1 Date: Fri, 6 Feb 2026 12:11:45 -0800 Subject: [PATCH] TestRunner: copy next pc with proper type --- test_runner_lib/TestRunner.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test_runner_lib/TestRunner.cpp b/test_runner_lib/TestRunner.cpp index e59f1af6..52bf2c53 100644 --- a/test_runner_lib/TestRunner.cpp +++ b/test_runner_lib/TestRunner.cpp @@ -260,10 +260,8 @@ LiftingTester::LiftInstructionFunction(std::string_view fname, auto pc_ref = remill::LoadProgramCounterRef(&target_func->getEntryBlock()); auto next_pc_ref = remill::LoadNextProgramCounterRef(&target_func->getEntryBlock()); - bldr.CreateStore( - bldr.CreateLoad(llvm::IntegerType::get(target_func->getContext(), 32), - next_pc_ref), - pc_ref); + auto pc_type = this->arch->AddressType(); + bldr.CreateStore(bldr.CreateLoad(pc_type, next_pc_ref), pc_ref); bldr.CreateRet(bldr.CreateLoad(this->lifter->GetMemoryType(), mem_ptr_ref));