This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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 <meissner@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 <meissner@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. -- Michael Meissner, IBM 5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA meissner@linux.vnet.ibm.com fax +1 (978) 399-6899
Attachment:
gcc-power7.patch240
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |