Re-submitted as a separate patch. The problem: small structs returned in one (or two) registers are aligned left in N32/N64 and aligned right in the others (or vice versa, depending on how you cross your eyes). There are two code paths here, one for structs of length < MIPS_REGSIZE, and one for MIPS_REGSIZE < struct len < 2 * MIPS_REGSIZE. The first case I've split into two paths: one for N32 && TYPE_CODE_STRUCT, and a second for everything else (the later being identical to what was there before). In the second case, I've simply let the N32/N64 path fall thru. The next "if" catches it and handles it correctly.