From patchwork Mon Nov 28 06:07:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 61139 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 99718385455C for ; Mon, 28 Nov 2022 06:07:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99718385455C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669615662; bh=+OuZko3tL8GXqvB/DfHSW3i7NK4DYHmvP5u8MWWQNsI=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=HykDRS6E3U7vls2Bw9LDcZE/XPa/pr3gxZa09EKMzlJoNGEwcIVQK1QACO6pfYTX5 o8rKQv+Sq7YdK61/tQi3xebi0dkvH0k3xaaKpuQJaoZDQqYZpQ38QUgr02GnYQaZ97 xpyBRM/wG3njL9rXJOkSzpSMoYj2aluyi/72Pl2s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 722133858D3C; Mon, 28 Nov 2022 06:07:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 722133858D3C Received: by mail-ej1-x630.google.com with SMTP id n20so23295255ejh.0; Sun, 27 Nov 2022 22:07:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=subject:from:cc:to:content-language:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+OuZko3tL8GXqvB/DfHSW3i7NK4DYHmvP5u8MWWQNsI=; b=eXPcc/OyGAOTt9zhLDZGd16w6SwIfDTbTQRIM7FO1UaHC93oGt2IB56yoB4oIwpn1m 6vThgq9k3QnNV3hf0rFysj2lGpfYi+rSw/9mhTttZnEobCEWZTWn9tOlNY0WZhfD7bX8 BQJgvctqHGICPHX3CguMmjHr/rs78JWnd54paGZdu5O56xiVM5R6ho5hY/+EMmF6mG6f Mc0j1QY6eU5uedyD2l2oYGPuiTJbuPgVhycWN+TwU7lvg1QM5p7wfE+wH6mb7CC/vGG1 Nc5SsiqRgl3WUDuNb0FsW77Tr7Bh2CGBN86zzA43QX6COzsI7A133TvQwbUJGrDP9eoZ Ji8g== X-Gm-Message-State: ANoB5pmuQhQVcDy/v93WN7GCPNK94p7E9t/WSUMZATbx0HjOaljzVhoT l+AICAL6nWJ19lM59Rdu2RlTKcDdrvU= X-Google-Smtp-Source: AA0mqf6ijrXUWSZKKTZXF6AuyKn8md1pKN07EC756kF+hZXvGqVHelnEiEAlOCfTUVoCSr8aegZMRg== X-Received: by 2002:a17:906:a08e:b0:7ad:79c0:5479 with SMTP id q14-20020a170906a08e00b007ad79c05479mr33747559ejy.392.1669615628806; Sun, 27 Nov 2022 22:07:08 -0800 (PST) Received: from [10.53.0.251] ([109.190.253.15]) by smtp.googlemail.com with ESMTPSA id a18-20020a056402169200b0045c3f6ad4c7sm4789486edv.62.2022.11.27.22.07.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Nov 2022 22:07:08 -0800 (PST) Message-ID: Date: Mon, 28 Nov 2022 07:07:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Content-Language: fr To: "libstdc++@gcc.gnu.org" Cc: gcc-patches Subject: [PATCH][_GLIBCXX_INLINE_VERSION] Adapt to_chars/from_chars symbols X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_SBL_CSS, SPF_HELO_NONE, SPF_PASS, TXREP 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fran=C3=A7ois_Dumont_via_Gcc-patches?= From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Reply-To: =?utf-8?q?Fran=C3=A7ois_Dumont?= Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" This patch is fixing those tests: 20_util/to_chars/float128_c++23.cc std/format/formatter/requirements.cc std/format/functions/format.cc std/format/functions/format_to_n.cc std/format/functions/size.cc std/format/functions/vformat_to.cc std/format/string.cc Note that symbols used in for __ibm128 and __iee128 are untested. I even wonder if the normal mode ones are because I cannot find the symbols used in gnu.ver.     libstdc++: [_GLIBCXX_INLINE_VERSION] Add to_chars/from_chars symbols export     libstdc++-v3/ChangeLog             * include/std/format [_GLIBCXX_INLINE_VERSION](to_chars): Adapt __asm symbol             specifications.             * config/abi/pre/gnu-versioned-namespace.ver: Add to_chars/from_chars symbols             export. Ok to commit ? François diff --git a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver index 06ccaa80a58..7fc81514808 100644 --- a/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver +++ b/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver @@ -142,6 +142,12 @@ GLIBCXX_8.0 { _ZN14__gnu_parallel9_Settings3getEv; _ZN14__gnu_parallel9_Settings3setERS0_; + # to_chars/from_chars _Float128 + _ZNSt3__88to_charsEPcS0_DF128_; + _ZNSt3__88to_charsEPcS0_DF128_NS_12chars_formatE; + _ZNSt3__88to_charsEPcS0_DF128_NS_12chars_formatEi; + _ZNSt3__810from_charsEPKcS1_RDF128_NS_12chars_formatE; + local: *; }; diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index 23ffbdabed8..a05f3981622 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -1248,27 +1248,51 @@ namespace __format // Make them available as std::__format::to_chars. to_chars_result to_chars(char*, char*, __ibm128) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_e"); +# else + __asm("_ZNSt3__88to_charsEPcS0_e"); +# endif to_chars_result to_chars(char*, char*, __ibm128, chars_format) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_eSt12chars_format"); +# else + __asm("_ZNSt3__88to_charsEPcS0_eNS_12chars_formatE"); +# endif to_chars_result to_chars(char*, char*, __ibm128, chars_format, int) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_eSt12chars_formati"); +# else + __asm("_ZNSt3__88to_charsEPcS0_eNS_12chars_formatEi"); +# endif #elif __cplusplus == 202002L to_chars_result to_chars(char*, char*, __ieee128) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_u9__ieee128"); +# else + __asm("_ZNSt3__88to_charsEPcS0_DF128_"); +# endif to_chars_result to_chars(char*, char*, __ieee128, chars_format) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_u9__ieee128St12chars_format"); +# else + __asm("_ZNSt3__88to_charsEPcS0_u9__ieee128NS_12chars_formatE"); +# endif to_chars_result to_chars(char*, char*, __ieee128, chars_format, int) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_u9__ieee128St12chars_formati"); +# else + __asm("_ZNSt3__88to_charsEPcS0_u9__ieee128NS_12chars_formatEi"); +# endif #endif #elif defined _GLIBCXX_LDOUBLE_IS_IEEE_BINARY128 @@ -1288,15 +1312,27 @@ namespace __format // Make them available as std::__format::to_chars. to_chars_result to_chars(char*, char*, _Float128) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_DF128_"); +# else + __asm("_ZNSt3__88to_charsEPcS0_DF128_"); +# endif to_chars_result to_chars(char*, char*, _Float128, chars_format) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_DF128_St12chars_format"); +# else + __asm("_ZNSt3__88to_charsEPcS0_DF128_NS_12chars_formatE"); +# endif to_chars_result to_chars(char*, char*, _Float128, chars_format, int) noexcept +# if !_GLIBCXX_INLINE_VERSION __asm("_ZSt8to_charsPcS_DF128_St12chars_formati"); +# else + __asm("_ZNSt3__88to_charsEPcS0_DF128_NS_12chars_formatEi"); +# endif # endif #endif