diff options
author | Michael Meissner <meissner@linux.ibm.com> | 2018-06-21 22:55:50 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 2018-06-21 22:55:50 +0000 |
commit | ed044066ac73d9678ae8fabc141f647b54ed91c2 (patch) | |
tree | ef7e7a21dbe8d67f00a1bed7a972aa2a61d06434 | |
parent | e8ccf824115b6671d3ad62e26e8e9d8ee2884d50 (diff) | |
download | gcc-ed044066ac73d9678ae8fabc141f647b54ed91c2.zip gcc-ed044066ac73d9678ae8fabc141f647b54ed91c2.tar.gz gcc-ed044066ac73d9678ae8fabc141f647b54ed91c2.tar.bz2 |
rs6000.c (init_float128_ieee): Prevent complex multiply and divide external functions from being created more...
2018-06-23 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
multiply and divide external functions from being created more
than once.
From-SVN: r261870
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 02d5904..9fdd3e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -5,6 +5,9 @@ IEEE 128-bit long double. (neg<mode>2_internal): Use the correct mode to check whether the mode is IBM extended. + * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex + multiply and divide external functions from being created more + than once. 2018-06-21 Eric Botcazou <ebotcazou@adacore.com> diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 11ef766..3cc6445 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -17892,9 +17892,14 @@ init_float128_ieee (machine_mode mode) { if (FLOAT128_VECTOR_P (mode)) { - /* Set up to call __mulkc3 and __divkc3 under -mabi=ieeelongdouble. */ - if (mode == TFmode && TARGET_IEEEQUAD) + static bool complex_muldiv_init_p = false; + + /* Set up to call __mulkc3 and __divkc3 under -mabi=ieeelongdouble. If + we have clone or target attributes, this will be called a second + time. We want to create the built-in function only once. */ + if (mode == TFmode && TARGET_IEEEQUAD && !complex_muldiv_init_p) { + complex_muldiv_init_p = true; built_in_function fncode_mul = (built_in_function) (BUILT_IN_COMPLEX_MUL_MIN + TCmode - MIN_MODE_COMPLEX_FLOAT); |