diff mbox

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

Message ID 1416527380.28104.4.camel@gnopaine
State New
Headers show

Commit Message

Bill Schmidt Nov. 20, 2014, 11:49 p.m. UTC
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.

Comments

David Edelsohn Nov. 21, 2014, 12:33 a.m. UTC | #1
On Thu, Nov 20, 2014 at 6:49 PM, Bill Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> 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.

Okay.

Thanks, David
diff mbox

Patch

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,