search for: strucret

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

Did you mean: structret
2012 Dec 03
2
[LLVMdev] operator overloading fails while debugging with gdb for i386
...the specific value on that specific compilation unit, you should never rely on behaviour of clobbered registers. That function returns void, you should look up in the caller, where is the address of the structure. Does the code execute correctly? Does a printf on the sum outputs the correct value? StrucRet is stable on Intel for years, I'd be surprised id that didn't work. However, it's possible that clang is messing up the position of the structure in Dwarf, so I'd investigate the Dwarf emission first, since your problem seems to bee with clang+gdb. -- cheers, --renato http://sy...
2012 Dec 03
0
[LLVMdev] operator overloading fails while debugging with gdb for i386
...ecific compilation unit, > you should never rely on behaviour of clobbered registers. That > function returns void, you should look up in the caller, where is the > address of the structure. > > Does the code execute correctly? Does a printf on the sum outputs the > correct value? StrucRet is stable on Intel for years, I'd be surprised > id that didn't work. > > However, it's possible that clang is messing up the position of the > structure in Dwarf, so I'd investigate the Dwarf emission first, since > your problem seems to bee with clang+gdb. > >...
2012 Dec 02
0
[LLVMdev] operator overloading fails while debugging with gdb for i386
Hi, As you told that function ends up returning void, I just confirmed it in the IR, the function is defined as: define *void* @_Z3sum2A1S_(*%struct.A1* noalias sret %agg.result*, %struct.A1* byval align 4 %one, %struct.A1* byval align 4 %two). But when i checked the register values in g++, eax contains an address of stack, which points to the value (object) returned by sum. That is if we
2012 Dec 01
2
[LLVMdev] operator overloading fails while debugging with gdb for i386
Hi, Structures are passed by pointer, so the return value is not actually in eax. That code gets transformed into something like: void sum(A1 *out, const A1 one, const A1 two) { out->x = one.x + two.x out->y = one.y + two.y } So actually the function ends up returning void and operating on a hidden parameter, so %eax is dead at the end of the function and should not be being relied