TestRunner: copy next pc with proper type

This commit is contained in:
redthing1
2026-02-06 12:11:45 -08:00
committed by Kyle Elliott
parent 6a4f639fbb
commit 99d1036f6a
+2 -4
View File
@@ -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));