Displaying 3 results from an estimated 3 matches for "your_pointer_valu".
Did you mean:
your_pointer_value
2009 Jan 19
1
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
.... The only documentation for
> GlobalValue describes it as a superclass of GlobalVariables and Functions.
IIRC, the stuff I used was something like...
GlobalVariable *gv = new GlobalVariable( /* your pointer type */,
other required parameters...);
AddGlobalMapping(gv, your_pointer_value); // i.e. (void*)0x938742
then, where you use
Constant* thp = ConstantExpr::getCast(Instruction::IntToPtr,
your_pointer_value, /* i.e. 0x938742 */
/* your pointer type */);
/* Now use thp */
change it to
/* Now just use gv */
GetGlobalValueAtAddress may be useful for housekeeping.
If...
2009 Jan 21
0
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
...> GlobalValue describes it as a superclass of GlobalVariables and Functions.
>
> IIRC, the stuff I used was something like...
>
> GlobalVariable *gv = new GlobalVariable( /* your pointer type */,
> other required parameters...);
> AddGlobalMapping(gv, your_pointer_value); // i.e. (void*)0x938742
>
> then, where you use
>
> Constant* thp = ConstantExpr::getCast(Instruction::IntToPtr,
> your_pointer_value, /* i.e. 0x938742 */
> /* your pointer type */);
>
> /* Now use thp */
>
> change it to
>
> /* Now just use gv */
&...
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
This is x86_64. I have a problem where an absolute memory load
define i32 @foo() {
entry:
%0 = load i32* inttoptr (i64 12704196 to i32*) ; <i32> [#uses=1]
ret i32 %0
}
generates incorrect code on LLVM 2.4:
0x7ffff6d54010: mov 0xc1d9c4(%rip),%eax # 0x7ffff79719da
0x7ffff6d54016: retq
should be
0x7ffff6d54010: mov 0xc1d9c4, %eax
0x7ffff6d54016: retq