[PATCH, rs6000] Fix PR63673 -- missing prototype for vec_vsx_ld/vec_vsx_st

Bill Schmidt wschmidt@linux.vnet.ibm.com
Fri Nov 21 00:33:00 GMT 2014


Hi,

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63673 observes that
vec_vsx_ld doesn't currently permit the base pointer to have a type of
pointer to double, even though this is specified as legal in the GCC
user's manual.  We do allow a pointer to float, so this is just an
oversight.  This patch corrects the problem both for vec_vsx_ld and
vec_vsx_st.

Bootstrapped and tested on powerpc64-unknown-linux-gnu with no
regressions.  Ok for trunk, 4.9, and 4.8?

Thanks,
Bill


2014-11-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Allow
	the base pointer of vec_vsx_ld and vec_vsx_st to take a pointer to
	double.


Index: gcc/config/rs6000/rs6000-c.c
===================================================================
--- gcc/config/rs6000/rs6000-c.c	(revision 217800)
+++ gcc/config/rs6000/rs6000-c.c	(working copy)
@@ -3411,6 +3411,8 @@ const struct altivec_builtin_types altivec_overloa
 
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
     RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 },
+  { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF,
+    RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 },
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
     RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 },
   { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI,
@@ -3465,6 +3467,8 @@ const struct altivec_builtin_types altivec_overloa
 
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
     RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF },
+  { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF,
+    RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double },
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,
     RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI },
   { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI,




More information about the Gcc-patches mailing list