From: meissner Date: Mon, 23 Aug 2010 16:47:01 +0000 (+0000) Subject: Update to use -mveclibabi=mass instead of -mmass X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=ac3fd8d3a2dacabb312cb0fc78c0b9851063d451 Update to use -mveclibabi=mass instead of -mmass git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163471 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 406909b2afc..fb77db6d53f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,15 +1,18 @@ 2010-08-23 Michael Meissner - * 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 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index fc15198f3d7..95968a8cd8b 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= 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 dbd75802701..56d68886eaf 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 4cdda3dcef9..148117da647 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 d705cf4ec66..2ad04f0c7ea 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,7 @@ 2010-08-23 Michael Meissner - * 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