From patchwork Mon Sep 2 09:02:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 1979576 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=UBGApThQ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=iocyAQI3; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=UBGApThQ; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=iocyAQI3; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wy2pc3kG6z1yXY for ; Mon, 2 Sep 2024 19:03:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E2F273864831 for ; Mon, 2 Sep 2024 09:03:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 9C35F385DDD3; Mon, 2 Sep 2024 09:02:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C35F385DDD3 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9C35F385DDD3 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725267760; cv=none; b=loxnR5Fs10fzLBgC2FULkc7Mwx6HJLujaFkUq6xhJkd0RPq5FEnKlmILXV/8JF7DK1ljOquAZdkAamemsOAWml4iXdEtBPT2tjd71ffwKturIJptt8xDt5WA8u3Mbf/63jlwe+6oXIjnVGaKhzIQ/KxUPWyNlfh/gJZ4CsMZ6JQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725267760; c=relaxed/simple; bh=ZxX5QtV4Wxx0pa6UtInhMLXAFpbZtTWgXu91RonLsl4=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=U8krrSB3liIs7lcEmo6lQqA+LYeOqoQFOUC9S/A6yzsEvmgfuYDp4PXVX2EaSoNUE20OKOMRo7SJZZIjWbQn7v5G/dBI+R5+nA58iaZDWUTIHyPJLKzeorQRNLqKoIfJzD29BTku+iYMedhawUAdvlxwFuZUC8zlGwyz1eBMd0k= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from hawking.nue2.suse.org (unknown [IPv6:2a07:de40:a101:3:92b1:1cff:fe69:ddc]) by smtp-out2.suse.de (Postfix) with ESMTP id 200171FB9F; Mon, 2 Sep 2024 09:02:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725267757; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y68ciE7Ayv+0CqyvlFvaopkZqwH7AS/i4WMzBTyAGOM=; b=UBGApThQSaA2xuXyNWchOCPPxAP4/FQzaCysyGQqNosWxXsHqG/1VFNsc33q6nM1RpRvI2 13XooKEt94mq1BqWhRbWrbOakEFpfvrRfxu1iwnnuVniSpVYCU5BtbsZ7kKz3+2BsiPs+R AiuyznL2O3h4JaNTsagv+wnkjZWlxpQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725267757; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y68ciE7Ayv+0CqyvlFvaopkZqwH7AS/i4WMzBTyAGOM=; b=iocyAQI3nTeKz4b04YbW6GHvsbo667dM9gklpUXjbUoK46k+nTW5rXkB/eneYa6Qd9p8zJ gEBkMw2b1yZXNGCw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=UBGApThQ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=iocyAQI3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725267757; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y68ciE7Ayv+0CqyvlFvaopkZqwH7AS/i4WMzBTyAGOM=; b=UBGApThQSaA2xuXyNWchOCPPxAP4/FQzaCysyGQqNosWxXsHqG/1VFNsc33q6nM1RpRvI2 13XooKEt94mq1BqWhRbWrbOakEFpfvrRfxu1iwnnuVniSpVYCU5BtbsZ7kKz3+2BsiPs+R AiuyznL2O3h4JaNTsagv+wnkjZWlxpQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725267757; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=Y68ciE7Ayv+0CqyvlFvaopkZqwH7AS/i4WMzBTyAGOM=; b=iocyAQI3nTeKz4b04YbW6GHvsbo667dM9gklpUXjbUoK46k+nTW5rXkB/eneYa6Qd9p8zJ gEBkMw2b1yZXNGCw== Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id D69E64A0513; Mon, 2 Sep 2024 11:02:36 +0200 (CEST) From: Andreas Schwab To: gcc-patches@gcc.gnu.org Subject: [PATCH] libsupc++: Fix handling of m68k extended real in CC: libstdc++@gcc.gnu.org X-Yow: Should I do my BOBBIE VINTON medley? Date: Mon, 02 Sep 2024 11:02:36 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-Spamd-Result: default: False [13.26 / 50.00]; SPAM_FLAG(5.00)[]; NEURAL_SPAM_LONG(3.50)[1.000]; BAYES_HAM(-3.00)[99.99%]; NEURAL_SPAM_SHORT(2.97)[0.991]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; RDNS_NONE(2.00)[]; ONCE_RECEIVED(1.20)[]; HFILTER_HELO_IP_A(1.00)[hawking.nue2.suse.org]; HFILTER_HELO_NORES_A_OR_MX(0.30)[hawking.nue2.suse.org]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MX_GOOD(-0.01)[]; RCPT_COUNT_TWO(0.00)[2]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; ARC_NA(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_HAS_DN(0.00)[]; DIRECT_TO_MX(0.00)[Gnus/5.13 (Gnus v5.13)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TAGGED_RCPT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DNSWL_BLOCKED(0.00)[2a07:de40:a101:3:92b1:1cff:fe69:ddc:from]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email] X-Spam-Score: 13.26 X-Rspamd-Queue-Id: 200171FB9F X-Rspamd-Action: add header X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spamd-Bar: +++++++++++++ X-Spam: Yes X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org PR libstdc++/116513 * libsupc++/compare (_S_fp_bits) [__fmt == _M68k_80bit]: Shift padding out of exponent word. --- libstdc++-v3/libsupc++/compare | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/libsupc++/compare b/libstdc++-v3/libsupc++/compare index 686aa6d218f..63ad6b5c23e 100644 --- a/libstdc++-v3/libsupc++/compare +++ b/libstdc++-v3/libsupc++/compare @@ -838,7 +838,7 @@ namespace std _GLIBCXX_VISIBILITY(default) using enum _Fp_fmt; #endif constexpr auto __fmt = _S_fp_fmt<_Tp>(); - if constexpr (__fmt == _X86_80bit || __fmt == _M68k_80bit) + if constexpr (__fmt == _X86_80bit) { if constexpr (sizeof(_Tp) == 3 * sizeof(int32_t)) { @@ -851,6 +851,11 @@ namespace std _GLIBCXX_VISIBILITY(default) return _Int(__ival._M_hi, __ival._M_lo); } } + else if constexpr (__fmt == _M68k_80bit) + { + auto __ival = __builtin_bit_cast(_Int, __val); + return _Int(__ival._M_hi >> 16, __ival._M_lo); + } else if constexpr (sizeof(_Tp) == 2 * sizeof(int64_t)) { #if __SIZEOF_INT128__