search for: foo_by_valu

Displaying 4 results from an estimated 4 matches for "foo_by_valu".

Did you mean: foo_by_value
2011 Aug 11
2
[LLVMdev] Pass a struct on windows
...0* %agg_addr, i8* %a_opq, i64 4) %agg_addr.1 = getelementptr inbounds %0* %agg_addr, i32 0, i32 1 %result.1 = load i64* %agg_addr.1, align 8 ret i64 %result.1 } (2) Pass the struct by value (minor modifications on above code). The only difference is that we build the structure inside callee @foo_by_value and pass it by value to the caller @call_by_value. The returned value of @call_by_value is a random number on windows XP ia32. But on linux ubuntu x64 it is correct, 4. define %0 @foo_by_value(i8*, i64) nounwind { entry: %agg_addr = alloca %0, align 8 %agg_addr.0 = getelementptr inbounds %0*...
2011 Aug 11
0
[LLVMdev] Pass a struct on windows
...%agg_addr.1 = getelementptr inbounds %0* %agg_addr, i32 0, i32 1 > %result.1 = load i64* %agg_addr.1, align 8 > ret i64 %result.1 > } > > (2) Pass the struct by value (minor modifications on above code). > The only difference is that we build the structure inside callee @foo_by_value > and pass it by value to the caller @call_by_value. The returned value of > @call_by_value is a random number on windows XP ia32. But on linux > ubuntu x64 it is correct, 4. > > define %0 @foo_by_value(i8*, i64) nounwind { > entry: > %agg_addr = alloca %0, align 8 >...
2011 Aug 11
1
[LLVMdev] Pass a struct on windows
...ounds %0* %agg_addr, i32 0, i32 1 > > %result.1 = load i64* %agg_addr.1, align 8 > > ret i64 %result.1 > > } > > > > (2) Pass the struct by value (minor modifications on above code). > > The only difference is that we build the structure inside callee > @foo_by_value > > and pass it by value to the caller @call_by_value. The returned value of > > @call_by_value is a random number on windows XP ia32. But on linux > > ubuntu x64 it is correct, 4. > > > > define %0 @foo_by_value(i8*, i64) nounwind { > > entry: > > %agg...
2011 Aug 15
3
[LLVMdev] structured types as function arguments
Hi, When calling a function, does the llvm code generator support passing structured types (arrays, structs, etc.) by _value_? I wrote some small examples, and it seemed to work, but I was wondering if anything can go wrong if the structured types are very large... Thanks, N