STATIC DEVIRT HELLO WORLD LETS GOOOOOOOOOOOOOOOOO

merge-requests/9/head
_xeroxz 3 years ago
parent 92bd54c368
commit 4d7bf0d94c

@ -8,7 +8,7 @@ namespace vm
auto t1 = rtn->pop( 8 ); auto t1 = rtn->pop( 8 );
auto &vmp_rtn = rtn->vmp_rtns.back(); auto &vmp_rtn = rtn->vmp_rtns.back();
auto vreg = vmp_rtn->virtual_registers[ vinstr.operand.imm.u ? vinstr.operand.imm.u / 8 : 0 ]; auto vreg = vmp_rtn->virtual_registers[ vinstr.operand.imm.u ? vinstr.operand.imm.u / 8 : 0 ];
ir_builder->CreateStore( t1, vreg )->setAlignment( llvm::Align( 8 ) ); ir_builder->CreateStore( t1, vreg );
}; };
lifters_t::lifter_callback_t lifters_t::sregdw = lifters_t::lifter_callback_t lifters_t::sregdw =
@ -17,8 +17,6 @@ namespace vm
auto t1 = rtn->pop( 4 ); auto t1 = rtn->pop( 4 );
auto &vmp_rtn = rtn->vmp_rtns.back(); auto &vmp_rtn = rtn->vmp_rtns.back();
auto vreg = vmp_rtn->virtual_registers[ vinstr.operand.imm.u ? vinstr.operand.imm.u / 8 : 0 ]; auto vreg = vmp_rtn->virtual_registers[ vinstr.operand.imm.u ? vinstr.operand.imm.u / 8 : 0 ];
auto vregdw = ir_builder->CreatePointerCast( ir_builder->CreateStore( ir_builder->CreateIntCast( t1, ir_builder->getInt64Ty(), false ), vreg );
vreg, llvm::PointerType::get( llvm::IntegerType::get( *rtn->llvm_ctx, 32 ), 0 ) );
ir_builder->CreateStore( t1, vregdw )->setAlignment( llvm::Align( 4 ) );
}; };
} // namespace vm } // namespace vm

@ -71,8 +71,6 @@ int main( int argc, const char *argv[] )
vmp2_code_blocks.size() ); vmp2_code_blocks.size() );
} }
llvm_module.print( llvm::outs(), nullptr );
llvm::LLVMInitializeX86TargetInfo(); llvm::LLVMInitializeX86TargetInfo();
llvm::LLVMInitializeX86Target(); llvm::LLVMInitializeX86Target();
llvm::LLVMInitializeX86TargetMC(); llvm::LLVMInitializeX86TargetMC();

Loading…
Cancel
Save