aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog19
-rw-r--r--gcc/config/rs6000/rs6000.c16
-rw-r--r--gcc/config/rs6000/rs6000.opt6
-rw-r--r--gcc/doc/invoke.texi15
-rw-r--r--gcc/testsuite/ChangeLog3
5 files changed, 38 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 406909b..fb77db6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,15 +1,18 @@
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>
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index fc15198..95968a8 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -949,6 +949,9 @@ static const enum rs6000_btc builtin_classify[(int)RS6000_BUILTIN_COUNT] =
#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);
+
static bool rs6000_function_ok_for_sibcall (tree, tree);
static const char *rs6000_invalid_within_doloop (const_rtx);
@@ -2772,6 +2775,15 @@ rs6000_override_options (const char *default_cpu)
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;
@@ -3909,8 +3921,8 @@ rs6000_builtin_vectorized_function (tree fndecl, tree type_out,
}
/* 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;
}
diff --git a/gcc/config/rs6000/rs6000.opt b/gcc/config/rs6000/rs6000.opt
index dbd7580..56d6888 100644
--- a/gcc/config/rs6000/rs6000.opt
+++ b/gcc/config/rs6000/rs6000.opt
@@ -115,9 +115,9 @@ mpopcntd
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)
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4cdda3d..148117d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -788,7 +788,7 @@ See RS/6000 and PowerPC Options.
-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
@@ -15850,12 +15850,13 @@ precision square root estimate instructions are not generated by
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},
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d705cf4..2ad04f0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,6 +1,7 @@
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>