search for: m3func

Displaying 2 results from an estimated 2 matches for "m3func".

2012 Jun 19
0
[LLVMdev] Cast Pointer Address to Functions
...ddress held in an uint64_t. I would like to cast > the function address to a function prototype and create a call to the > function in LLVM. How could I do this ? This is what works for us: std::vector<Type*> margs; FunctionType* fType; PointerType* pm3_routine; Value* m3func; Value* result; margs.resize(1); margs[0] = I64; fType = FunctionType::get(I32, margs, false); pm3_routine = PointerType::get(fType, 0); m3func = Builder.CreateIntToPtr(I64_Const((uint64_t)pFunc), pm3_routine, "pm3func"); result = Builder.CreateCall(m3func,...
2012 Jun 18
4
[LLVMdev] Cast Pointer Address to Functions
I have a function address held in an uint64_t. I would like to cast the function address to a function prototype and create a call to the function in LLVM. How could I do this ? Thanks Xin