2010-08-23 Michael Meissner <meissner@linux.vnet.ibm.com>
- * config/rs6000/rs6000.opt (-mmass): New option to enable the
- compiler to autovectorize mathmetical functions for power7 using
- the Mathematical Acceleration Subsystem library.
-
- * config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass): New
- function to handle auto vectorizing math functions that are in the
- MASS library.
+ * config/rs6000/rs6000.opt (-mveclibabi=mass): New option to
+ enable the compiler to autovectorize mathmetical functions for
+ power7 using the Mathematical Acceleration Subsystem library.
+
+ * config/rs6000/rs6000.c (rs6000_veclib_handler): New variable to
+ handle which vector math library we have.
+ (rs6000_override_options): Add -mveclibabi=mass support.
+ (rs6000_builtin_vectorized_libmass): New function to handle auto
+ vectorizing math functions that are in the MASS library.
(rs6000_builtin_vectorized_function): Call it.
- * doc/invoke.texi (RS/6000 and PowerPC Options): Document -mmass.
+ * doc/invoke.texi (RS/6000 and PowerPC Options): Document
+ -mveclibabi=mass.
2010-08-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
#undef RS6000_BUILTIN
#undef RS6000_BUILTIN_EQUATE
+/* Support for -mveclibabi=<xxx> to control which vector library to use. */
+static tree (*rs6000_veclib_handler) (tree, tree, tree);
+
\f
static bool rs6000_function_ok_for_sibcall (tree, tree);
static const char *rs6000_invalid_within_doloop (const_rtx);
rs6000_traceback_name);
}
+ if (rs6000_veclibabi_name)
+ {
+ if (strcmp (rs6000_veclibabi_name, "mass") == 0)
+ rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
+ else
+ error ("unknown vectorization library ABI type (%s) for "
+ "-mveclibabi= switch", rs6000_veclibabi_name);
+ }
+
if (!rs6000_explicit_options.long_double)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
}
/* Generate calls to libmass if appropriate. */
- if (TARGET_MASS)
- return rs6000_builtin_vectorized_libmass (fndecl, type_out, type_in);
+ if (rs6000_veclib_handler)
+ return rs6000_veclib_handler (fndecl, type_out, type_in);
return NULL_TREE;
}
Target Report Mask(POPCNTD)
Use PowerPC V2.06 popcntd instruction
-mmass
-Target Report Var(TARGET_MASS) Init(0)
-Use the Mathematical Acceleration Subsystem library high performance math libraries.
+mveclibabi=
+Target RejectNegative Joined Var(rs6000_veclibabi_name)
+Vector library ABI to use
mvsx
Target Report Mask(VSX)
-msdata=@var{opt} -mvxworks -G @var{num} -pthread @gol
-mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision
-mno-recip-precision @gol
--mmass}
+-mveclibabi=@var{type}}
@emph{RX Options}
@gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol
default on low precision machines, since they do not provide an
estimate that converges after three steps.
-@item -mmass
-@itemx -mno-mass
-@opindex mmass
-Specifies to use IBM's Mathematical Acceleration Subsystem (MASS)
-libraries for vectorizing intrinsics using external libraries. GCC
-will currently emit calls to @code{acosd2}, @code{acosf4},
+@item -mveclibabi=@var{type}
+@opindex mveclibabi
+Specifies the ABI type to use for vectorizing intrinsics using an
+external library. The only type supported at present is @code{mass},
+which specifies to use IBM's Mathematical Acceleration Subsystem
+(MASS) libraries for vectorizing intrinsics using external libraries.
+GCC will currently emit calls to @code{acosd2}, @code{acosf4},
@code{acoshd2}, @code{acoshf4}, @code{asind2}, @code{asinf4},
@code{asinhd2}, @code{asinhf4}, @code{atan2d2}, @code{atan2f4},
@code{atand2}, @code{atanf4}, @code{atanhd2}, @code{atanhf4},
2010-08-23 Michael Meissner <meissner@linux.vnet.ibm.com>
- * gcc.target/powerpc/vsx-mass-1.c: New file, test -mmass.
+ * gcc.target/powerpc/vsx-mass-1.c: New file, test
+ -mveclibabi=mass.
2010-08-23 Janus Weil <janus@gcc.gnu.org>