Peter Nimmervoll
Peter Nimmervoll
Do I understand this code correct. It tries to return a struct with the fields initialized to zero? And if this is the machine code: ``` bb.0.start: %2:ld8 = LDIRdK...
~~~I think I found it. In `AVRTargetLowering::LowerReturn` the destination of the copy is reversed because of the calling convention but not the source.~~~ ~~~The patch is pretty messy because my...
Damn, I should have run the tests before. It breaks a lot of stuff. It made so much sense.
I think I know whats going on. The AVR couldn't handle returning structs like this at all (see #57). It only expects to ever return an iXX and only when...
I don't know if this produces correct output but it prevents the crash. This patch just avoids to return a struct through registers. Which only works for a few/small structs...
>> I think I know whats going on. The AVR couldn't handle returning structs like this at all (see #57). It only expects to ever return an iXX and only...
I tried it again. If the struct is 1) { - std::reverse(RVLocs.begin(), RVLocs.end()); + // some hackery because SelectionDAGBuilder does not split up arguments properly + Type *retType = MF.getFunction().getReturnType();...
Are you sure picked up the patch for #57?
Ok, you should pin the problem down by making a [reduced testcase](https://github.com/avr-rust/rust/wiki#reduce-the-testcase). Then create a new bug with the LLVM IR code that triggers the bug.
Only the second one.