search for: getintegertype

Displaying 6 results from an estimated 6 matches for "getintegertype".

2010 Jul 27
1
[LLVMdev] How to use the return value of a CallInst
...with 0. The called function's return type is uint32. The return value is 1 or 0. But the icmp instruction cannot be created. CallInst *ret = CallInst::Create(ptr_func, params.begin(), params.end(), "", bb); Value *cmp = new ICmpInst(*bb, ICmpInst::ICMP_EQ, ret, ,ConstantInt::get(getIntegerType(32), 0) "") The runtime error is: /usr/local/include/llvm/Instructions.h:690: llvm::ICmpInst::ICmpInst(llvm::BasicBlock&, llvm::CmpInst::Predicate, llvm::Value*, llvm::Value*, const llvm::Twine&): Assertion `getOperand(0)->getType() == getOperand(1)->getType() && &q...
2012 Jun 13
2
[LLVMdev] The porting issue from llvm-2.8 to llvm-3.0
I try to port our project from llvm-2.8 to llvm-3.0, but some issue exist on the following code: #define getIntegerType(x) (IntegerType::get(_CTX(), x)) Value *int_enable = BinaryOperator::Create(Instruction::And, v_cpsr, ConstantInt::get(getIntegerType(4), 0x80), "", bb_dispatch) The llvm complains the following error message: error: incomplete type 'llvm::ConstantInt' used in nested name...
2011 Mar 26
2
[LLVMdev] How to read memory data througn adress of unsigned long
I have a value of long type and like to get the data at the adress in the value: ################# unsigned long v = 0xc0008000 Value* addr = ConstantInt::get(getIntegerType(64), v) #################### Then I try to use LoadInstr to get a load instruction of ir as the following: ############################ Value* data = new LoadInst(addr, "", false, bb); encounter segmentation fault. ######################## I also try to use IntToPtrInstr to do some tra...
2011 Mar 14
0
[LLVMdev] How to load a data from the address of unsiged long type
Hi Michael, > Now I have an address that present in a unsigned long address like the > following format: > Value* addr = CONST(0xc0008000) what is the type of addr? For that matter, what is CONST - what does it do? Ciao, Duncan. > > But I do not know how to read the data from the above addr varaible. I > tried the following three kind of code: > 1. Code: >
2011 Mar 26
0
[LLVMdev] How to read memory data througn adress of unsigned long
On Fri, Mar 25, 2011 at 8:53 PM, Michael.Kang <blackfin.kang at gmail.com> wrote: > I have a value of long type and like to get the data at the adress in the value: > > ################# > unsigned long v = 0xc0008000 > Value* addr = ConstantInt::get(getIntegerType(64), v) > #################### > > Then I try to use LoadInstr to get a load instruction of ir as the following: > ############################ >  Value* data = new LoadInst(addr, "", false, bb); > encounter segmentation fault. > ######################## > Perhaps...
2011 Mar 14
2
[LLVMdev] How to load a data from the address of unsiged long type
Now I have an address that present in a unsigned long address like the following format: Value* addr = CONST(0xc0008000) But I do not know how to read the data from the above addr varaible. I tried the following three kind of code: 1. Code: Value* addr = CONST(0xc0008000); Value* data = new LoadInst(addr, "", false, bb); Error: Segmentation fault 2. Code(