mozilla/rust — pull request #5726 by brson (2013-04-04 22:45:11+00:00)
Title: Fix i686 struct returning in some scenarios

r? @nikomatsakis

This doesn't completely fix the x86 ABI for structs, but it does fix some. On linux, structs appear to be returned correctly now. On windows, structs are only returned by pointer when they are greater than 8 bytes. That scenario works now.

In the case where the struct is less than 8 bytes our generated code looks peculiar. When returning a pair of u16, C packs both variables into %eax to return them. Our generated code though expects to find one of the pair in %ax and the other in %dx. Similar for u8. I haven't looked into it yet.

There appears to also be struct passing problems on linux, where my `extern-pass-TwoU8s` and `extern-pass-TwoU16s` tests are failing.