[Bug target/79845] rs6000: make code in rs6000.c more i18n-friendly

meissner at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Nov 16 20:30:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79845

--- Comment #4 from Michael Meissner <meissner at gcc dot gnu.org> ---
Author: meissner
Date: Thu Nov 16 20:29:52 2017
New Revision: 254846

URL: https://gcc.gnu.org/viewcvs?rev=254846&root=gcc&view=rev
Log:
[gcc]
2017-11-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

        Back port from trunk
        2017-11-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
        switch statement mapping KF built-ins to TF built-ins if we don't
        have the proper ISA 3.0 assembler support.

        Back port from trunk
        2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

        * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
        (rs6000_builtin_type_compatible): Treat _Float128 and long double
        as being compatible if -mabi=ieeelongdouble.
        * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
        to setup float128 built-ins with hardware support.
        (BU_FLOAT128_HW_2): Likewise.
        (BU_FLOAT128_HW_3): Likewise.
        (BU_FLOAT128_HW_VSX_1): Likewise.
        (BU_FLOAT128_HW_VSX_2): Likewise.
        (scalar_extract_expq): Change float128 built-in functions to
        accommodate having both KFmode and TFmode functions.  Use the
        KFmode variant as the default.
        (scalar_extract_sigq): Likewise.
        (scalar_test_neg_qp): Likewise.
        (scalar_insert_exp_q): Likewise.
        (scalar_insert_exp_qp): Likewise.
        (scalar_test_data_class_qp): Likewise.
        (sqrtf128_round_to_odd): Delete processing the round to odd
        built-in functions as special built-in functions, and define them
        as float128 built-ins.  Use the KFmode variant as the default.
        (truncf128_round_to_odd): Likewise.
        (addf128_round_to_odd): Likewise.
        (subf128_round_to_odd): Likewise.
        (mulf128_round_to_odd): Likewise.
        (divf128_round_to_odd): Likewise.
        (fmaf128_round_to_odd): Likewise.
        * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
        support for KFmode and TFmode xststdcqp calls.
        (rs6000_expand_builtin): If long double is IEEE 128-bit floating
        point, switch the built-in handlers for the get/set float128
        exponent, get float128 mantissa, float128 test built-ins, and the
        float128 round to odd built-in functions.  Eliminate creating the
        float128 round to odd built-in functions as special built-ins.
        (rs6000_init_builtins): Eliminate special creation of the float128
        round to odd built-in functions.
        * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
        function insns to support both TFmode and KFmode variants.
        (xsxsigqp_<mode>): Likewise.
        (xsiexpqpf_<mode>): Likewise.
        (xsiexpqp_<mode>): Likewise.
        (xststdcqp_<mode>): Likewise.
        (xststdcnegqp_<mode>): Likewise.
        (xststdcqp_<mode>): Likewise.

        Back port from trunk
        2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

        PR target/82748
        * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
        float128 helper macros, which are no longer used after deleting
        the old 'q' built-in functions, and moving the round to odd
        built-in functions to being special built-in functions.
        (BU_FLOAT128_2): Likewise.
        (BU_FLOAT128_1_HW): Likewise.
        (BU_FLOAT128_2_HW): Likewise.
        (BU_FLOAT128_3_HW): Likewise.
        (FABSQ): Delete old 'q' built-in functions.
        (COPYSIGNQ): Likewise.
        (SQRTF128_ODD): Move round to odd built-in functions to be
        special built-in functions, so that we can handle
        -mabi=ieeelongdouble.
        (TRUNCF128_ODD): Likewise.
        (ADDF128_ODD): Likewise.
        (SUBF128_ODD): Likewise.
        (MULF128_ODD): Likewise.
        (DIVF128_ODD): Likewise.
        (FMAF128_ODD): Likewise.
        * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
        built-in names to 'f128'.
        * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
        old 'q' built-in functions, as the machine independent code for
        'f128' built-in functions handles this.
        (rs6000_expand_builtin): Add expansion for float128 round to odd
        functions, keying off on -mabi=ieeelongdouble of whether to use
        the KFmode or TFmode variant.
        (rs6000_init_builtins): Initialize the _Float128 round to odd
        built-in functions.
        * doc/extend.texi (PowerPC Built-in Functions): Document the old
        _Float128 'q' built-in functions are now mapped into the new
        'f128' built-in functions.


[gcc/testsuite]
2017-11-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

        Back port from trunk
        2017-11-16  Michael Meissner  <meissner@linux.vnet.ibm.com>

        * gcc.target/powerpc/bfp/bfp.exp: Look for *.c files, not *.c*
        files to prevent ~ files from getting recognized.
        * gcc.target/powerpc/dfp/dfp.exp: Likewise.
        * gcc.target/powerpc/vsu/vsu.exp: Likewise.

        Back port from trunk
        2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

        * gcc.target/powerpc/float128-hw4.c: New test.

        Back port from trunk
        2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

        PR target/79845
        * gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust diagnostic
        strings.
        * gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Likewise.
        * gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Likewise.
        * gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Likewise.
        * gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Likewise.
        * gcc.target/powerpc/bfp/scalar-test-neg-5.c: Likewise.


Added:
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/float128-hw4.c
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr82748-1.c
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/pr82748-2.c
Modified:
    branches/ibm/gcc-7-branch/gcc/ChangeLog.ibm
    branches/ibm/gcc-7-branch/gcc/config/rs6000/rs6000-builtin.def
    branches/ibm/gcc-7-branch/gcc/config/rs6000/rs6000-c.c
    branches/ibm/gcc-7-branch/gcc/config/rs6000/rs6000.c
    branches/ibm/gcc-7-branch/gcc/config/rs6000/vsx.md
    branches/ibm/gcc-7-branch/gcc/doc/extend.texi
    branches/ibm/gcc-7-branch/gcc/testsuite/ChangeLog.ibm
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-exp-4.c
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-extract-sig-4.c
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-10.c
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-insert-exp-7.c
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-data-class-11.c
   
branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/bfp/scalar-test-neg-5.c
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
    branches/ibm/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/vsu/vsu.exp


More information about the Gcc-bugs mailing list