rs6000_return_in_memory has: /* Allow -maltivec -mabi=no-altivec without warning. Altivec vector modes only exist for GCC vector types if -maltivec. */ if (TARGET_32BIT && !TARGET_ALTIVEC_ABI && ALTIVEC_VECTOR_MODE (TYPE_MODE (type))) return false;
The code below warns for big vectors and returns true. That means a function returning "__vector int" does so in an AltiVec register with -mabi=altivec, in r3 r4 r5 r6 with -maltivec only, and in memory without -maltivec. This means GDB can not tell where the return value goes and whether a reference argument is necessary, even when it knows whether -mabi=altivec was used. This comes from here: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02035.html I read through that entire thread and I still don't understand the behavior. If __vector int should be returned in four GPRs for -maltivec -mabi=no-altivec, then shouldn't we return it in four GPRs for non-AltiVec configurations too? In my simpler world, every option either affects the ABI or does not, -mabi=altivec does, and -maltivec does not. -- Summary: -maltivec option changes ABI Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: drow at gcc dot gnu dot org GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33899