From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1005) id A521F3870842; Thu, 17 Dec 2020 05:14:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A521F3870842 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Michael Meissner To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/meissner/heads/work030)] Revert patch. X-Act-Checkin: gcc X-Git-Author: Michael Meissner X-Git-Refname: refs/users/meissner/heads/work030 X-Git-Oldrev: 9dac1281a5d54b1fc53ce6199df563f255144ca1 X-Git-Newrev: 9107b1d50204f94890ce111f636cbc8378116254 Message-Id: <20201217051449.A521F3870842@sourceware.org> Date: Thu, 17 Dec 2020 05:14:49 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 05:14:49 -0000 https://gcc.gnu.org/g:9107b1d50204f94890ce111f636cbc8378116254 commit 9107b1d50204f94890ce111f636cbc8378116254 Author: Michael Meissner Date: Thu Dec 17 00:13:27 2020 -0500 Revert patch. gcc/ 2020-12-16 Michael Meissner Alan Modra Revert PR gcc/97791 * config/rs6000/rs6000-call.c (init_cumulative_args): Only set that long double was returned if the type is actually long double. (rs6000_function_arg_advance_1): Only set that long double was passed if the type is actually long double. Diff: --- gcc/config/rs6000/rs6000-call.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index d040254d401..45bc048b5c7 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -6554,14 +6554,12 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, if (SCALAR_FLOAT_MODE_P (return_mode)) { rs6000_passes_float = true; - - /* If we have GNU attributes enabled, mark if the function returns - long double. We do not mark if the function returns a type - such as __ibm128 that uses the same modes as the current long - double type, only if an actual long double type was used. */ if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT) - && return_type != NULL - && TYPE_MAIN_VARIANT (return_type) == long_double_type_node) + && (FLOAT128_IBM_P (return_mode) + || FLOAT128_IEEE_P (return_mode) + || (return_type != NULL + && (TYPE_MAIN_VARIANT (return_type) + == long_double_type_node)))) rs6000_passes_long_double = true; /* Note if we passed or return a IEEE 128-bit type. We changed @@ -6996,14 +6994,11 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode, if (SCALAR_FLOAT_MODE_P (mode)) { rs6000_passes_float = true; - - /* If we have GNU attributes enabled, mark if the function passes long - double. We do not mark if the function returns a type such as - __ibm128 that uses the same modes as the current long double type, - only if an actual long double type was used. */ if ((HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE || TARGET_64BIT) - && type != NULL - && TYPE_MAIN_VARIANT (type) == long_double_type_node) + && (FLOAT128_IBM_P (mode) + || FLOAT128_IEEE_P (mode) + || (type != NULL + && TYPE_MAIN_VARIANT (type) == long_double_type_node))) rs6000_passes_long_double = true; /* Note if we passed or return a IEEE 128-bit type. We changed the