On Tue, May 3, 2011 at 5:27 PM, Michael Meissner <meiss...@linux.vnet.ibm.com> wrote: > When I added VSX support to the powerpc, I overlooked passing and return > V2DImode arguments, since the only machine operation that supports V2DI is > vector floating point conversion. Consequentally, V2DI types were passed and > returned in GPRs instead of the vector registers on power7. > > This patch fixes that so that V2DImode values are passed and returned like > other vector types. > > I did a bootstrap and make check with no regressions, comparing it to a build > without the patch. I also wrote a program that passed and returned every > single type, and I compared the assembly ouptut. With the exception of > functions that return or are passed V2DI arguments, the code is identical. I > tested: > > -m64 (implies -mabi=altivec) > -m32 -mabi=altivec > -m32 -mabi=no-altivec (no difference here) > > Is this patch ok to install? I will also want to install it in the 4.6 and > possibly 4.5 trees as well. > > [gcc] > 2011-05-03 Michael Meissner <meiss...@linux.vnet.ibm.com> > > PR target/48857 > * config/rs6000/rs6000.h (VSX_SCALAR_MODE): Delete. > (VSX_MODE): Ditto. > (VSX_MOVE_MODE): Ditto. > (ALTIVEC_OR_VSX_VECTOR_MODE): New macro, combine all Altivec and > VSX vector types. Add V2DImode. > (HARD_REGNO_CALLER_SAVE_MODE): Use it instead of > ALTIVEC_VECTOR_MODE and VSX_VECTOR_MODE calls. > (MODES_TIEABLE_P): Ditto. > > * config/rs6000/rs6000.c (rs6000_emit_move): Use > ALTIVEC_OR_VSX_MODE instead of ALTIVEC_VECTOR_MODE and > VSX_VECTOR_MODE. > (init_cumulative_args): Ditto. > (rs6000_function_arg_boundary): Ditto. > (rs6000_function_arg_advance_1): Ditto. > (rs6000_function_arg): Ditto. > (rs6000_function_ok_for_sibcall): Ditto. > (emit_frame_save): Ditto. > (rs6000_function_value): Ditto. > (rs6000_libcall_value): Ditto. > > [gcc/testsuite] > 2011-05-03 Michael Meissner <meiss...@linux.vnet.ibm.com> > > PR target/48857 > * gcc.target/powerpc/pr48857.c: New file, make sure V2DI arguments > are passed and returned in vector registers.
What does this do to the ABI? Haven't we now broken the ABI and broken backwards compatibility? - David