Displaying 9 results from an estimated 9 matches for "santitox".
2012 May 27
2
[LLVMdev] Help with Values sign
How are you checking the return value?
I put your code in santos.ll and then executed it with lli, and I get 1 as
a return value.
lli santos.ll ; echo $?
1
Joey
On 27 May 2012 16:59, Santos Merino <santitox at hotmail.es> wrote:
> I show you the trace of calls to llvm that my compiler makes to generate
> the
> code above. bloques.back().last is of type Value* and bloques.back().bl is
> BasicBlock* (the current Block)
>
> bloques.back().last =
>
> dyn_cast<Value>(Const...
2012 May 27
0
[LLVMdev] Help with Values sign
I show you the trace of calls to llvm that my compiler makes to generate the
code above. bloques.back().last is of type Value* and bloques.back().bl is
BasicBlock* (the current Block)
bloques.back().last =
dyn_cast<Value>(ConstantInt::get(Type::getInt32Ty(getGlobalContext()), $1,
true)); // $1 is an int
AllocaInst *alloc =
new AllocaInst(
2012 May 27
0
[LLVMdev] Help with Values sign
When the ExecutionEngine finishs the JIT execution it says:
Result: 16777216
2012 May 27
2
[LLVMdev] Help with Values sign
Santos Merino <santitox at hotmail.es> writes:
> When the ExecutionEngine finishs the JIT execution it says:
>
> Result: 16777216
There is nothing wrong with the IR code you initially posted. If you are
obtaining that result, it must be caused by other factor. My guess is
that you are messing up with the...
2012 May 28
2
[LLVMdev] Help with Values sign
On May 27, 2012, at 9:15 PM, Santos Merino wrote:
> I have found that the problem is the endianness of Values. For example a 1 it's
> stored as 00000001 00000000 00000000 0000000 instead of 0000000 00000000 0000000
> 00000000 so how can I change how the values are stored and/or load (because I
> suppose that the problem is when I store it or load from memory)
Are you setting up
2012 May 28
0
[LLVMdev] Help with Values sign
In my main function after generate the code and before start the execution via
JIT I do this:
ExecutionEngine *EE = EngineBuilder(M).create();
string str =
EE->getTargetData()->getStringRepresentation();
str[0] = 'e';
M->setDataLayout(str);
if (verifyModule(*M)) {
errs() << argv[0] << ": Error building the
2012 May 28
1
[LLVMdev] Help with Values sign
Why are you changing the data layout to be little-endian?
Joey
On 28 May 2012 10:13, Santos Merino <santitox at hotmail.es> wrote:
> In my main function after generate the code and before start the execution
> via
> JIT I do this:
>
> ExecutionEngine *EE = EngineBuilder(M).create();
> string str =
> EE->getTargetData()->getStringRepresentation();
> str[...
2012 May 27
2
[LLVMdev] Help with Values sign
Hi everyone, I'm having some problems when loading values. Here's a simple
example of the IR that my compiler generates to show the problem:
define i32 @main() {
entry:
%a = alloca i32 ; <i32*> [#uses=2]
store i32 1, i32* %a
%r = load i32* %a ; <i32> [#uses=1]
br label %Return
Return:
2012 May 28
0
[LLVMdev] Help with Values sign
I have found that the problem is the endianness of Values. For example a 1 it's
stored as 00000001 00000000 00000000 0000000 instead of 0000000 00000000 0000000
00000000 so how can I change how the values are stored and/or load (because I
suppose that the problem is when I store it or load from memory)
Thanks,
Santos Merino.