From patchwork Wed Aug 9 18:15:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2987869vqr; Wed, 9 Aug 2023 11:16:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2+u5IJ8/yYfUE7BA4X5Qhiw2cQJK9jylmR1M3mtyakanWAE145fqbfbpbjnaEwenHA3Md X-Received: by 2002:a17:906:1092:b0:98d:76f8:217b with SMTP id u18-20020a170906109200b0098d76f8217bmr2731004eju.73.1691604960940; Wed, 09 Aug 2023 11:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691604960; cv=none; d=google.com; s=arc-20160816; b=md0K6ugVHSgGTUKCf6p1cqjReL/eQlknAUMsvWeACxXQtdBkcwpHIZ6/5mhdfaunjC Qv7Eo9N7q2OWcBKAWXi56ObF0WNESlFwsEPTjutIlHRD7DO9GcE/V3H8BMMuJsxH63Vl LYkVzjkXrf7bIFlcmN7KtWhLI1EnU58F4Ljvk7G/xLA6rOVQEGuYpJOkmBkKmVF8+/gQ OMxVIpQ/BIoT5OzrPcpPvXUZuXPX9NwpHZwZp9dDhHweSI8t+xw1e4Bv38y307XO3cGs m++ic/02VOWtcmEtO9VTEtGuhvebWW2x3N5xx9eEWEpOyhEmipyS/XgFAN/nXKCLNDbV 4Mqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=wGW4ezNfcz3uNwnodbLJz1LBzJUIxSvGF/gVuLXEK/Y=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=D05d+roA1wR1mDrpjA/qMdR3FEZaFXRiwfj8UvYl34YoZtvGnsroQc+teUlB+Q5o+f JJvGi5AbdXh0pW9kT6jVcy04sBZgt7sl6nJy6TK0Ia6FCMfQMqqUxLOxfdppLWep2BaZ jz654+Quvr2DjWY0ZcsCUCC3O2TwW2vbVwopziClByqKPgE+3KG2imbfjKzThpq9PVdA ixAzk8nosRwsRQ09CWM4hC6eV4ZNaSMQr+VJjTYxOz4UNP9E8hesyJLXjankhhBU5B9b GOyF7U1AFiOYRSCl7ICuSFdU7OTZMXlE7l2cGJM2uIzBpj59ql7Kl+OIJiqgSrdMgSvU DkmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZmFsQnbO; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id t4-20020a170906a10400b009888e0923cfsi9889444ejy.712.2023.08.09.11.16.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:16:00 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ZmFsQnbO; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5D723858291 for ; Wed, 9 Aug 2023 18:15:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5D723858291 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691604959; bh=wGW4ezNfcz3uNwnodbLJz1LBzJUIxSvGF/gVuLXEK/Y=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ZmFsQnbObG1wDYKDDgVyhnAhqvuc5WDkoeESS7AhX1x5cib1k7anKZgGuqEkPxwSP OrYc6SZJsvj0htQcVBJvZRgdQ6jpJtJu0uUgT5yvVh5X+un35LtZY/yHl8F7Pf/IL8 2l9pgEf9Pa019uftq3EMd1n5ihuxnJocaRU+Fyvs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 6B6B13857B9B for ; Wed, 9 Aug 2023 18:15:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6B6B13857B9B Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-668-fPeziPWvMcGAtFrPwAABVw-1; Wed, 09 Aug 2023 14:15:16 -0400 X-MC-Unique: fPeziPWvMcGAtFrPwAABVw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9D77F3C1350C; Wed, 9 Aug 2023 18:15:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 617A240C2076; Wed, 9 Aug 2023 18:15:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IFDBk2042868 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:15:14 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IFDaW2042867; Wed, 9 Aug 2023 20:15:13 +0200 Date: Wed, 9 Aug 2023 20:15:13 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 1/12] expr: Small optimization [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776363431104261 X-GMAIL-MSGID: 1773776363431104261 Hi! Small optimization to avoid testing modifier multiple times. 2023-08-09 Jakub Jelinek PR c/102989 * expr.cc (expand_expr_real_1) : Add an early return for EXPAND_WRITE or EXPAND_MEMORY modifiers to avoid testing it multiple times. Jakub --- gcc/expr.cc.jj 2023-08-08 15:55:06.499164554 +0200 +++ gcc/expr.cc 2023-08-08 15:59:36.594382141 +0200 @@ -11248,17 +11248,15 @@ expand_expr_real_1 (tree exp, rtx target set_mem_addr_space (temp, as); if (TREE_THIS_VOLATILE (exp)) MEM_VOLATILE_P (temp) = 1; - if (modifier != EXPAND_WRITE - && modifier != EXPAND_MEMORY - && !inner_reference_p + if (modifier == EXPAND_WRITE || modifier == EXPAND_MEMORY) + return temp; + if (!inner_reference_p && mode != BLKmode && align < GET_MODE_ALIGNMENT (mode)) temp = expand_misaligned_mem_ref (temp, mode, unsignedp, align, modifier == EXPAND_STACK_PARM ? NULL_RTX : target, alt_rtl); - if (reverse - && modifier != EXPAND_MEMORY - && modifier != EXPAND_WRITE) + if (reverse) temp = flip_storage_order (mode, temp); return temp; } From patchwork Wed Aug 9 18:15:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133404 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2988347vqr; Wed, 9 Aug 2023 11:16:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG4nRr0ZA0wdWOkAdIxVYWdIwVBNK3RcfIsF1NoCls3sbyU5g+DSF5ZspLMGqjRyEo4lv3N X-Received: by 2002:a05:6512:39c8:b0:4f9:72a5:2b76 with SMTP id k8-20020a05651239c800b004f972a52b76mr2723166lfu.65.1691605017856; Wed, 09 Aug 2023 11:16:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605017; cv=none; d=google.com; s=arc-20160816; b=tcJ0ZqSasM4EuBRTJ9SpDly4OR5MPbN+EjS2aCAMaTdwFflQlSCBKusgQZ69Fz7JQ0 tUsAkHM24jD34n+MkK3s0sLoXeUDAODu7K37YHcnJBEogA/uHYpZfnCScCbcp2hZRqBe XugysHgU+DnCk9ZDozwb7u8yHrn6PyX/fdrcahQAcE+OgMfTd6ndtPpzXOn0Tu2rCYFO iLrlG2bcgw7WdwhX45DGZbbxyVj3S+Ki9HDflrSSjaoXz/C2rYxIHC4EU8BxieIVSdB7 N3376adoIo6U5pWOorVSBuhD/dcngr6aJvcprcwq8KbJF4PhJn/Y9avxbzjxgKCYdxgr 7DRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ahqCpksk36nj2esESxkxczPeBCq/ciiNByPvgeyXDec=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=j0KLPDnwbDQr7QneXwZiR9NZ6Ffl2LFkt0Xx8LWMj739OFcsTjtnR3uAkgUJhnrBoG r/uYIF2Elf4hjKzXha1O/nCmAB7LV/G853fi2MInfaP9E6KgOMNmspk13A+n4ep11QqA UcQohNRhzUSK6vkA81tQf2Vb8Wa8XG9VOIDdfqHAMeP41RxjD1UHvinhNU+XdLrfJB6E v7zni+gUtejkb6uCHs7M5psDWnACLtu3HhgMe/up3EFWoWlU41jKbfrGhdMSvJMUAbe0 T4Qh+EoAx9g2zqmew45lKUup6++uigmqKmcOe20+bHuDyokYKb5AWfYcXEZwyLpkIjlh fN+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NlRCk2ts; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id w2-20020a50fa82000000b005234011bb47si3993802edr.679.2023.08.09.11.16.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:16:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NlRCk2ts; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8151D3857C66 for ; Wed, 9 Aug 2023 18:16:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8151D3857C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605016; bh=ahqCpksk36nj2esESxkxczPeBCq/ciiNByPvgeyXDec=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=NlRCk2ts0/k9SoOu19YrH7IIWb6APvleQuSv9HfQOdFgRPW2BVPNfKKBXI0KxVF6J dHklqcMUHH5vUF9x72WZZkbMLMJVn/EDk8xttFl+452BULEWncOv6caJzG0F+gOm0K CpUHA5S0hSQs7SG6MZI6WSl+sdgsjt1siUCpi2dw= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 48F953857B93 for ; Wed, 9 Aug 2023 18:16:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48F953857B93 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-120-Pny1W8j-MliR49VHkpAVkQ-1; Wed, 09 Aug 2023 14:16:00 -0400 X-MC-Unique: Pny1W8j-MliR49VHkpAVkQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 70E5C85CBFF; Wed, 9 Aug 2023 18:15:58 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 316F740C2076; Wed, 9 Aug 2023 18:15:58 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IFtAo2042880 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:15:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IFtHq2042879; Wed, 9 Aug 2023 20:15:55 +0200 Date: Wed, 9 Aug 2023 20:15:54 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 2/12] lto-streamer-in: Adjust assert [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776423096423982 X-GMAIL-MSGID: 1773776423096423982 Hi! With _BitInt(575) or any other _BitInt(513) or larger constants we can run into this assertion. MAX_BITSIZE_MODE_ANY_INT is just a value from which WIDE_INT_MAX_PRECISION is derived. 2023-08-09 Jakub Jelinek PR c/102989 * lto-streamer-in.cc (lto_input_tree_1): Assert TYPE_PRECISION is up to WIDE_INT_MAX_PRECISION rather than MAX_BITSIZE_MODE_ANY_INT. Jakub --- gcc/lto-streamer-in.cc.jj 2023-07-17 09:07:42.078283882 +0200 +++ gcc/lto-streamer-in.cc 2023-07-27 15:03:24.255234159 +0200 @@ -1888,7 +1888,7 @@ lto_input_tree_1 (class lto_input_block for (i = 0; i < len; i++) a[i] = streamer_read_hwi (ib); - gcc_assert (TYPE_PRECISION (type) <= MAX_BITSIZE_MODE_ANY_INT); + gcc_assert (TYPE_PRECISION (type) <= WIDE_INT_MAX_PRECISION); result = wide_int_to_tree (type, wide_int::from_array (a, len, TYPE_PRECISION (type))); streamer_tree_cache_append (data_in->reader_cache, result, hash); From patchwork Wed Aug 9 18:17:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2988885vqr; Wed, 9 Aug 2023 11:17:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHO8EjqkGQ8BQGdjgyL+w0n4UBC5w0qk8yF4CqZ4r+DxtZQt6uwEHS9QLw0FqQ0gnohpurd X-Received: by 2002:a17:906:8a68:b0:988:b61e:4219 with SMTP id hy8-20020a1709068a6800b00988b61e4219mr237488ejc.29.1691605077230; Wed, 09 Aug 2023 11:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605077; cv=none; d=google.com; s=arc-20160816; b=ebb4rUTI979n+5frnSzaaYpt78qFs06FUbJuJj9btB1uOa4Zrnjo435GR/tl1CEv/p ISlO6zI1gMSysIWrxjSDPWPICv590V9RULVWSau9ZXu/i0HmcpCRfWKnL75lXc7xrhWy z1iLebdiviLJxygiYvhgGpIgYmqRc9U2VTLbRwYNkUx6DRF2TLPKKAQZa14n6wQqAzca 56CAPieAKS5M+xv8yh9g2dKM7f0C+oosrqUzUGwoXOyOPW0602yAPxtkPZo/WWoeU+hL kqMPqC+7Z95yXpCScww/9jlEgKuJ9FBjVzH3LS+N2wuMsTVMuYMrz8KjzFIRwcykpHV4 xwzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=AgP6Jd+iEUXFkkNeIHbFOXinHKY2NxMfNYs0E5K/imM=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=qiBd5hoOv2yoa+MhRl0RvDLzJLwPtjcpbEXEKKTarc+WLrIJOEuV3/B0QQB608VKbc qgl1Wo/NBlHNZxh3cda9/3YvjzaWZrVqlT7MSUMJ50AZlGDNbpcKfrLe+/QfQi7PQaYw hSrHAFDGKLxOEuxpiNK3lprUM8tSid58zL4fp0s8g0X3cLqDghJcj7ejjF9bm2X7BNVx AErJhHqGoMqlfF131cB6t/TTX2lVkEh35KQVPmar2M1f7fR19w53kGLe1E/LLrlQYnjh 4OcaZbF9VVDbG3RhGfm4rH4CZmSanTelDpIQDndTRmy/uAGWMlF5wbi0n+1PfIDAkvkk +S4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JLSpg03u; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id g16-20020a170906521000b0099318060d40si8157077ejm.459.2023.08.09.11.17.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:17:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JLSpg03u; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 288C93858002 for ; Wed, 9 Aug 2023 18:17:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 288C93858002 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605076; bh=AgP6Jd+iEUXFkkNeIHbFOXinHKY2NxMfNYs0E5K/imM=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=JLSpg03u/U2FHqVNA0AcR3tRPYa63ZCB83FCc26fnJZ2EGPDvHk28csDCFJVVM8FK FWW6y0AuovlWGNOThQq/jW7/aNoKNZxiRtUs7wree7fN/8eVGt7S5Ne4mK3y2z7Zzt +J9yuN2STG2tq8WlbIRxWppU40OVVuQaN3xdRhDA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B7CFA3858002 for ; Wed, 9 Aug 2023 18:17:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B7CFA3858002 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-314-Ayt0KJpSM-i4S3dLAjzDYQ-1; Wed, 09 Aug 2023 14:17:13 -0400 X-MC-Unique: Ayt0KJpSM-i4S3dLAjzDYQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D0E0D1C0897C; Wed, 9 Aug 2023 18:17:12 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93D854EA4E; Wed, 9 Aug 2023 18:17:12 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IHAJ72042894 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:17:10 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IH9Ea2042893; Wed, 9 Aug 2023 20:17:09 +0200 Date: Wed, 9 Aug 2023 20:17:09 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 3/12] phiopt: Fix phiopt ICE on vops [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776485289324206 X-GMAIL-MSGID: 1773776485289324206 Hi! I've ran into ICE on gcc.dg/torture/bitint-42.c with -O1 or -Os when enabling expensive tests, and unfortunately I can't reproduce without _BitInt. The IL before phiopt3 has: [local count: 203190070]: # .MEM_428 = VDEF <.MEM_367> bitint.159 = VIEW_CONVERT_EXPR(*.LC3); goto ; [100.00%] [local count: 203190070]: # .MEM_427 = VDEF <.MEM_367> bitint.159 = VIEW_CONVERT_EXPR(*.LC4); [local count: 406380139]: # .MEM_368 = PHI <.MEM_428(87), .MEM_427(88)> # VUSE <.MEM_368> _123 = VIEW_CONVERT_EXPR(r495[i_107].D.2780)[0]; and factor_out_conditional_operation is called on the vop PHI, it sees it has exactly two operands and defining statements of both PHI arguments are converts (VCEs in this case), so it thinks it is a good idea to try to optimize that and while doing that it constructs void type SSA_NAMEs and the like. 2023-08-09 PR c/102989 * tree-ssa-phiopt.cc (factor_out_conditional_operation): Punt for vops. Jakub --- gcc/tree-ssa-phiopt.cc.jj 2023-08-08 15:55:09.508122417 +0200 +++ gcc/tree-ssa-phiopt.cc 2023-08-09 15:55:23.762314103 +0200 @@ -241,6 +241,7 @@ factor_out_conditional_operation (edge e } if (TREE_CODE (arg0) != SSA_NAME + || SSA_NAME_IS_VIRTUAL_OPERAND (arg0) || (TREE_CODE (arg1) != SSA_NAME && TREE_CODE (arg1) != INTEGER_CST)) return NULL; From patchwork Wed Aug 9 18:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133407 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2989384vqr; Wed, 9 Aug 2023 11:18:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6pVe3GWo1isr1ZZ4L8Z3X3Em+XWzKYtaBZBAFXNvThXPJkAqDGnvq9BCvbRkt0tjPOjPe X-Received: by 2002:a2e:320a:0:b0:2b9:f13b:613c with SMTP id y10-20020a2e320a000000b002b9f13b613cmr2366114ljy.2.1691605136323; Wed, 09 Aug 2023 11:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605136; cv=none; d=google.com; s=arc-20160816; b=GzrBxON77k6yrMpYUPM8uCpA39I9kRmALxu28LsCo32UEIQpqubBdh+F2mRAimMoYo lWFAhb3A6K2z0FvLGj87wx7joSg6yzF40vRkFRbPHvDozvD39gsdssBpmYKVvaK++MJg 53sTAFIZ3hqMmFW5oSwJAetP+BnpgZvL6fnR9QkBoNybMyl3oQhqj+sjj2UYSQ73Foih tb31wKAzgHPSTRJL/f2QCYPPFJVWlo6MO9XciJ/J/rSXUKw6HNrCeWFEfcKJODJRBCgH TEzNjsau5XgbvI9CkCUGgwDgy7ObOfaE1OCvALCo8IGgEqAJ+Z1oDjF0I3LDNGzQXNXn lM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=O3W07yd1qkkx7yDdkQ9oR1IepW5g26CgW69SvSL5yQk=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=Ov+CZdBQrRxy+YNMmj3DfZMTiR7TyzfmhvjSA77rg2gcOXRatTQ6rgRtendz8+A5Qh dUiCdogjiMcErV2MozaimZDGua+o0vRxScUWljVQD/y1t6puoXio+hrgBqW6tJO0gKsd XB3aIld9r5uUaKhILPM5HjFibwAE/P6yfNsMIqOxTC37mhWYV9xKFHvbSrp2f4zpECeo x+zhwHLe8Fig6vZChlASxkHkOC3KunID3lFrobvF/iAFSI1hA8g0jLyT20vLd3BzkcKJ SJhmp0zoz19z0WoZXvAH6AIp7KYIqKDyRdsEeAG2Knofa378Du/4RSm59UqAxRTRR7dz Aq2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="tD8/b1E3"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id dt20-20020a170906b79400b00988da9cd05csi8385312ejb.23.2023.08.09.11.18.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:18:56 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="tD8/b1E3"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E1B1A3858404 for ; Wed, 9 Aug 2023 18:18:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E1B1A3858404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605134; bh=O3W07yd1qkkx7yDdkQ9oR1IepW5g26CgW69SvSL5yQk=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=tD8/b1E3BKIIfIyJDMNmzvB4K3NRwcJ713ZSa7mUXHF9yQqHHp2jSFNMEz5SyqmnF 5cKpt7JSYJpNDQC1L1oYRJWC0/07CCDJqnYEThTWhwlQ8bOLimCo8qD6YElKankq6F JHCLDlxSESfU5xnNzCRCwmtVaKAZ8/+KrQ0DnQFM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id F1DE8385842C for ; Wed, 9 Aug 2023 18:17:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F1DE8385842C Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-5Jmze1_9MMKG2dilqAkuPA-1; Wed, 09 Aug 2023 14:17:54 -0400 X-MC-Unique: 5Jmze1_9MMKG2dilqAkuPA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DD89800270; Wed, 9 Aug 2023 18:17:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 742612026D4B; Wed, 9 Aug 2023 18:17:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IHpk72042904 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:17:51 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IHoZE2042902; Wed, 9 Aug 2023 20:17:50 +0200 Date: Wed, 9 Aug 2023 20:17:50 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 4/12] Middle-end _BitInt support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776547062466215 X-GMAIL-MSGID: 1773776547062466215 Hi! The following patch introduces the middle-end part of the _BitInt support, a new BITINT_TYPE, handling it where needed, except the lowering pass and sanitizer support. 2023-08-09 Jakub Jelinek PR c/102989 * tree.def (BITINT_TYPE): New type. * tree.h (TREE_CHECK6, TREE_NOT_CHECK6): Define. (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Include BITINT_TYPE. (BITINT_TYPE_P): Define. (CONSTRUCTOR_BITFIELD_P): Return true even for BLKmode bit-fields if they have BITINT_TYPE type. (tree_check6, tree_not_check6): New inline functions. (any_integral_type_check): Include BITINT_TYPE. (build_bitint_type): Declare. * tree.cc (tree_code_size, wide_int_to_tree_1, cache_integer_cst, build_zero_cst, type_hash_canon_hash, type_cache_hasher::equal, type_hash_canon): Handle BITINT_TYPE. (bitint_type_cache): New variable. (build_bitint_type): New function. (signed_or_unsigned_type_for, verify_type_variant, verify_type): Handle BITINT_TYPE. (tree_cc_finalize): Free bitint_type_cache. * builtins.cc (type_to_class): Handle BITINT_TYPE. (fold_builtin_unordered_cmp): Handle BITINT_TYPE like INTEGER_TYPE. * cfgexpand.cc (expand_debug_expr): Punt on BLKmode BITINT_TYPE INTEGER_CSTs. * convert.cc (convert_to_pointer_1, convert_to_real_1, convert_to_complex_1): Handle BITINT_TYPE like INTEGER_TYPE. (convert_to_integer_1): Likewise. For BITINT_TYPE don't check GET_MODE_PRECISION (TYPE_MODE (type)). * doc/generic.texi (BITINT_TYPE): Document. * doc/tm.texi.in (TARGET_C_BITINT_TYPE_INFO): New. * doc/tm.texi: Regenerated. * dwarf2out.cc (base_type_die, is_base_type, modified_type_die, gen_type_die_with_usage): Handle BITINT_TYPE. (rtl_for_decl_init): Punt on BLKmode BITINT_TYPE INTEGER_CSTs or handle those which fit into shwi. * expr.cc (expand_expr_real_1): Define EXTEND_BITINT macro, reduce to bitfield precision reads from BITINT_TYPE vars, parameters or memory locations. Expand large/huge BITINT_TYPE INTEGER_CSTs into memory. * fold-const.cc (fold_convert_loc, make_range_step): Handle BITINT_TYPE. (extract_muldiv_1): For BITINT_TYPE use TYPE_PRECISION rather than GET_MODE_SIZE (SCALAR_INT_TYPE_MODE). (native_encode_int, native_interpret_int, native_interpret_expr): Handle BITINT_TYPE. * gimple-expr.cc (useless_type_conversion_p): Make BITINT_TYPE to some other integral type or vice versa conversions non-useless. * gimple-fold.cc (gimple_fold_builtin_memset): Punt for BITINT_TYPE. (clear_padding_unit): Mention in comment that _BitInt types don't need to fit either. (clear_padding_bitint_needs_padding_p): New function. (clear_padding_type_may_have_padding_p): Handle BITINT_TYPE. (clear_padding_type): Likewise. * internal-fn.cc (expand_mul_overflow): For unsigned non-mode precision operands force pos_neg? to 1. (expand_MULBITINT, expand_DIVMODBITINT, expand_FLOATTOBITINT, expand_BITINTTOFLOAT): New functions. * internal-fn.def (MULBITINT, DIVMODBITINT, FLOATTOBITINT, BITINTTOFLOAT): New internal functions. * internal-fn.h (expand_MULBITINT, expand_DIVMODBITINT, expand_FLOATTOBITINT, expand_BITINTTOFLOAT): Declare. * match.pd (non-equality compare simplifications from fold_binary): Punt if TYPE_MODE (arg1_type) is BLKmode. * pretty-print.h (pp_wide_int): Handle printing of large precision wide_ints which would buffer overflow digit_buffer. * stor-layout.cc (finish_bitfield_representative): For bit-fields with BITINT_TYPE, prefer representatives with precisions in multiple of limb precision. (layout_type): Handle BITINT_TYPE. Handle COMPLEX_TYPE with BLKmode element type and assert it is BITINT_TYPE. * target.def (bitint_type_info): New C target hook. * target.h (struct bitint_info): New type. * targhooks.cc (default_bitint_type_info): New function. * targhooks.h (default_bitint_type_info): Declare. * tree-pretty-print.cc (dump_generic_node): Handle BITINT_TYPE. Handle printing large wide_ints which would buffer overflow digit_buffer. * tree-ssa-sccvn.cc: Include target.h. (eliminate_dom_walker::eliminate_stmt): Punt for large/huge BITINT_TYPE. * tree-switch-conversion.cc (jump_table_cluster::emit): For more than 64-bit BITINT_TYPE subtract low bound from expression and cast to 64-bit integer type both the controlling expression and case labels. * typeclass.h (enum type_class): Add bitint_type_class enumerator. * varasm.cc (output_constant): Handle BITINT_TYPE INTEGER_CSTs. * vr-values.cc (check_for_binary_op_overflow): Use widest2_int rather than widest_int. (simplify_using_ranges::simplify_internal_call_using_ranges): Use unsigned_type_for rather than build_nonstandard_integer_type. Jakub --- gcc/tree.def.jj 2023-08-08 15:54:35.387600243 +0200 +++ gcc/tree.def 2023-08-08 16:57:23.708840829 +0200 @@ -113,7 +113,7 @@ DEFTREECODE (BLOCK, "block", tcc_excepti /* The ordering of the following codes is optimized for the checking macros in tree.h. Changing the order will degrade the speed of the compiler. OFFSET_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, - REAL_TYPE, POINTER_TYPE. */ + BITINT_TYPE, REAL_TYPE, POINTER_TYPE. */ /* An offset is a pointer relative to an object. The TREE_TYPE field is the type of the object at the offset. @@ -144,6 +144,13 @@ DEFTREECODE (BOOLEAN_TYPE, "boolean_type and TYPE_PRECISION (number of bits used by this type). */ DEFTREECODE (INTEGER_TYPE, "integer_type", tcc_type, 0) +/* Bit-precise integer type. These are similar to INTEGER_TYPEs, but + can have arbitrary user selected precisions and do or can have different + alignment, function argument and return value passing conventions. + Larger BITINT_TYPEs can have BLKmode TYPE_MODE and need to be lowered + by a special BITINT_TYPE lowering pass. */ +DEFTREECODE (BITINT_TYPE, "bitint_type", tcc_type, 0) + /* C's float and double. Different floating types are distinguished by machine mode and by the TYPE_SIZE and the TYPE_PRECISION. */ DEFTREECODE (REAL_TYPE, "real_type", tcc_type, 0) --- gcc/tree.h.jj 2023-08-08 15:55:09.601121115 +0200 +++ gcc/tree.h 2023-08-08 16:15:41.003877836 +0200 @@ -363,6 +363,14 @@ code_helper::is_builtin_fn () const (tree_not_check5 ((T), __FILE__, __LINE__, __FUNCTION__, \ (CODE1), (CODE2), (CODE3), (CODE4), (CODE5))) +#define TREE_CHECK6(T, CODE1, CODE2, CODE3, CODE4, CODE5, CODE6) \ +(tree_check6 ((T), __FILE__, __LINE__, __FUNCTION__, \ + (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), (CODE6))) + +#define TREE_NOT_CHECK6(T, CODE1, CODE2, CODE3, CODE4, CODE5, CODE6) \ +(tree_not_check6 ((T), __FILE__, __LINE__, __FUNCTION__, \ + (CODE1), (CODE2), (CODE3), (CODE4), (CODE5), (CODE6))) + #define CONTAINS_STRUCT_CHECK(T, STRUCT) \ (contains_struct_check ((T), (STRUCT), __FILE__, __LINE__, __FUNCTION__)) @@ -485,6 +493,8 @@ extern void omp_clause_range_check_faile #define TREE_NOT_CHECK4(T, CODE1, CODE2, CODE3, CODE4) (T) #define TREE_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T) #define TREE_NOT_CHECK5(T, CODE1, CODE2, CODE3, CODE4, CODE5) (T) +#define TREE_CHECK6(T, CODE1, CODE2, CODE3, CODE4, CODE5, CODE6) (T) +#define TREE_NOT_CHECK6(T, CODE1, CODE2, CODE3, CODE4, CODE5, CODE6) (T) #define TREE_CLASS_CHECK(T, CODE) (T) #define TREE_RANGE_CHECK(T, CODE1, CODE2) (T) #define EXPR_CHECK(T) (T) @@ -528,8 +538,8 @@ extern void omp_clause_range_check_faile TREE_CHECK2 (T, ARRAY_TYPE, INTEGER_TYPE) #define NUMERICAL_TYPE_CHECK(T) \ - TREE_CHECK5 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE, \ - FIXED_POINT_TYPE) + TREE_CHECK6 (T, INTEGER_TYPE, ENUMERAL_TYPE, BOOLEAN_TYPE, REAL_TYPE, \ + FIXED_POINT_TYPE, BITINT_TYPE) /* Here is how primitive or already-canonicalized types' hash codes are made. */ @@ -603,7 +613,8 @@ extern void omp_clause_range_check_faile #define INTEGRAL_TYPE_P(TYPE) \ (TREE_CODE (TYPE) == ENUMERAL_TYPE \ || TREE_CODE (TYPE) == BOOLEAN_TYPE \ - || TREE_CODE (TYPE) == INTEGER_TYPE) + || TREE_CODE (TYPE) == INTEGER_TYPE \ + || TREE_CODE (TYPE) == BITINT_TYPE) /* Nonzero if TYPE represents an integral type, including complex and vector integer types. */ @@ -614,6 +625,10 @@ extern void omp_clause_range_check_faile || VECTOR_TYPE_P (TYPE)) \ && INTEGRAL_TYPE_P (TREE_TYPE (TYPE)))) +/* Nonzero if TYPE is bit-precise integer type. */ + +#define BITINT_TYPE_P(TYPE) (TREE_CODE (TYPE) == BITINT_TYPE) + /* Nonzero if TYPE represents a non-saturating fixed-point type. */ #define NON_SAT_FIXED_POINT_TYPE_P(TYPE) \ @@ -1244,7 +1259,9 @@ extern void omp_clause_range_check_faile /* True if NODE, a FIELD_DECL, is to be processed as a bitfield for constructor output purposes. */ #define CONSTRUCTOR_BITFIELD_P(NODE) \ - (DECL_BIT_FIELD (FIELD_DECL_CHECK (NODE)) && DECL_MODE (NODE) != BLKmode) + (DECL_BIT_FIELD (FIELD_DECL_CHECK (NODE)) \ + && (DECL_MODE (NODE) != BLKmode \ + || TREE_CODE (TREE_TYPE (NODE)) == BITINT_TYPE)) /* True if NODE is a clobber right hand side, an expression of indeterminate value that clobbers the LHS in a copy instruction. We use a volatile @@ -3684,6 +3701,38 @@ tree_not_check5 (tree __t, const char *_ } inline tree +tree_check6 (tree __t, const char *__f, int __l, const char *__g, + enum tree_code __c1, enum tree_code __c2, enum tree_code __c3, + enum tree_code __c4, enum tree_code __c5, enum tree_code __c6) +{ + if (TREE_CODE (__t) != __c1 + && TREE_CODE (__t) != __c2 + && TREE_CODE (__t) != __c3 + && TREE_CODE (__t) != __c4 + && TREE_CODE (__t) != __c5 + && TREE_CODE (__t) != __c6) + tree_check_failed (__t, __f, __l, __g, __c1, __c2, __c3, __c4, __c5, __c6, + 0); + return __t; +} + +inline tree +tree_not_check6 (tree __t, const char *__f, int __l, const char *__g, + enum tree_code __c1, enum tree_code __c2, enum tree_code __c3, + enum tree_code __c4, enum tree_code __c5, enum tree_code __c6) +{ + if (TREE_CODE (__t) == __c1 + || TREE_CODE (__t) == __c2 + || TREE_CODE (__t) == __c3 + || TREE_CODE (__t) == __c4 + || TREE_CODE (__t) == __c5 + || TREE_CODE (__t) == __c6) + tree_not_check_failed (__t, __f, __l, __g, __c1, __c2, __c3, __c4, __c5, + __c6, 0); + return __t; +} + +inline tree contains_struct_check (tree __t, const enum tree_node_structure_enum __s, const char *__f, int __l, const char *__g) { @@ -3821,7 +3870,7 @@ any_integral_type_check (tree __t, const { if (!ANY_INTEGRAL_TYPE_P (__t)) tree_check_failed (__t, __f, __l, __g, BOOLEAN_TYPE, ENUMERAL_TYPE, - INTEGER_TYPE, 0); + INTEGER_TYPE, BITINT_TYPE, 0); return __t; } @@ -3940,6 +3989,38 @@ tree_not_check5 (const_tree __t, const c } inline const_tree +tree_check6 (const_tree __t, const char *__f, int __l, const char *__g, + enum tree_code __c1, enum tree_code __c2, enum tree_code __c3, + enum tree_code __c4, enum tree_code __c5, enum tree_code __c6) +{ + if (TREE_CODE (__t) != __c1 + && TREE_CODE (__t) != __c2 + && TREE_CODE (__t) != __c3 + && TREE_CODE (__t) != __c4 + && TREE_CODE (__t) != __c5 + && TREE_CODE (__t) != __c6) + tree_check_failed (__t, __f, __l, __g, __c1, __c2, __c3, __c4, __c5, __c6, + 0); + return __t; +} + +inline const_tree +tree_not_check6 (const_tree __t, const char *__f, int __l, const char *__g, + enum tree_code __c1, enum tree_code __c2, enum tree_code __c3, + enum tree_code __c4, enum tree_code __c5, enum tree_code __c6) +{ + if (TREE_CODE (__t) == __c1 + || TREE_CODE (__t) == __c2 + || TREE_CODE (__t) == __c3 + || TREE_CODE (__t) == __c4 + || TREE_CODE (__t) == __c5 + || TREE_CODE (__t) == __c6) + tree_not_check_failed (__t, __f, __l, __g, __c1, __c2, __c3, __c4, __c5, + __c6, 0); + return __t; +} + +inline const_tree contains_struct_check (const_tree __t, const enum tree_node_structure_enum __s, const char *__f, int __l, const char *__g) { @@ -4047,7 +4128,7 @@ any_integral_type_check (const_tree __t, { if (!ANY_INTEGRAL_TYPE_P (__t)) tree_check_failed (__t, __f, __l, __g, BOOLEAN_TYPE, ENUMERAL_TYPE, - INTEGER_TYPE, 0); + INTEGER_TYPE, BITINT_TYPE, 0); return __t; } @@ -5579,6 +5660,7 @@ extern void build_common_builtin_nodes ( extern void tree_cc_finalize (void); extern tree build_nonstandard_integer_type (unsigned HOST_WIDE_INT, int); extern tree build_nonstandard_boolean_type (unsigned HOST_WIDE_INT); +extern tree build_bitint_type (unsigned HOST_WIDE_INT, int); extern tree build_range_type (tree, tree, tree); extern tree build_nonshared_range_type (tree, tree, tree); extern bool subrange_type_for_debug_p (const_tree, tree *, tree *); --- gcc/tree.cc.jj 2023-08-08 15:54:35.331601028 +0200 +++ gcc/tree.cc 2023-08-08 16:12:02.302940175 +0200 @@ -991,6 +991,7 @@ tree_code_size (enum tree_code code) case VOID_TYPE: case FUNCTION_TYPE: case METHOD_TYPE: + case BITINT_TYPE: case LANG_TYPE: return sizeof (tree_type_non_common); default: gcc_checking_assert (code >= NUM_TREE_CODES); @@ -1732,6 +1733,7 @@ wide_int_to_tree_1 (tree type, const wid case INTEGER_TYPE: case OFFSET_TYPE: + case BITINT_TYPE: if (TYPE_SIGN (type) == UNSIGNED) { /* Cache [0, N). */ @@ -1915,6 +1917,7 @@ cache_integer_cst (tree t, bool might_du case INTEGER_TYPE: case OFFSET_TYPE: + case BITINT_TYPE: if (TYPE_UNSIGNED (type)) { /* Cache 0..N */ @@ -2637,7 +2640,7 @@ build_zero_cst (tree type) { case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: case POINTER_TYPE: case REFERENCE_TYPE: - case OFFSET_TYPE: case NULLPTR_TYPE: + case OFFSET_TYPE: case NULLPTR_TYPE: case BITINT_TYPE: return build_int_cst (type, 0); case REAL_TYPE: @@ -6053,7 +6056,16 @@ type_hash_canon_hash (tree type) hstate.add_object (TREE_INT_CST_ELT (t, i)); break; } - + + case BITINT_TYPE: + { + unsigned prec = TYPE_PRECISION (type); + unsigned uns = TYPE_UNSIGNED (type); + hstate.add_object (prec); + hstate.add_int (uns); + break; + } + case REAL_TYPE: case FIXED_POINT_TYPE: { @@ -6136,6 +6148,11 @@ type_cache_hasher::equal (type_hash *a, || tree_int_cst_equal (TYPE_MIN_VALUE (a->type), TYPE_MIN_VALUE (b->type)))); + case BITINT_TYPE: + if (TYPE_PRECISION (a->type) != TYPE_PRECISION (b->type)) + return false; + return TYPE_UNSIGNED (a->type) == TYPE_UNSIGNED (b->type); + case FIXED_POINT_TYPE: return TYPE_SATURATING (a->type) == TYPE_SATURATING (b->type); @@ -6236,7 +6253,7 @@ type_hash_canon (unsigned int hashcode, /* Free also min/max values and the cache for integer types. This can't be done in free_node, as LTO frees those on its own. */ - if (TREE_CODE (type) == INTEGER_TYPE) + if (TREE_CODE (type) == INTEGER_TYPE || TREE_CODE (type) == BITINT_TYPE) { if (TYPE_MIN_VALUE (type) && TREE_TYPE (TYPE_MIN_VALUE (type)) == type) @@ -7154,6 +7171,44 @@ build_nonstandard_boolean_type (unsigned return type; } +static GTY(()) vec *bitint_type_cache; + +/* Builds a signed or unsigned _BitInt(PRECISION) type. */ +tree +build_bitint_type (unsigned HOST_WIDE_INT precision, int unsignedp) +{ + tree itype, ret; + + if (unsignedp) + unsignedp = MAX_INT_CACHED_PREC + 1; + + if (bitint_type_cache == NULL) + vec_safe_grow_cleared (bitint_type_cache, 2 * MAX_INT_CACHED_PREC + 2); + + if (precision <= MAX_INT_CACHED_PREC) + { + itype = (*bitint_type_cache)[precision + unsignedp]; + if (itype) + return itype; + } + + itype = make_node (BITINT_TYPE); + TYPE_PRECISION (itype) = precision; + + if (unsignedp) + fixup_unsigned_type (itype); + else + fixup_signed_type (itype); + + inchash::hash hstate; + inchash::add_expr (TYPE_MAX_VALUE (itype), hstate); + ret = type_hash_canon (hstate.end (), itype); + if (precision <= MAX_INT_CACHED_PREC) + (*bitint_type_cache)[precision + unsignedp] = ret; + + return ret; +} + /* Create a range of some discrete type TYPE (an INTEGER_TYPE, ENUMERAL_TYPE or BOOLEAN_TYPE) with low bound LOWVAL and high bound HIGHVAL. If SHARED is true, reuse such a type that has already been constructed. */ @@ -11041,6 +11096,8 @@ signed_or_unsigned_type_for (int unsigne else return NULL_TREE; + if (TREE_CODE (type) == BITINT_TYPE) + return build_bitint_type (bits, unsignedp); return build_nonstandard_integer_type (bits, unsignedp); } @@ -13462,6 +13519,7 @@ verify_type_variant (const_tree t, tree if ((TREE_CODE (t) == ENUMERAL_TYPE && COMPLETE_TYPE_P (t)) || TREE_CODE (t) == INTEGER_TYPE || TREE_CODE (t) == BOOLEAN_TYPE + || TREE_CODE (t) == BITINT_TYPE || SCALAR_FLOAT_TYPE_P (t) || FIXED_POINT_TYPE_P (t)) { @@ -14201,6 +14259,7 @@ verify_type (const_tree t) } else if (TREE_CODE (t) == INTEGER_TYPE || TREE_CODE (t) == BOOLEAN_TYPE + || TREE_CODE (t) == BITINT_TYPE || TREE_CODE (t) == OFFSET_TYPE || TREE_CODE (t) == REFERENCE_TYPE || TREE_CODE (t) == NULLPTR_TYPE @@ -14260,6 +14319,7 @@ verify_type (const_tree t) } if (TREE_CODE (t) != INTEGER_TYPE && TREE_CODE (t) != BOOLEAN_TYPE + && TREE_CODE (t) != BITINT_TYPE && TREE_CODE (t) != OFFSET_TYPE && TREE_CODE (t) != REFERENCE_TYPE && TREE_CODE (t) != NULLPTR_TYPE @@ -15035,6 +15095,7 @@ void tree_cc_finalize (void) { clear_nonstandard_integer_type_cache (); + vec_free (bitint_type_cache); } #if CHECKING_P --- gcc/builtins.cc.jj 2023-08-08 15:55:05.230182325 +0200 +++ gcc/builtins.cc 2023-08-08 16:12:02.303940161 +0200 @@ -1876,6 +1876,7 @@ type_to_class (tree type) ? string_type_class : array_type_class); case LANG_TYPE: return lang_type_class; case OPAQUE_TYPE: return opaque_type_class; + case BITINT_TYPE: return bitint_type_class; default: return no_type_class; } } @@ -9423,9 +9424,11 @@ fold_builtin_unordered_cmp (location_t l /* Choose the wider of two real types. */ cmp_type = TYPE_PRECISION (type0) >= TYPE_PRECISION (type1) ? type0 : type1; - else if (code0 == REAL_TYPE && code1 == INTEGER_TYPE) + else if (code0 == REAL_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) cmp_type = type0; - else if (code0 == INTEGER_TYPE && code1 == REAL_TYPE) + else if ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && code1 == REAL_TYPE) cmp_type = type1; arg0 = fold_convert_loc (loc, cmp_type, arg0); --- gcc/cfgexpand.cc.jj 2023-08-08 15:54:33.893621164 +0200 +++ gcc/cfgexpand.cc 2023-08-08 17:19:26.025312540 +0200 @@ -4524,6 +4524,10 @@ expand_debug_expr (tree exp) /* Fall through. */ case INTEGER_CST: + if (TREE_CODE (TREE_TYPE (exp)) == BITINT_TYPE + && TYPE_MODE (TREE_TYPE (exp)) == BLKmode) + return NULL; + /* FALLTHRU */ case REAL_CST: case FIXED_CST: op0 = expand_expr (exp, NULL_RTX, mode, EXPAND_INITIALIZER); --- gcc/convert.cc.jj 2023-08-08 15:54:33.998619694 +0200 +++ gcc/convert.cc 2023-08-08 16:12:02.308940091 +0200 @@ -77,6 +77,7 @@ convert_to_pointer_1 (tree type, tree ex case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: { /* If the input precision differs from the target pointer type precision, first convert the input expression to an integer type of @@ -316,6 +317,7 @@ convert_to_real_1 (tree type, tree expr, case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: return build1 (FLOAT_EXPR, type, expr); case FIXED_POINT_TYPE: @@ -660,6 +662,7 @@ convert_to_integer_1 (tree type, tree ex case ENUMERAL_TYPE: case BOOLEAN_TYPE: case OFFSET_TYPE: + case BITINT_TYPE: /* If this is a logical operation, which just returns 0 or 1, we can change the type of the expression. */ @@ -701,7 +704,9 @@ convert_to_integer_1 (tree type, tree ex type corresponding to its mode, then do a nop conversion to TYPE. */ else if (TREE_CODE (type) == ENUMERAL_TYPE - || maybe_ne (outprec, GET_MODE_PRECISION (TYPE_MODE (type)))) + || (TREE_CODE (type) != BITINT_TYPE + && maybe_ne (outprec, + GET_MODE_PRECISION (TYPE_MODE (type))))) { expr = convert_to_integer_1 (lang_hooks.types.type_for_mode @@ -1000,6 +1005,7 @@ convert_to_complex_1 (tree type, tree ex case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: return build2 (COMPLEX_EXPR, type, convert (subtype, expr), convert (subtype, integer_zero_node)); --- gcc/doc/generic.texi.jj 2023-06-07 09:42:14.593131807 +0200 +++ gcc/doc/generic.texi 2023-08-08 17:04:48.062612388 +0200 @@ -290,6 +290,7 @@ The elements are indexed from zero. @tindex INTEGER_TYPE @tindex TYPE_MIN_VALUE @tindex TYPE_MAX_VALUE +@tindex BITINT_TYPE @tindex REAL_TYPE @tindex FIXED_POINT_TYPE @tindex COMPLEX_TYPE @@ -449,6 +450,14 @@ integer that may be represented by this @code{TYPE_MAX_VALUE} is an @code{INTEGER_CST} for the largest integer that may be represented by this type. +@item BITINT_TYPE +Used to represent the bit-precise integer types, @code{_BitInt(@var{N})}. +These types are similar to @code{INTEGER_TYPE}, but can have arbitrary +user selected precisions and do or can have different alignment, function +argument and return value passing conventions. +Larger BITINT_TYPEs can have @code{BLKmode} @code{TYPE_MODE} and need to +be lowered by a special BITINT_TYPE lowering pass. + @item REAL_TYPE Used to represent the @code{float}, @code{double}, and @code{long double} types. The number of bits in the floating-point representation --- gcc/doc/tm.texi.in.jj 2023-08-08 15:54:34.156617482 +0200 +++ gcc/doc/tm.texi.in 2023-08-08 16:12:02.309940077 +0200 @@ -936,6 +936,8 @@ Return a value, with the same meaning as @code{FLT_EVAL_METHOD} that describes which excess precision should be applied. +@hook TARGET_C_BITINT_TYPE_INFO + @hook TARGET_PROMOTE_FUNCTION_MODE @defmac PARM_BOUNDARY --- gcc/doc/tm.texi.jj 2023-08-08 15:54:34.090618406 +0200 +++ gcc/doc/tm.texi 2023-08-08 19:24:12.438581403 +0200 @@ -1020,6 +1020,21 @@ Return a value, with the same meaning as @code{FLT_EVAL_METHOD} that describes which excess precision should be applied. +@deftypefn {Target Hook} bool TARGET_C_BITINT_TYPE_INFO (int @var{n}, struct bitint_info *@var{info}) +This target hook returns true if @code{_BitInt(@var{N})} is supported and +provides details on it. @code{_BitInt(@var{N})} is to be represented as +series of @code{info->limb_mode} +@code{CEIL (@var{N}, GET_MODE_PRECISION (info->limb_mode))} limbs, +ordered from least significant to most significant if +@code{!info->big_endian}, otherwise from most significant to least +significant. If @code{info->extended} is false, the bits above or equal to +@var{N} are undefined when stored in a register or memory, otherwise they +are zero or sign extended depending on if it is +@code{unsigned _BitInt(@var{N})} or one of @code{_BitInt(@var{N})} or +@code{signed _BitInt(@var{N})}. Alignment of the type is +@code{GET_MODE_ALIGNMENT (info->limb_mode)}. +@end deftypefn + @deftypefn {Target Hook} machine_mode TARGET_PROMOTE_FUNCTION_MODE (const_tree @var{type}, machine_mode @var{mode}, int *@var{punsignedp}, const_tree @var{funtype}, int @var{for_return}) Like @code{PROMOTE_MODE}, but it is applied to outgoing function arguments or function return values. The target hook should return the new mode --- gcc/dwarf2out.cc.jj 2023-08-08 15:55:06.471164947 +0200 +++ gcc/dwarf2out.cc 2023-08-08 19:06:17.624644391 +0200 @@ -13298,6 +13298,14 @@ base_type_die (tree type, bool reverse) encoding = DW_ATE_boolean; break; + case BITINT_TYPE: + /* C23 _BitInt(N). */ + if (TYPE_UNSIGNED (type)) + encoding = DW_ATE_unsigned; + else + encoding = DW_ATE_signed; + break; + default: /* No other TREE_CODEs are Dwarf fundamental types. */ gcc_unreachable (); @@ -13308,6 +13316,8 @@ base_type_die (tree type, bool reverse) add_AT_unsigned (base_type_result, DW_AT_byte_size, int_size_in_bytes (type)); add_AT_unsigned (base_type_result, DW_AT_encoding, encoding); + if (TREE_CODE (type) == BITINT_TYPE) + add_AT_unsigned (base_type_result, DW_AT_bit_size, TYPE_PRECISION (type)); if (need_endianity_attribute_p (reverse)) add_AT_unsigned (base_type_result, DW_AT_endianity, @@ -13392,6 +13402,7 @@ is_base_type (tree type) case FIXED_POINT_TYPE: case COMPLEX_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: return true; case VOID_TYPE: @@ -13990,12 +14001,24 @@ modified_type_die (tree type, int cv_qua name = DECL_NAME (name); add_name_attribute (mod_type_die, IDENTIFIER_POINTER (name)); } - /* This probably indicates a bug. */ else if (mod_type_die && mod_type_die->die_tag == DW_TAG_base_type) { - name = TYPE_IDENTIFIER (type); - add_name_attribute (mod_type_die, - name ? IDENTIFIER_POINTER (name) : "__unknown__"); + if (TREE_CODE (type) == BITINT_TYPE) + { + char name_buf[sizeof ("unsigned _BitInt(2147483647)")]; + snprintf (name_buf, sizeof (name_buf), + "%s_BitInt(%d)", TYPE_UNSIGNED (type) ? "unsigned " : "", + TYPE_PRECISION (type)); + add_name_attribute (mod_type_die, name_buf); + } + else + { + /* This probably indicates a bug. */ + name = TYPE_IDENTIFIER (type); + add_name_attribute (mod_type_die, + name + ? IDENTIFIER_POINTER (name) : "__unknown__"); + } } if (qualified_type && !reverse_base_type) @@ -20523,6 +20546,17 @@ rtl_for_decl_init (tree init, tree type) return NULL; } + /* Large _BitInt BLKmode INTEGER_CSTs would yield a MEM. */ + if (TREE_CODE (init) == INTEGER_CST + && TREE_CODE (TREE_TYPE (init)) == BITINT_TYPE + && TYPE_MODE (TREE_TYPE (init)) == BLKmode) + { + if (tree_fits_shwi_p (init)) + return GEN_INT (tree_to_shwi (init)); + else + return NULL; + } + rtl = expand_expr (init, NULL_RTX, VOIDmode, EXPAND_INITIALIZER); /* If expand_expr returns a MEM, it wasn't immediate. */ @@ -26361,6 +26395,7 @@ gen_type_die_with_usage (tree type, dw_d case FIXED_POINT_TYPE: case COMPLEX_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: /* No DIEs needed for fundamental types. */ break; --- gcc/expr.cc.jj 2023-08-08 16:02:52.837633995 +0200 +++ gcc/expr.cc 2023-08-09 10:30:13.524295673 +0200 @@ -10650,6 +10650,25 @@ expand_expr_real_1 (tree exp, rtx target tree ssa_name = NULL_TREE; gimple *g; + /* Some ABIs define padding bits in _BitInt uninitialized. Normally, RTL + expansion sign/zero extends integral types with less than mode precision + when reading from bit-fields and after arithmetic operations (see + REDUCE_BIT_FIELD in expand_expr_real_2) and on subsequent loads relies + on those extensions to have been already performed, but because of the + above for _BitInt they need to be sign/zero extended when reading from + locations that could be exposed to ABI boundaries (when loading from + objects in memory, or function arguments, return value). Because we + internally extend after arithmetic operations, we can avoid doing that + when reading from SSA_NAMEs of vars. */ +#define EXTEND_BITINT(expr) \ + ((TREE_CODE (type) == BITINT_TYPE \ + && reduce_bit_field \ + && mode != BLKmode \ + && modifier != EXPAND_MEMORY \ + && modifier != EXPAND_WRITE \ + && modifier != EXPAND_CONST_ADDRESS) \ + ? reduce_to_bit_field_precision ((expr), NULL_RTX, type) : (expr)) + type = TREE_TYPE (exp); mode = TYPE_MODE (type); unsignedp = TYPE_UNSIGNED (type); @@ -10823,6 +10842,13 @@ expand_expr_real_1 (tree exp, rtx target ssa_name = exp; decl_rtl = get_rtx_for_ssa_name (ssa_name); exp = SSA_NAME_VAR (ssa_name); + /* Optimize and avoid to EXTEND_BITINIT doing anything if it is an + SSA_NAME computed within the current function. In such case the + value have been already extended before. While if it is a function + parameter, result or some memory location, we need to be prepared + for some other compiler leaving the bits uninitialized. */ + if (!exp || VAR_P (exp)) + reduce_bit_field = false; goto expand_decl_rtl; case VAR_DECL: @@ -10956,7 +10982,7 @@ expand_expr_real_1 (tree exp, rtx target temp = expand_misaligned_mem_ref (temp, mode, unsignedp, MEM_ALIGN (temp), NULL_RTX, NULL); - return temp; + return EXTEND_BITINT (temp); } if (exp) @@ -11002,13 +11028,35 @@ expand_expr_real_1 (tree exp, rtx target temp = gen_lowpart_SUBREG (mode, decl_rtl); SUBREG_PROMOTED_VAR_P (temp) = 1; SUBREG_PROMOTED_SET (temp, unsignedp); - return temp; + return EXTEND_BITINT (temp); } - return decl_rtl; + return EXTEND_BITINT (decl_rtl); case INTEGER_CST: { + if (TREE_CODE (type) == BITINT_TYPE) + { + unsigned int prec = TYPE_PRECISION (type); + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (prec, &info)); + scalar_int_mode limb_mode + = as_a (info.limb_mode); + unsigned int limb_prec = GET_MODE_PRECISION (limb_mode); + if (prec > limb_prec) + { + scalar_int_mode arith_mode + = (targetm.scalar_mode_supported_p (TImode) + ? TImode : DImode); + if (prec > GET_MODE_PRECISION (arith_mode)) + { + /* Emit large/huge _BitInt INTEGER_CSTs into memory. */ + exp = tree_output_constant_def (exp); + return expand_expr (exp, target, VOIDmode, modifier); + } + } + } + /* Given that TYPE_PRECISION (type) is not always equal to GET_MODE_PRECISION (TYPE_MODE (type)), we need to extend from the former to the latter according to the signedness of the @@ -11187,7 +11235,7 @@ expand_expr_real_1 (tree exp, rtx target && align < GET_MODE_ALIGNMENT (mode)) temp = expand_misaligned_mem_ref (temp, mode, unsignedp, align, NULL_RTX, NULL); - return temp; + return EXTEND_BITINT (temp); } case MEM_REF: @@ -11258,7 +11306,7 @@ expand_expr_real_1 (tree exp, rtx target ? NULL_RTX : target, alt_rtl); if (reverse) temp = flip_storage_order (mode, temp); - return temp; + return EXTEND_BITINT (temp); } case ARRAY_REF: @@ -11810,6 +11858,8 @@ expand_expr_real_1 (tree exp, rtx target && modifier != EXPAND_WRITE) op0 = flip_storage_order (mode1, op0); + op0 = EXTEND_BITINT (op0); + if (mode == mode1 || mode1 == BLKmode || mode1 == tmode || modifier == EXPAND_CONST_ADDRESS || modifier == EXPAND_INITIALIZER) @@ -12155,6 +12205,7 @@ expand_expr_real_1 (tree exp, rtx target return expand_expr_real_2 (&ops, target, tmode, modifier); } } +#undef EXTEND_BITINT /* Subroutine of above: reduce EXP to the precision of TYPE (in the signedness of TYPE), possibly returning the result in TARGET. --- gcc/fold-const.cc.jj 2023-08-08 15:55:06.507164442 +0200 +++ gcc/fold-const.cc 2023-08-08 16:12:02.318939952 +0200 @@ -2557,7 +2557,7 @@ fold_convert_loc (location_t loc, tree t /* fall through */ case INTEGER_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: - case OFFSET_TYPE: + case OFFSET_TYPE: case BITINT_TYPE: if (TREE_CODE (arg) == INTEGER_CST) { tem = fold_convert_const (NOP_EXPR, type, arg); @@ -2597,7 +2597,7 @@ fold_convert_loc (location_t loc, tree t switch (TREE_CODE (orig)) { - case INTEGER_TYPE: + case INTEGER_TYPE: case BITINT_TYPE: case BOOLEAN_TYPE: case ENUMERAL_TYPE: case POINTER_TYPE: case REFERENCE_TYPE: return fold_build1_loc (loc, FLOAT_EXPR, type, arg); @@ -2632,6 +2632,7 @@ fold_convert_loc (location_t loc, tree t case ENUMERAL_TYPE: case BOOLEAN_TYPE: case REAL_TYPE: + case BITINT_TYPE: return fold_build1_loc (loc, FIXED_CONVERT_EXPR, type, arg); case COMPLEX_TYPE: @@ -2645,7 +2646,7 @@ fold_convert_loc (location_t loc, tree t case COMPLEX_TYPE: switch (TREE_CODE (orig)) { - case INTEGER_TYPE: + case INTEGER_TYPE: case BITINT_TYPE: case BOOLEAN_TYPE: case ENUMERAL_TYPE: case POINTER_TYPE: case REFERENCE_TYPE: case REAL_TYPE: @@ -5324,6 +5325,8 @@ make_range_step (location_t loc, enum tr equiv_type = lang_hooks.types.type_for_mode (TYPE_MODE (arg0_type), TYPE_SATURATING (arg0_type)); + else if (TREE_CODE (arg0_type) == BITINT_TYPE) + equiv_type = arg0_type; else equiv_type = lang_hooks.types.type_for_mode (TYPE_MODE (arg0_type), 1); @@ -6850,10 +6853,19 @@ extract_muldiv_1 (tree t, tree c, enum t { tree type = TREE_TYPE (t); enum tree_code tcode = TREE_CODE (t); - tree ctype = (wide_type != 0 - && (GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (wide_type)) - > GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type))) - ? wide_type : type); + tree ctype = type; + if (wide_type) + { + if (TREE_CODE (type) == BITINT_TYPE + || TREE_CODE (wide_type) == BITINT_TYPE) + { + if (TYPE_PRECISION (wide_type) > TYPE_PRECISION (type)) + ctype = wide_type; + } + else if (GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (wide_type)) + > GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type))) + ctype = wide_type; + } tree t1, t2; bool same_p = tcode == code; tree op0 = NULL_TREE, op1 = NULL_TREE; @@ -7714,7 +7726,29 @@ static int native_encode_int (const_tree expr, unsigned char *ptr, int len, int off) { tree type = TREE_TYPE (expr); - int total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); + int total_bytes; + if (TREE_CODE (type) == BITINT_TYPE) + { + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), + &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) > GET_MODE_PRECISION (limb_mode)) + { + total_bytes = tree_to_uhwi (TYPE_SIZE_UNIT (type)); + /* More work is needed when adding _BitInt support to PDP endian + if limb is smaller than word, or if _BitInt limb ordering doesn't + match target endianity here. */ + gcc_checking_assert (info.big_endian == WORDS_BIG_ENDIAN + && (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN + || (GET_MODE_SIZE (limb_mode) + >= UNITS_PER_WORD))); + } + else + total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); + } + else + total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); int byte, offset, word, words; unsigned char value; @@ -8622,7 +8656,29 @@ native_encode_initializer (tree init, un static tree native_interpret_int (tree type, const unsigned char *ptr, int len) { - int total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); + int total_bytes; + if (TREE_CODE (type) == BITINT_TYPE) + { + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), + &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) > GET_MODE_PRECISION (limb_mode)) + { + total_bytes = tree_to_uhwi (TYPE_SIZE_UNIT (type)); + /* More work is needed when adding _BitInt support to PDP endian + if limb is smaller than word, or if _BitInt limb ordering doesn't + match target endianity here. */ + gcc_checking_assert (info.big_endian == WORDS_BIG_ENDIAN + && (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN + || (GET_MODE_SIZE (limb_mode) + >= UNITS_PER_WORD))); + } + else + total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); + } + else + total_bytes = GET_MODE_SIZE (SCALAR_INT_TYPE_MODE (type)); if (total_bytes > len || total_bytes * BITS_PER_UNIT > HOST_BITS_PER_DOUBLE_INT) @@ -8824,6 +8880,7 @@ native_interpret_expr (tree type, const case POINTER_TYPE: case REFERENCE_TYPE: case OFFSET_TYPE: + case BITINT_TYPE: return native_interpret_int (type, ptr, len); case REAL_TYPE: --- gcc/gimple-expr.cc.jj 2023-08-08 15:54:34.369614499 +0200 +++ gcc/gimple-expr.cc 2023-08-08 16:12:02.318939952 +0200 @@ -111,6 +111,15 @@ useless_type_conversion_p (tree outer_ty && TYPE_PRECISION (outer_type) != 1) return false; + /* Preserve conversions to/from BITINT_TYPE. While we don't + need to care that much about such conversions within a function's + body, we need to prevent changing BITINT_TYPE to INTEGER_TYPE + of the same precision or vice versa when passed to functions, + especially for varargs. */ + if ((TREE_CODE (inner_type) == BITINT_TYPE) + != (TREE_CODE (outer_type) == BITINT_TYPE)) + return false; + /* We don't need to preserve changes in the types minimum or maximum value in general as these do not generate code unless the types precisions are different. */ --- gcc/gimple-fold.cc.jj 2023-08-08 15:55:06.609163014 +0200 +++ gcc/gimple-fold.cc 2023-08-08 16:18:44.828303852 +0200 @@ -1475,8 +1475,9 @@ gimple_fold_builtin_memset (gimple_stmt_ if (TREE_CODE (etype) == ARRAY_TYPE) etype = TREE_TYPE (etype); - if (!INTEGRAL_TYPE_P (etype) - && !POINTER_TYPE_P (etype)) + if ((!INTEGRAL_TYPE_P (etype) + && !POINTER_TYPE_P (etype)) + || TREE_CODE (etype) == BITINT_TYPE) return NULL_TREE; if (! var_decl_component_p (var)) @@ -4102,8 +4103,8 @@ gimple_fold_builtin_realloc (gimple_stmt return false; } -/* Number of bytes into which any type but aggregate or vector types - should fit. */ +/* Number of bytes into which any type but aggregate, vector or + _BitInt types should fit. */ static constexpr size_t clear_padding_unit = MAX_BITSIZE_MODE_ANY_MODE / BITS_PER_UNIT; /* Buffer size on which __builtin_clear_padding folding code works. */ @@ -4594,6 +4595,26 @@ clear_padding_real_needs_padding_p (tree && (fmt->signbit_ro == 79 || fmt->signbit_ro == 95)); } +/* _BitInt has padding bits if it isn't extended in the ABI and has smaller + precision than bits in limb or corresponding number of limbs. */ + +static bool +clear_padding_bitint_needs_padding_p (tree type) +{ + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), &info)); + if (info.extended) + return false; + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) < GET_MODE_PRECISION (limb_mode)) + return true; + else if (TYPE_PRECISION (type) == GET_MODE_PRECISION (limb_mode)) + return false; + else + return (((unsigned) TYPE_PRECISION (type)) + % GET_MODE_PRECISION (limb_mode)) != 0; +} + /* Return true if TYPE might contain any padding bits. */ bool @@ -4610,6 +4631,8 @@ clear_padding_type_may_have_padding_p (t return clear_padding_type_may_have_padding_p (TREE_TYPE (type)); case REAL_TYPE: return clear_padding_real_needs_padding_p (type); + case BITINT_TYPE: + return clear_padding_bitint_needs_padding_p (type); default: return false; } @@ -4854,6 +4877,57 @@ clear_padding_type (clear_padding_struct memset (buf->buf + buf->size, ~0, sz); buf->size += sz; break; + case BITINT_TYPE: + { + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) <= GET_MODE_PRECISION (limb_mode)) + { + gcc_assert ((size_t) sz <= clear_padding_unit); + if ((unsigned HOST_WIDE_INT) sz + buf->size + > clear_padding_buf_size) + clear_padding_flush (buf, false); + if (!info.extended + && TYPE_PRECISION (type) < GET_MODE_PRECISION (limb_mode)) + { + int tprec = GET_MODE_PRECISION (limb_mode); + int prec = TYPE_PRECISION (type); + tree t = build_nonstandard_integer_type (tprec, 1); + tree cst = wide_int_to_tree (t, wi::mask (prec, true, tprec)); + int len = native_encode_expr (cst, buf->buf + buf->size, sz); + gcc_assert (len > 0 && (size_t) len == (size_t) sz); + } + else + memset (buf->buf + buf->size, 0, sz); + buf->size += sz; + break; + } + tree limbtype + = build_nonstandard_integer_type (GET_MODE_PRECISION (limb_mode), 1); + fldsz = int_size_in_bytes (limbtype); + nelts = int_size_in_bytes (type) / fldsz; + for (HOST_WIDE_INT i = 0; i < nelts; i++) + { + if (!info.extended + && i == (info.big_endian ? 0 : nelts - 1) + && (((unsigned) TYPE_PRECISION (type)) + % TYPE_PRECISION (limbtype)) != 0) + { + int tprec = GET_MODE_PRECISION (limb_mode); + int prec = (((unsigned) TYPE_PRECISION (type)) % tprec); + tree cst = wide_int_to_tree (limbtype, + wi::mask (prec, true, tprec)); + int len = native_encode_expr (cst, buf->buf + buf->size, + fldsz); + gcc_assert (len > 0 && (size_t) len == (size_t) fldsz); + buf->size += fldsz; + } + else + clear_padding_type (buf, limbtype, fldsz, for_auto_init); + } + break; + } default: gcc_assert ((size_t) sz <= clear_padding_unit); if ((unsigned HOST_WIDE_INT) sz + buf->size > clear_padding_buf_size) --- gcc/internal-fn.cc.jj 2023-08-08 15:55:06.709161614 +0200 +++ gcc/internal-fn.cc 2023-08-08 16:22:09.404440148 +0200 @@ -1646,6 +1676,12 @@ expand_mul_overflow (location_t loc, tre int pos_neg0 = get_range_pos_neg (arg0); int pos_neg1 = get_range_pos_neg (arg1); + /* Unsigned types with smaller than mode precision, even if they have most + significant bit set, are still zero-extended. */ + if (uns0_p && TYPE_PRECISION (TREE_TYPE (arg0)) < GET_MODE_PRECISION (mode)) + pos_neg0 = 1; + if (uns1_p && TYPE_PRECISION (TREE_TYPE (arg1)) < GET_MODE_PRECISION (mode)) + pos_neg1 = 1; /* s1 * u2 -> ur */ if (!uns0_p && uns1_p && unsr_p) @@ -4923,3 +4959,104 @@ expand_MASK_CALL (internal_fn, gcall *) /* This IFN should only exist between ifcvt and vect passes. */ gcc_unreachable (); } + +void +expand_MULBITINT (internal_fn, gcall *stmt) +{ + rtx_mode_t args[6]; + for (int i = 0; i < 6; i++) + args[i] = rtx_mode_t (expand_normal (gimple_call_arg (stmt, i)), + (i & 1) ? SImode : ptr_mode); + rtx fun = init_one_libfunc ("__mulbitint3"); + emit_library_call_value_1 (0, fun, NULL_RTX, LCT_NORMAL, VOIDmode, 6, args); +} + +void +expand_DIVMODBITINT (internal_fn, gcall *stmt) +{ + rtx_mode_t args[8]; + for (int i = 0; i < 8; i++) + args[i] = rtx_mode_t (expand_normal (gimple_call_arg (stmt, i)), + (i & 1) ? SImode : ptr_mode); + rtx fun = init_one_libfunc ("__divmodbitint4"); + emit_library_call_value_1 (0, fun, NULL_RTX, LCT_NORMAL, VOIDmode, 8, args); +} + +void +expand_FLOATTOBITINT (internal_fn, gcall *stmt) +{ + machine_mode mode = TYPE_MODE (TREE_TYPE (gimple_call_arg (stmt, 2))); + rtx arg0 = expand_normal (gimple_call_arg (stmt, 0)); + rtx arg1 = expand_normal (gimple_call_arg (stmt, 1)); + rtx arg2 = expand_normal (gimple_call_arg (stmt, 2)); + const char *mname = GET_MODE_NAME (mode); + unsigned mname_len = strlen (mname); + int len = 12 + mname_len; + if (DECIMAL_FLOAT_MODE_P (mode)) + len += 4; + char *libfunc_name = XALLOCAVEC (char, len); + char *p = libfunc_name; + const char *q; + if (DECIMAL_FLOAT_MODE_P (mode)) + { +#if ENABLE_DECIMAL_BID_FORMAT + memcpy (p, "__bid_fix", 9); +#else + memcpy (p, "__dpd_fix", 9); +#endif + p += 9; + } + else + { + memcpy (p, "__fix", 5); + p += 5; + } + for (q = mname; *q; q++) + *p++ = TOLOWER (*q); + memcpy (p, "bitint", 7); + rtx fun = init_one_libfunc (libfunc_name); + emit_library_call (fun, LCT_NORMAL, VOIDmode, arg0, ptr_mode, arg1, + SImode, arg2, mode); +} + +void +expand_BITINTTOFLOAT (internal_fn, gcall *stmt) +{ + tree lhs = gimple_call_lhs (stmt); + if (!lhs) + return; + machine_mode mode = TYPE_MODE (TREE_TYPE (lhs)); + rtx arg0 = expand_normal (gimple_call_arg (stmt, 0)); + rtx arg1 = expand_normal (gimple_call_arg (stmt, 1)); + const char *mname = GET_MODE_NAME (mode); + unsigned mname_len = strlen (mname); + int len = 14 + mname_len; + if (DECIMAL_FLOAT_MODE_P (mode)) + len += 4; + char *libfunc_name = XALLOCAVEC (char, len); + char *p = libfunc_name; + const char *q; + if (DECIMAL_FLOAT_MODE_P (mode)) + { +#if ENABLE_DECIMAL_BID_FORMAT + memcpy (p, "__bid_floatbitint", 17); +#else + memcpy (p, "__dpd_floatbitint", 17); +#endif + p += 17; + } + else + { + memcpy (p, "__floatbitint", 13); + p += 13; + } + for (q = mname; *q; q++) + *p++ = TOLOWER (*q); + *p = '\0'; + rtx fun = init_one_libfunc (libfunc_name); + rtx target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); + rtx val = emit_library_call_value (fun, target, LCT_PURE, mode, + arg0, ptr_mode, arg1, SImode); + if (val != target) + emit_move_insn (target, val); +} --- gcc/internal-fn.def.jj 2023-08-08 15:55:06.710161600 +0200 +++ gcc/internal-fn.def 2023-08-08 16:12:02.322939896 +0200 @@ -548,6 +548,12 @@ DEF_INTERNAL_FN (ASSUME, ECF_CONST | ECF /* For if-conversion of inbranch SIMD clones. */ DEF_INTERNAL_FN (MASK_CALL, ECF_NOVOPS, NULL) +/* _BitInt support. */ +DEF_INTERNAL_FN (MULBITINT, ECF_LEAF | ECF_NOTHROW, ". O . R . R . ") +DEF_INTERNAL_FN (DIVMODBITINT, ECF_LEAF, ". O . O . R . R . ") +DEF_INTERNAL_FN (FLOATTOBITINT, ECF_LEAF | ECF_NOTHROW, ". O . . ") +DEF_INTERNAL_FN (BITINTTOFLOAT, ECF_PURE | ECF_LEAF, ". R . ") + #undef DEF_INTERNAL_INT_FN #undef DEF_INTERNAL_FLT_FN #undef DEF_INTERNAL_FLT_FLOATN_FN --- gcc/internal-fn.h.jj 2023-08-08 15:55:06.710161600 +0200 +++ gcc/internal-fn.h 2023-08-08 16:12:02.322939896 +0200 @@ -257,6 +257,10 @@ extern void expand_SPACESHIP (internal_f extern void expand_TRAP (internal_fn, gcall *); extern void expand_ASSUME (internal_fn, gcall *); extern void expand_MASK_CALL (internal_fn, gcall *); +extern void expand_MULBITINT (internal_fn, gcall *); +extern void expand_DIVMODBITINT (internal_fn, gcall *); +extern void expand_FLOATTOBITINT (internal_fn, gcall *); +extern void expand_BITINTTOFLOAT (internal_fn, gcall *); extern bool vectorized_internal_fn_supported_p (internal_fn, tree); --- gcc/match.pd.jj 2023-08-08 15:55:07.057156740 +0200 +++ gcc/match.pd 2023-08-08 16:12:02.323939882 +0200 @@ -6557,6 +6557,7 @@ (define_operator_list SYNC_FETCH_AND_AND - 1)); })))) (if (wi::to_wide (cst) == signed_max && TYPE_UNSIGNED (arg1_type) + && TYPE_MODE (arg1_type) != BLKmode /* We will flip the signedness of the comparison operator associated with the mode of @1, so the sign bit is specified by this mode. Check that @1 is the signed --- gcc/pretty-print.h.jj 2023-08-08 15:54:34.806608379 +0200 +++ gcc/pretty-print.h 2023-08-08 16:12:02.324939868 +0200 @@ -336,8 +336,23 @@ pp_get_prefix (const pretty_printer *pp) #define pp_wide_int(PP, W, SGN) \ do \ { \ - print_dec (W, pp_buffer (PP)->digit_buffer, SGN); \ - pp_string (PP, pp_buffer (PP)->digit_buffer); \ + const wide_int_ref &pp_wide_int_ref = (W); \ + unsigned int pp_wide_int_prec \ + = pp_wide_int_ref.get_precision (); \ + if ((pp_wide_int_prec + 3) / 4 \ + > sizeof (pp_buffer (PP)->digit_buffer) - 3) \ + { \ + char *pp_wide_int_buf \ + = XALLOCAVEC (char, (pp_wide_int_prec + 3) / 4 + 3);\ + print_dec (pp_wide_int_ref, pp_wide_int_buf, SGN); \ + pp_string (PP, pp_wide_int_buf); \ + } \ + else \ + { \ + print_dec (pp_wide_int_ref, \ + pp_buffer (PP)->digit_buffer, SGN); \ + pp_string (PP, pp_buffer (PP)->digit_buffer); \ + } \ } \ while (0) #define pp_vrange(PP, R) \ --- gcc/stor-layout.cc.jj 2023-08-08 15:54:34.855607692 +0200 +++ gcc/stor-layout.cc 2023-08-08 16:15:41.003877836 +0200 @@ -2148,6 +2148,22 @@ finish_bitfield_representative (tree rep || GET_MODE_BITSIZE (mode) > maxbitsize || GET_MODE_BITSIZE (mode) > MAX_FIXED_MODE_SIZE) { + if (TREE_CODE (TREE_TYPE (field)) == BITINT_TYPE) + { + struct bitint_info info; + unsigned prec = TYPE_PRECISION (TREE_TYPE (field)); + gcc_assert (targetm.c.bitint_type_info (prec, &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + unsigned lprec = GET_MODE_PRECISION (limb_mode); + if (prec > lprec) + { + /* For middle/large/huge _BitInt prefer bitsize being a multiple + of limb precision. */ + unsigned HOST_WIDE_INT bsz = CEIL (bitsize, lprec) * lprec; + if (bsz <= maxbitsize) + bitsize = bsz; + } + } /* We really want a BLKmode representative only as a last resort, considering the member b in struct { int a : 7; int b : 17; int c; } __attribute__((packed)); @@ -2393,6 +2409,64 @@ layout_type (tree type) break; } + case BITINT_TYPE: + { + struct bitint_info info; + int cnt; + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) <= GET_MODE_PRECISION (limb_mode)) + { + SET_TYPE_MODE (type, limb_mode); + cnt = 1; + } + else + { + SET_TYPE_MODE (type, BLKmode); + cnt = CEIL (TYPE_PRECISION (type), GET_MODE_PRECISION (limb_mode)); + } + TYPE_SIZE (type) = bitsize_int (cnt * GET_MODE_BITSIZE (limb_mode)); + TYPE_SIZE_UNIT (type) = size_int (cnt * GET_MODE_SIZE (limb_mode)); + SET_TYPE_ALIGN (type, GET_MODE_ALIGNMENT (limb_mode)); + if (cnt > 1) + { + /* Use same mode as compute_record_mode would use for a structure + containing cnt limb_mode elements. */ + machine_mode mode = mode_for_size_tree (TYPE_SIZE (type), + MODE_INT, 1).else_blk (); + if (mode == BLKmode) + break; + finalize_type_size (type); + SET_TYPE_MODE (type, mode); + if (STRICT_ALIGNMENT + && !(TYPE_ALIGN (type) >= BIGGEST_ALIGNMENT + || TYPE_ALIGN (type) >= GET_MODE_ALIGNMENT (mode))) + { + /* If this is the only reason this type is BLKmode, then + don't force containing types to be BLKmode. */ + TYPE_NO_FORCE_BLK (type) = 1; + SET_TYPE_MODE (type, BLKmode); + } + if (TYPE_NEXT_VARIANT (type) || type != TYPE_MAIN_VARIANT (type)) + for (tree variant = TYPE_MAIN_VARIANT (type); + variant != NULL_TREE; + variant = TYPE_NEXT_VARIANT (variant)) + { + SET_TYPE_MODE (variant, mode); + if (STRICT_ALIGNMENT + && !(TYPE_ALIGN (variant) >= BIGGEST_ALIGNMENT + || (TYPE_ALIGN (variant) + >= GET_MODE_ALIGNMENT (mode)))) + { + TYPE_NO_FORCE_BLK (variant) = 1; + SET_TYPE_MODE (variant, BLKmode); + } + } + return; + } + break; + } + case REAL_TYPE: { /* Allow the caller to choose the type mode, which is how decimal @@ -2417,6 +2491,18 @@ layout_type (tree type) case COMPLEX_TYPE: TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); + if (TYPE_MODE (TREE_TYPE (type)) == BLKmode) + { + gcc_checking_assert (TREE_CODE (TREE_TYPE (type)) == BITINT_TYPE); + SET_TYPE_MODE (type, BLKmode); + TYPE_SIZE (type) + = int_const_binop (MULT_EXPR, TYPE_SIZE (TREE_TYPE (type)), + bitsize_int (2)); + TYPE_SIZE_UNIT (type) + = int_const_binop (MULT_EXPR, TYPE_SIZE_UNIT (TREE_TYPE (type)), + bitsize_int (2)); + break; + } SET_TYPE_MODE (type, GET_MODE_COMPLEX_MODE (TYPE_MODE (TREE_TYPE (type)))); --- gcc/target.def.jj 2023-08-08 15:54:34.860607622 +0200 +++ gcc/target.def 2023-08-08 19:24:08.280639676 +0200 @@ -6241,6 +6241,25 @@ when @var{type} is @code{EXCESS_PRECISIO enum flt_eval_method, (enum excess_precision_type type), default_excess_precision) +/* Return true if _BitInt(N) is supported and fill details about it into + *INFO. */ +DEFHOOK +(bitint_type_info, + "This target hook returns true if @code{_BitInt(@var{N})} is supported and\n\ +provides details on it. @code{_BitInt(@var{N})} is to be represented as\n\ +series of @code{info->limb_mode}\n\ +@code{CEIL (@var{N}, GET_MODE_PRECISION (info->limb_mode))} limbs,\n\ +ordered from least significant to most significant if\n\ +@code{!info->big_endian}, otherwise from most significant to least\n\ +significant. If @code{info->extended} is false, the bits above or equal to\n\ +@var{N} are undefined when stored in a register or memory, otherwise they\n\ +are zero or sign extended depending on if it is\n\ +@code{unsigned _BitInt(@var{N})} or one of @code{_BitInt(@var{N})} or\n\ +@code{signed _BitInt(@var{N})}. Alignment of the type is\n\ +@code{GET_MODE_ALIGNMENT (info->limb_mode)}.", + bool, (int n, struct bitint_info *info), + default_bitint_type_info) + HOOK_VECTOR_END (c) /* Functions specific to the C++ frontend. */ --- gcc/target.h.jj 2023-08-08 15:54:34.903607020 +0200 +++ gcc/target.h 2023-08-08 16:12:02.325939854 +0200 @@ -68,6 +68,20 @@ union cumulative_args_t { void *p; }; #endif /* !CHECKING_P */ +/* Target properties of _BitInt(N) type. _BitInt(N) is to be represented + as series of limb_mode CEIL (N, GET_MODE_PRECISION (limb_mode)) limbs, + ordered from least significant to most significant if !big_endian, + otherwise from most significant to least significant. If extended is + false, the bits above or equal to N are undefined when stored in a register + or memory, otherwise they are zero or sign extended depending on if + it is unsigned _BitInt(N) or _BitInt(N) / signed _BitInt(N). */ + +struct bitint_info { + machine_mode limb_mode; + bool big_endian; + bool extended; +}; + /* Types of memory operation understood by the "by_pieces" infrastructure. Used by the TARGET_USE_BY_PIECES_INFRASTRUCTURE_P target hook and internally by the functions in expr.cc. */ --- gcc/targhooks.cc.jj 2023-08-08 15:54:34.954606306 +0200 +++ gcc/targhooks.cc 2023-08-08 16:12:02.325939854 +0200 @@ -2595,6 +2595,14 @@ default_excess_precision (enum excess_pr return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT; } +/* Return true if _BitInt(N) is supported and fill details about it into + *INFO. */ +bool +default_bitint_type_info (int, struct bitint_info *) +{ + return false; +} + /* Default implementation for TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE. */ HOST_WIDE_INT --- gcc/targhooks.h.jj 2023-08-08 15:54:34.981605928 +0200 +++ gcc/targhooks.h 2023-08-08 16:12:02.326939840 +0200 @@ -284,6 +284,7 @@ extern unsigned int default_min_arithmet extern enum flt_eval_method default_excess_precision (enum excess_precision_type ATTRIBUTE_UNUSED); +extern bool default_bitint_type_info (int, struct bitint_info *); extern HOST_WIDE_INT default_stack_clash_protection_alloca_probe_range (void); extern void default_select_early_remat_modes (sbitmap); extern tree default_preferred_else_value (unsigned, tree, unsigned, tree *); --- gcc/tree-pretty-print.cc.jj 2023-08-08 15:54:35.084604486 +0200 +++ gcc/tree-pretty-print.cc 2023-08-08 16:12:02.326939840 +0200 @@ -1924,6 +1924,7 @@ dump_generic_node (pretty_printer *pp, t case VECTOR_TYPE: case ENUMERAL_TYPE: case BOOLEAN_TYPE: + case BITINT_TYPE: case OPAQUE_TYPE: { unsigned int quals = TYPE_QUALS (node); @@ -2038,6 +2039,14 @@ dump_generic_node (pretty_printer *pp, t pp_decimal_int (pp, TYPE_PRECISION (node)); pp_greater (pp); } + else if (TREE_CODE (node) == BITINT_TYPE) + { + if (TYPE_UNSIGNED (node)) + pp_string (pp, "unsigned "); + pp_string (pp, "_BitInt("); + pp_decimal_int (pp, TYPE_PRECISION (node)); + pp_right_paren (pp); + } else if (TREE_CODE (node) == VOID_TYPE) pp_string (pp, "void"); else @@ -2234,8 +2243,18 @@ dump_generic_node (pretty_printer *pp, t pp_minus (pp); val = -val; } - print_hex (val, pp_buffer (pp)->digit_buffer); - pp_string (pp, pp_buffer (pp)->digit_buffer); + unsigned int prec = val.get_precision (); + if ((prec + 3) / 4 > sizeof (pp_buffer (pp)->digit_buffer) - 3) + { + char *buf = XALLOCAVEC (char, (prec + 3) / 4 + 3); + print_hex (val, buf); + pp_string (pp, buf); + } + else + { + print_hex (val, pp_buffer (pp)->digit_buffer); + pp_string (pp, pp_buffer (pp)->digit_buffer); + } } if ((flags & TDF_GIMPLE) && ! (POINTER_TYPE_P (TREE_TYPE (node)) --- gcc/tree-ssa-sccvn.cc.jj 2023-08-08 15:55:09.533122067 +0200 +++ gcc/tree-ssa-sccvn.cc 2023-08-08 16:12:02.328939812 +0200 @@ -74,6 +74,7 @@ along with GCC; see the file COPYING3. #include "ipa-modref-tree.h" #include "ipa-modref.h" #include "tree-ssa-sccvn.h" +#include "target.h" /* This algorithm is based on the SCC algorithm presented by Keith Cooper and L. Taylor Simpson in "SCC-Based Value numbering" @@ -6969,8 +6970,14 @@ eliminate_dom_walker::eliminate_stmt (ba || !DECL_BIT_FIELD_TYPE (TREE_OPERAND (lhs, 1))) && !type_has_mode_precision_p (TREE_TYPE (lhs))) { - if (TREE_CODE (lhs) == COMPONENT_REF - || TREE_CODE (lhs) == MEM_REF) + if (TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && (TYPE_PRECISION (TREE_TYPE (lhs)) + > (targetm.scalar_mode_supported_p (TImode) + ? GET_MODE_PRECISION (TImode) + : GET_MODE_PRECISION (DImode)))) + lookup_lhs = NULL_TREE; + else if (TREE_CODE (lhs) == COMPONENT_REF + || TREE_CODE (lhs) == MEM_REF) { tree ltype = build_nonstandard_integer_type (TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (lhs))), --- gcc/tree-switch-conversion.cc.jj 2023-08-08 15:54:35.311601307 +0200 +++ gcc/tree-switch-conversion.cc 2023-08-09 10:15:33.197094959 +0200 @@ -1143,32 +1143,89 @@ jump_table_cluster::emit (tree index_exp tree default_label_expr, basic_block default_bb, location_t loc) { - unsigned HOST_WIDE_INT range = get_range (get_low (), get_high ()); + tree low = get_low (); + unsigned HOST_WIDE_INT range = get_range (low, get_high ()); unsigned HOST_WIDE_INT nondefault_range = 0; + bool bitint = false; + gimple_stmt_iterator gsi = gsi_start_bb (m_case_bb); + + /* For large/huge _BitInt, subtract low from index_expr, cast to unsigned + DImode type (get_range doesn't support ranges larger than 64-bits) + and subtract low from all case values as well. */ + if (TREE_CODE (TREE_TYPE (index_expr)) == BITINT_TYPE + && TYPE_PRECISION (TREE_TYPE (index_expr)) > GET_MODE_PRECISION (DImode)) + { + bitint = true; + tree this_low = low, type; + gimple *g; + gimple_seq seq = NULL; + if (!TYPE_OVERFLOW_WRAPS (TREE_TYPE (index_expr))) + { + type = unsigned_type_for (TREE_TYPE (index_expr)); + index_expr = gimple_convert (&seq, type, index_expr); + this_low = fold_convert (type, this_low); + } + this_low = const_unop (NEGATE_EXPR, TREE_TYPE (this_low), this_low); + index_expr = gimple_build (&seq, PLUS_EXPR, TREE_TYPE (index_expr), + index_expr, this_low); + type = build_nonstandard_integer_type (GET_MODE_PRECISION (DImode), 1); + g = gimple_build_cond (GT_EXPR, index_expr, + fold_convert (TREE_TYPE (index_expr), + TYPE_MAX_VALUE (type)), + NULL_TREE, NULL_TREE); + gimple_seq_add_stmt (&seq, g); + gimple_seq_set_location (seq, loc); + gsi_insert_seq_after (&gsi, seq, GSI_NEW_STMT); + edge e1 = split_block (m_case_bb, g); + e1->flags = EDGE_FALSE_VALUE; + e1->probability = profile_probability::likely (); + edge e2 = make_edge (e1->src, default_bb, EDGE_TRUE_VALUE); + e2->probability = e1->probability.invert (); + gsi = gsi_start_bb (e1->dest); + seq = NULL; + index_expr = gimple_convert (&seq, type, index_expr); + gimple_seq_set_location (seq, loc); + gsi_insert_seq_after (&gsi, seq, GSI_NEW_STMT); + } /* For jump table we just emit a new gswitch statement that will be latter lowered to jump table. */ auto_vec labels; labels.create (m_cases.length ()); - make_edge (m_case_bb, default_bb, 0); + basic_block case_bb = gsi_bb (gsi); + make_edge (case_bb, default_bb, 0); for (unsigned i = 0; i < m_cases.length (); i++) { - labels.quick_push (unshare_expr (m_cases[i]->m_case_label_expr)); - make_edge (m_case_bb, m_cases[i]->m_case_bb, 0); + tree lab = unshare_expr (m_cases[i]->m_case_label_expr); + if (bitint) + { + CASE_LOW (lab) + = fold_convert (TREE_TYPE (index_expr), + const_binop (MINUS_EXPR, + TREE_TYPE (CASE_LOW (lab)), + CASE_LOW (lab), low)); + if (CASE_HIGH (lab)) + CASE_HIGH (lab) + = fold_convert (TREE_TYPE (index_expr), + const_binop (MINUS_EXPR, + TREE_TYPE (CASE_HIGH (lab)), + CASE_HIGH (lab), low)); + } + labels.quick_push (lab); + make_edge (case_bb, m_cases[i]->m_case_bb, 0); } gswitch *s = gimple_build_switch (index_expr, unshare_expr (default_label_expr), labels); gimple_set_location (s, loc); - gimple_stmt_iterator gsi = gsi_start_bb (m_case_bb); gsi_insert_after (&gsi, s, GSI_NEW_STMT); /* Set up even probabilities for all cases. */ for (unsigned i = 0; i < m_cases.length (); i++) { simple_cluster *sc = static_cast (m_cases[i]); - edge case_edge = find_edge (m_case_bb, sc->m_case_bb); + edge case_edge = find_edge (case_bb, sc->m_case_bb); unsigned HOST_WIDE_INT case_range = sc->get_range (sc->get_low (), sc->get_high ()); nondefault_range += case_range; @@ -1184,7 +1241,7 @@ jump_table_cluster::emit (tree index_exp for (unsigned i = 0; i < m_cases.length (); i++) { simple_cluster *sc = static_cast (m_cases[i]); - edge case_edge = find_edge (m_case_bb, sc->m_case_bb); + edge case_edge = find_edge (case_bb, sc->m_case_bb); case_edge->probability = profile_probability::always ().apply_scale ((intptr_t)case_edge->aux, range); --- gcc/typeclass.h.jj 2023-08-08 15:54:35.434599585 +0200 +++ gcc/typeclass.h 2023-08-08 16:12:02.328939812 +0200 @@ -37,7 +37,8 @@ enum type_class function_type_class, method_type_class, record_type_class, union_type_class, array_type_class, string_type_class, - lang_type_class, opaque_type_class + lang_type_class, opaque_type_class, + bitint_type_class }; #endif /* GCC_TYPECLASS_H */ --- gcc/varasm.cc.jj 2023-08-08 15:54:35.517598423 +0200 +++ gcc/varasm.cc 2023-08-08 16:12:02.330939784 +0200 @@ -5281,6 +5281,61 @@ output_constant (tree exp, unsigned HOST reverse, false); break; + case BITINT_TYPE: + if (TREE_CODE (exp) != INTEGER_CST) + error ("initializer for %<_BitInt(%d)%> value is not an integer " + "constant", TYPE_PRECISION (TREE_TYPE (exp))); + else + { + struct bitint_info info; + tree type = TREE_TYPE (exp); + gcc_assert (targetm.c.bitint_type_info (TYPE_PRECISION (type), + &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (TYPE_PRECISION (type) <= GET_MODE_PRECISION (limb_mode)) + { + cst = expand_expr (exp, NULL_RTX, VOIDmode, EXPAND_INITIALIZER); + if (reverse) + cst = flip_storage_order (TYPE_MODE (TREE_TYPE (exp)), cst); + if (!assemble_integer (cst, MIN (size, thissize), align, 0)) + error ("initializer for integer/fixed-point value is too " + "complicated"); + break; + } + int prec = GET_MODE_PRECISION (limb_mode); + int cnt = CEIL (TYPE_PRECISION (type), prec); + tree limb_type = build_nonstandard_integer_type (prec, 1); + int elt_size = GET_MODE_SIZE (limb_mode); + unsigned int nalign = MIN (align, GET_MODE_ALIGNMENT (limb_mode)); + thissize = 0; + if (prec == HOST_BITS_PER_WIDE_INT) + for (int i = 0; i < cnt; i++) + { + int idx = (info.big_endian ^ reverse) ? cnt - 1 - i : i; + tree c; + if (idx >= TREE_INT_CST_EXT_NUNITS (exp)) + c = build_int_cst (limb_type, + tree_int_cst_sgn (exp) < 0 ? -1 : 0); + else + c = build_int_cst (limb_type, + TREE_INT_CST_ELT (exp, idx)); + output_constant (c, elt_size, nalign, reverse, false); + thissize += elt_size; + } + else + for (int i = 0; i < cnt; i++) + { + int idx = (info.big_endian ^ reverse) ? cnt - 1 - i : i; + wide_int w = wi::rshift (wi::to_wide (exp), idx * prec, + TYPE_SIGN (TREE_TYPE (exp))); + tree c = wide_int_to_tree (limb_type, + wide_int::from (w, prec, UNSIGNED)); + output_constant (c, elt_size, nalign, reverse, false); + thissize += elt_size; + } + } + break; + case ARRAY_TYPE: case VECTOR_TYPE: switch (TREE_CODE (exp)) --- gcc/vr-values.cc.jj 2023-08-08 15:54:35.560597822 +0200 +++ gcc/vr-values.cc 2023-08-08 16:12:02.330939784 +0200 @@ -111,21 +111,21 @@ check_for_binary_op_overflow (range_quer { /* So far we found that there is an overflow on the boundaries. That doesn't prove that there is an overflow even for all values - in between the boundaries. For that compute widest_int range + in between the boundaries. For that compute widest2_int range of the result and see if it doesn't overlap the range of type. */ - widest_int wmin, wmax; - widest_int w[4]; + widest2_int wmin, wmax; + widest2_int w[4]; int i; signop sign0 = TYPE_SIGN (TREE_TYPE (op0)); signop sign1 = TYPE_SIGN (TREE_TYPE (op1)); - w[0] = widest_int::from (vr0.lower_bound (), sign0); - w[1] = widest_int::from (vr0.upper_bound (), sign0); - w[2] = widest_int::from (vr1.lower_bound (), sign1); - w[3] = widest_int::from (vr1.upper_bound (), sign1); + w[0] = widest2_int::from (vr0.lower_bound (), sign0); + w[1] = widest2_int::from (vr0.upper_bound (), sign0); + w[2] = widest2_int::from (vr1.lower_bound (), sign1); + w[3] = widest2_int::from (vr1.upper_bound (), sign1); for (i = 0; i < 4; i++) { - widest_int wt; + widest2_int wt; switch (subcode) { case PLUS_EXPR: @@ -153,10 +153,10 @@ check_for_binary_op_overflow (range_quer } /* The result of op0 CODE op1 is known to be in range [wmin, wmax]. */ - widest_int wtmin - = widest_int::from (irange_val_min (type), TYPE_SIGN (type)); - widest_int wtmax - = widest_int::from (irange_val_max (type), TYPE_SIGN (type)); + widest2_int wtmin + = widest2_int::from (irange_val_min (type), TYPE_SIGN (type)); + widest2_int wtmax + = widest2_int::from (irange_val_max (type), TYPE_SIGN (type)); /* If all values in [wmin, wmax] are smaller than [wtmin, wtmax] or all are larger than [wtmin, wtmax], the arithmetic operation will always overflow. */ @@ -1717,12 +1717,11 @@ simplify_using_ranges::simplify_internal g = gimple_build_assign (gimple_call_lhs (stmt), subcode, op0, op1); else { - int prec = TYPE_PRECISION (type); tree utype = type; if (ovf || !useless_type_conversion_p (type, TREE_TYPE (op0)) || !useless_type_conversion_p (type, TREE_TYPE (op1))) - utype = build_nonstandard_integer_type (prec, 1); + utype = unsigned_type_for (type); if (TREE_CODE (op0) == INTEGER_CST) op0 = fold_convert (utype, op0); else if (!useless_type_conversion_p (utype, TREE_TYPE (op0))) From patchwork Wed Aug 9 18:18:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133409 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2990871vqr; Wed, 9 Aug 2023 11:21:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHeDw5y4MFmP//GAWxJeejrvug8/07q3rcxg4rHl7YWQ9EeuOsqVR+zrTVYbyYmnRxYrJIr X-Received: by 2002:a5d:66d0:0:b0:317:df57:e8fe with SMTP id k16-20020a5d66d0000000b00317df57e8femr174384wrw.25.1691605306575; Wed, 09 Aug 2023 11:21:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605306; cv=none; d=google.com; s=arc-20160816; b=aSI8rtofOOcUm6JEZQU/YCjkYjxSPWfY5dIBoMK4nmMJSnDNm+T19ZGWOPZiZMPEdn 0xymeS5s+GPTUEO35XkA1W8tNIWzuHg4FoNrtPekfj+vS8GEW5dvUdE5QhJPgTOfcDb7 EGUuuuyoKVZ+tfIk5enoDTJZxySuhNo4ebW15bE1NeLtFMzvlMPkLfQUwkvL3rDxFTRG pvgLD6iX+n9q0H8LRyJRHz64K7kt5resWu/zp71MLRjDh2ipiTXl8GSBbZOZL3CQU6IJ aXDA5hJNJozgOKcVRraNdVZ+bJPkkenYXIxNP3uwII97+bqIFNwGDyJwOhvdAKA0oOFq jbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=//QjriiQVtlcKtqmRjFf5rmgx+Rgm3UItcu7bA3/p0c=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=A//hyIaOq+/Z/HaRgD8Nm7FLXC5KpVx2snUWgC+g9BW+v4gaNxW0jSz+FFE5TBKTEH 5VmcQSBMOZWkkOtI0MefYLLUg1uvG+Fq6/lkte2r/uAYOTseaSOvY+/TJN8/TXWIHfil f1hiRjegMtTybdKPupehaw0wVmTtxBsQ1PUIQZuLoLLUuNh18YlZkxziN/ADM6MTjcNW xKVXORsUcQ9GTiIvosBb7nJi3Yak6gd23AYuQlBXSe7BkLYLZeTaXkF2mU1GJh7zo5I9 QBYGtf9VArcPl0CrRos8kL7wduNgCp9zAVbRmGoc0DT9lVHol4NcsADD8zW7o7eKGx75 tN7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=McI75HSi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id ec22-20020a170906b6d600b0098b0feb8935si9676850ejb.1035.2023.08.09.11.21.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:21:46 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=McI75HSi; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9DC44385842C for ; Wed, 9 Aug 2023 18:21:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9DC44385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605304; bh=//QjriiQVtlcKtqmRjFf5rmgx+Rgm3UItcu7bA3/p0c=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=McI75HSi/9oiNJCDkqVhVLoH/sMP15WJBf0MBys5PaO922bnkyQY98eKN0f1h24/b 1GPVvaUJn6aN9RQ7gXgD8de2tC+VNTxTMGcl4nAz0VJtMVaYEDqFijdWU25+caJQlE jA1PTTycMCegiPbqZzfcMAYB+sxldJSDEHk+2K/M= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 474BB3858035 for ; Wed, 9 Aug 2023 18:18:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 474BB3858035 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-692-nWXrC_NmMgqdM642hphzCw-1; Wed, 09 Aug 2023 14:18:55 -0400 X-MC-Unique: nWXrC_NmMgqdM642hphzCw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA9AE2812956; Wed, 9 Aug 2023 18:18:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D67D140E96E; Wed, 9 Aug 2023 18:18:54 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IIpbl2042917 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:18:52 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IIpd92042916; Wed, 9 Aug 2023 20:18:51 +0200 Date: Wed, 9 Aug 2023 20:18:50 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 5/12] _BitInt lowering support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776726078516711 X-GMAIL-MSGID: 1773776726078516711 Hi! The following patch adds a new bitintlower lowering pass which lowers most operations on medium _BitInt into operations on corresponding integer types, large _BitInt into straight line code operating on 2 or more limbs and finally huge _BitInt into a loop plus optional straight line code. As the only supported architecture is little-endian, the lowering only supports little-endian for now, because it would be impossible to test it all for big-endian. Rest is written with any endian support in mind, but of course only little-endian has been actually tested. I hope it is ok to add big-endian support to the lowering pass incrementally later when first big-endian target shows with the backend support. There are 2 possibilities of adding such support, one would be minimal one, just tweak limb_access function and perhaps one or two other spots and transform there the indexes from little endian (index 0 is least significant) to big endian for just the memory access. Advantage is I think maintainance costs, disadvantage is that the loops will still iterate from 0 to some number of limbs and we'd rely on IVOPTs or something similar changing it later if needed. Or we could make those indexes endian related everywhere, though I'm afraid that would be several hundreds of changes. For switches indexed by large/huge _BitInt the patch invokes what the switch lowering pass does (but only on those specific switches, not all of them); the switch lowering breaks the switches into clusters and none of the clusters can have a range which doesn't fit into 64-bit UWHI, everything else will be turned into a tree of comparisons. For clusters normally emitted as smaller switches, because we already have a guarantee that the low .. high range is at most 64 bits, the patch forces subtraction of the low and turns it into a 64-bit switch. This is done before the actual pass starts. Similarly, we cancel lowering of certain constructs like ABS_EXPR, ABSU_EXPR, MIN_EXPR, MAX_EXPR and COND_EXPR and turn those back to simpler comparisons etc., so that fewer operations need to be lowered later. 2023-08-09 Jakub Jelinek PR c/102989 * Makefile.in (OBJS): Add gimple-lower-bitint.o. * passes.def: Add pass_lower_bitint after pass_lower_complex and pass_lower_bitint_O0 after pass_lower_complex_O0. * tree-pass.h (PROP_gimple_lbitint): Define. (make_pass_lower_bitint_O0, make_pass_lower_bitint): Declare. * gimple-lower-bitint.h: New file. * tree-ssa-live.h (struct _var_map): Add bitint member. (init_var_map): Adjust declaration. (region_contains_p): Handle map->bitint like map->outofssa_p. * tree-ssa-live.cc (init_var_map): Add BITINT argument, initialize map->bitint and set map->outofssa_p to false if it is non-NULL. * tree-ssa-coalesce.cc: Include gimple-lower-bitint.h. (build_ssa_conflict_graph): Call build_bitint_stmt_ssa_conflicts if map->bitint. (create_coalesce_list_for_region): For map->bitint ignore SSA_NAMEs not in that bitmap, and allow res without default def. (compute_optimized_partition_bases): In map->bitint mode try hard to coalesce any SSA_NAMEs with the same size. (coalesce_bitint): New function. (coalesce_ssa_name): In map->bitint mode, or map->bitmap into used_in_copies and call coalesce_bitint. * gimple-lower-bitint.cc: New file. Jakub --- gcc/Makefile.in.jj 2023-08-08 15:55:04.146197505 +0200 +++ gcc/Makefile.in 2023-08-08 16:12:02.322939896 +0200 @@ -1453,6 +1453,7 @@ OBJS = \ gimple-loop-jam.o \ gimple-loop-versioning.o \ gimple-low.o \ + gimple-lower-bitint.o \ gimple-predicate-analysis.o \ gimple-pretty-print.o \ gimple-range.o \ --- gcc/passes.def.jj 2023-08-08 15:55:07.239154191 +0200 +++ gcc/passes.def 2023-08-08 16:12:02.324939868 +0200 @@ -237,6 +237,7 @@ along with GCC; see the file COPYING3. NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_ch); NEXT_PASS (pass_lower_complex); + NEXT_PASS (pass_lower_bitint); NEXT_PASS (pass_sra); /* The dom pass will also resolve all __builtin_constant_p calls that are still there to 0. This has to be done after some @@ -386,6 +387,7 @@ along with GCC; see the file COPYING3. NEXT_PASS (pass_strip_predict_hints, false /* early_p */); /* Lower remaining pieces of GIMPLE. */ NEXT_PASS (pass_lower_complex); + NEXT_PASS (pass_lower_bitint); NEXT_PASS (pass_lower_vector_ssa); NEXT_PASS (pass_lower_switch); /* Perform simple scalar cleanup which is constant/copy propagation. */ @@ -429,6 +431,7 @@ along with GCC; see the file COPYING3. NEXT_PASS (pass_lower_vaarg); NEXT_PASS (pass_lower_vector); NEXT_PASS (pass_lower_complex_O0); + NEXT_PASS (pass_lower_bitint_O0); NEXT_PASS (pass_sancov_O0); NEXT_PASS (pass_lower_switch_O0); NEXT_PASS (pass_asan_O0); --- gcc/tree-pass.h.jj 2023-08-08 15:55:09.437123411 +0200 +++ gcc/tree-pass.h 2023-08-08 16:12:02.326939840 +0200 @@ -229,6 +229,7 @@ protected: have completed. */ #define PROP_assumptions_done (1 << 19) /* Assume function kept around. */ +#define PROP_gimple_lbitint (1 << 20) /* lowered large _BitInt */ #define PROP_gimple \ (PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp) @@ -420,6 +421,8 @@ extern gimple_opt_pass *make_pass_strip_ extern gimple_opt_pass *make_pass_rebuild_frequencies (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_complex_O0 (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_complex (gcc::context *ctxt); +extern gimple_opt_pass *make_pass_lower_bitint_O0 (gcc::context *ctxt); +extern gimple_opt_pass *make_pass_lower_bitint (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_switch (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_switch_O0 (gcc::context *ctxt); extern gimple_opt_pass *make_pass_lower_vector (gcc::context *ctxt); --- gcc/gimple-lower-bitint.h.jj 2023-08-08 16:12:02.321939910 +0200 +++ gcc/gimple-lower-bitint.h 2023-08-08 16:12:02.321939910 +0200 @@ -0,0 +1,31 @@ +/* Header file for gimple-lower-bitint.cc exports. + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#ifndef GCC_GIMPLE_LOWER_BITINT_H +#define GCC_GIMPLE_LOWER_BITINT_H + +class live_track; +struct ssa_conflicts; +extern void build_bitint_stmt_ssa_conflicts (gimple *, live_track *, + ssa_conflicts *, bitmap, + void (*) (live_track *, tree, + ssa_conflicts *), + void (*) (live_track *, tree)); + +#endif /* GCC_GIMPLE_LOWER_BITINT_H */ --- gcc/tree-ssa-live.h.jj 2023-08-08 15:55:09.464123033 +0200 +++ gcc/tree-ssa-live.h 2023-08-08 16:12:02.327939826 +0200 @@ -70,6 +70,10 @@ typedef struct _var_map /* Vector of basic block in the region. */ vec vec_bbs; + /* If non-NULL, only coalesce SSA_NAMEs from this bitmap, and try harder + for those (for bitint lowering pass). */ + bitmap bitint; + /* True if this map is for out-of-ssa, otherwise for live range computation. When for out-of-ssa, it also means the var map is computed for whole current function. */ @@ -80,7 +84,7 @@ typedef struct _var_map /* Value used to represent no partition number. */ #define NO_PARTITION -1 -extern var_map init_var_map (int, class loop* = NULL); +extern var_map init_var_map (int, class loop * = NULL, bitmap = NULL); extern void delete_var_map (var_map); extern int var_union (var_map, tree, tree); extern void partition_view_normal (var_map); @@ -100,7 +104,7 @@ inline bool region_contains_p (var_map map, basic_block bb) { /* It's possible that the function is called with ENTRY_BLOCK/EXIT_BLOCK. */ - if (map->outofssa_p) + if (map->outofssa_p || map->bitint) return (bb->index != ENTRY_BLOCK && bb->index != EXIT_BLOCK); return bitmap_bit_p (map->bmp_bbs, bb->index); --- gcc/tree-ssa-live.cc.jj 2023-08-08 15:55:09.464123033 +0200 +++ gcc/tree-ssa-live.cc 2023-08-08 16:12:02.327939826 +0200 @@ -77,10 +77,11 @@ var_map_base_fini (var_map map) } /* Create a variable partition map of SIZE for region, initialize and return it. Region is a loop if LOOP is non-NULL, otherwise is the current - function. */ + function. If BITINT is non-NULL, only SSA_NAMEs from that bitmap + will be coalesced. */ var_map -init_var_map (int size, class loop *loop) +init_var_map (int size, class loop *loop, bitmap bitint) { var_map map; @@ -109,7 +110,8 @@ init_var_map (int size, class loop *loop else { map->bmp_bbs = NULL; - map->outofssa_p = true; + map->outofssa_p = bitint == NULL; + map->bitint = bitint; basic_block bb; FOR_EACH_BB_FN (bb, cfun) map->vec_bbs.safe_push (bb); --- gcc/tree-ssa-coalesce.cc.jj 2023-08-08 15:54:35.127603884 +0200 +++ gcc/tree-ssa-coalesce.cc 2023-08-08 16:12:02.327939826 +0200 @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. #include "explow.h" #include "tree-dfa.h" #include "stor-layout.h" +#include "gimple-lower-bitint.h" /* This set of routines implements a coalesce_list. This is an object which is used to track pairs of ssa_names which are desirable to coalesce @@ -914,6 +915,14 @@ build_ssa_conflict_graph (tree_live_info else if (is_gimple_debug (stmt)) continue; + if (map->bitint) + { + build_bitint_stmt_ssa_conflicts (stmt, live, graph, map->bitint, + live_track_process_def, + live_track_process_use); + continue; + } + /* For stmts with more than one SSA_NAME definition pretend all the SSA_NAME outputs but the first one are live at this point, so that conflicts are added in between all those even when they are @@ -1058,6 +1067,8 @@ create_coalesce_list_for_region (var_map if (virtual_operand_p (res)) continue; ver = SSA_NAME_VERSION (res); + if (map->bitint && !bitmap_bit_p (map->bitint, ver)) + continue; /* Register ssa_names and coalesces between the args and the result of all PHI. */ @@ -1106,6 +1117,8 @@ create_coalesce_list_for_region (var_map { v1 = SSA_NAME_VERSION (lhs); v2 = SSA_NAME_VERSION (rhs1); + if (map->bitint && !bitmap_bit_p (map->bitint, v1)) + break; cost = coalesce_cost_bb (bb); add_coalesce (cl, v1, v2, cost); bitmap_set_bit (used_in_copy, v1); @@ -1124,12 +1137,16 @@ create_coalesce_list_for_region (var_map if (!rhs1) break; tree lhs = ssa_default_def (cfun, res); + if (map->bitint && !lhs) + break; gcc_assert (lhs); if (TREE_CODE (rhs1) == SSA_NAME && gimple_can_coalesce_p (lhs, rhs1)) { v1 = SSA_NAME_VERSION (lhs); v2 = SSA_NAME_VERSION (rhs1); + if (map->bitint && !bitmap_bit_p (map->bitint, v1)) + break; cost = coalesce_cost_bb (bb); add_coalesce (cl, v1, v2, cost); bitmap_set_bit (used_in_copy, v1); @@ -1177,6 +1194,8 @@ create_coalesce_list_for_region (var_map v1 = SSA_NAME_VERSION (outputs[match]); v2 = SSA_NAME_VERSION (input); + if (map->bitint && !bitmap_bit_p (map->bitint, v1)) + continue; if (gimple_can_coalesce_p (outputs[match], input)) { @@ -1651,6 +1670,33 @@ compute_optimized_partition_bases (var_m } } + if (map->bitint + && flag_tree_coalesce_vars + && (optimize > 1 || parts < 500)) + for (i = 0; i < (unsigned) parts; ++i) + { + tree s1 = partition_to_var (map, i); + int p1 = partition_find (tentative, i); + for (unsigned j = i + 1; j < (unsigned) parts; ++j) + { + tree s2 = partition_to_var (map, j); + if (s1 == s2) + continue; + if (tree_int_cst_equal (TYPE_SIZE (TREE_TYPE (s1)), + TYPE_SIZE (TREE_TYPE (s2)))) + { + int p2 = partition_find (tentative, j); + + if (p1 == p2) + continue; + + partition_union (tentative, p1, p2); + if (partition_find (tentative, i) != p1) + break; + } + } + } + map->partition_to_base_index = XCNEWVEC (int, parts); auto_vec index_map (parts); if (parts) @@ -1692,6 +1738,101 @@ compute_optimized_partition_bases (var_m partition_delete (tentative); } +/* For the bitint lowering pass, try harder. Partitions which contain + SSA_NAME default def of a PARM_DECL or have RESULT_DECL need to have + compatible types because they will use that RESULT_DECL or PARM_DECL. + Other partitions can have even incompatible _BitInt types, as long + as they have the same size - those will use VAR_DECLs which are just + arrays of the limbs. */ + +static void +coalesce_bitint (var_map map, ssa_conflicts *graph) +{ + unsigned n = num_var_partitions (map); + if (optimize <= 1 && n > 500) + return; + + bool try_same_size = false; + FILE *debug_file = (dump_flags & TDF_DETAILS) ? dump_file : NULL; + for (unsigned i = 0; i < n; ++i) + { + tree s1 = partition_to_var (map, i); + if ((unsigned) var_to_partition (map, s1) != i) + continue; + int v1 = SSA_NAME_VERSION (s1); + for (unsigned j = i + 1; j < n; ++j) + { + tree s2 = partition_to_var (map, j); + if (s1 == s2 || (unsigned) var_to_partition (map, s2) != j) + continue; + if (!types_compatible_p (TREE_TYPE (s1), TREE_TYPE (s2))) + { + if (!try_same_size + && tree_int_cst_equal (TYPE_SIZE (TREE_TYPE (s1)), + TYPE_SIZE (TREE_TYPE (s2)))) + try_same_size = true; + continue; + } + int v2 = SSA_NAME_VERSION (s2); + if (attempt_coalesce (map, graph, v1, v2, debug_file) + && partition_to_var (map, i) != s1) + break; + } + } + + if (!try_same_size) + return; + + unsigned i; + bitmap_iterator bi; + bitmap same_type = NULL; + + EXECUTE_IF_SET_IN_BITMAP (map->bitint, 0, i, bi) + { + tree s = ssa_name (i); + if (!SSA_NAME_VAR (s)) + continue; + if (TREE_CODE (SSA_NAME_VAR (s)) != RESULT_DECL + && (TREE_CODE (SSA_NAME_VAR (s)) != PARM_DECL + || !SSA_NAME_IS_DEFAULT_DEF (s))) + continue; + if (same_type == NULL) + same_type = BITMAP_ALLOC (NULL); + int p = var_to_partition (map, s); + bitmap_set_bit (same_type, p); + } + + for (i = 0; i < n; ++i) + { + if (same_type && bitmap_bit_p (same_type, i)) + continue; + tree s1 = partition_to_var (map, i); + if ((unsigned) var_to_partition (map, s1) != i) + continue; + int v1 = SSA_NAME_VERSION (s1); + for (unsigned j = i + 1; j < n; ++j) + { + if (same_type && bitmap_bit_p (same_type, j)) + continue; + + tree s2 = partition_to_var (map, j); + if (s1 == s2 || (unsigned) var_to_partition (map, s2) != j) + continue; + + if (!tree_int_cst_equal (TYPE_SIZE (TREE_TYPE (s1)), + TYPE_SIZE (TREE_TYPE (s2)))) + continue; + + int v2 = SSA_NAME_VERSION (s2); + if (attempt_coalesce (map, graph, v1, v2, debug_file) + && partition_to_var (map, i) != s1) + break; + } + } + + BITMAP_FREE (same_type); +} + /* Given an initial var_map MAP, coalesce variables and return a partition map with the resulting coalesce. Note that this function is called in either live range computation context or out-of-ssa context, indicated by MAP. */ @@ -1709,6 +1850,8 @@ coalesce_ssa_name (var_map map) if (map->outofssa_p) populate_coalesce_list_for_outofssa (cl, used_in_copies); bitmap_list_view (used_in_copies); + if (map->bitint) + bitmap_ior_into (used_in_copies, map->bitint); if (dump_file && (dump_flags & TDF_DETAILS)) dump_var_map (dump_file, map); @@ -1756,6 +1899,9 @@ coalesce_ssa_name (var_map map) ((dump_flags & TDF_DETAILS) ? dump_file : NULL)); delete_coalesce_list (cl); + + if (map->bitint && flag_tree_coalesce_vars) + coalesce_bitint (map, graph); + ssa_conflicts_delete (graph); } - --- gcc/gimple-lower-bitint.cc.jj 2023-08-08 16:12:02.321939910 +0200 +++ gcc/gimple-lower-bitint.cc 2023-08-09 14:00:00.881222758 +0200 @@ -0,0 +1,6074 @@ +/* Lower _BitInt(N) operations to scalar operations. + Copyright (C) 2023 Free Software Foundation, Inc. + Contributed by Jakub Jelinek . + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +GCC is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "backend.h" +#include "rtl.h" +#include "tree.h" +#include "gimple.h" +#include "cfghooks.h" +#include "tree-pass.h" +#include "ssa.h" +#include "fold-const.h" +#include "gimplify.h" +#include "gimple-iterator.h" +#include "tree-cfg.h" +#include "tree-dfa.h" +#include "cfgloop.h" +#include "cfganal.h" +#include "target.h" +#include "tree-ssa-live.h" +#include "tree-ssa-coalesce.h" +#include "domwalk.h" +#include "memmodel.h" +#include "optabs.h" +#include "varasm.h" +#include "gimple-range.h" +#include "value-range.h" +#include "langhooks.h" +#include "gimplify-me.h" +#include "diagnostic-core.h" +#include "tree-eh.h" +#include "tree-pretty-print.h" +#include "alloc-pool.h" +#include "tree-into-ssa.h" +#include "tree-cfgcleanup.h" +#include "tree-switch-conversion.h" +#include "ubsan.h" +#include "gimple-lower-bitint.h" + +/* Split BITINT_TYPE precisions in 4 categories. Small _BitInt, where + target hook says it is a single limb, middle _BitInt which per ABI + does not, but there is some INTEGER_TYPE in which arithmetics can be + performed (operations on such _BitInt are lowered to casts to that + arithmetic type and cast back; e.g. on x86_64 limb is DImode, but + target supports TImode, so _BitInt(65) to _BitInt(128) are middle + ones), large _BitInt which should by straight line code and + finally huge _BitInt which should be handled by loops over the limbs. */ + +enum bitint_prec_kind { + bitint_prec_small, + bitint_prec_middle, + bitint_prec_large, + bitint_prec_huge +}; + +/* Caches to speed up bitint_precision_kind. */ + +static int small_max_prec, mid_min_prec, large_min_prec, huge_min_prec; +static int limb_prec; + +/* Categorize _BitInt(PREC) as small, middle, large or huge. */ + +static bitint_prec_kind +bitint_precision_kind (int prec) +{ + if (prec <= small_max_prec) + return bitint_prec_small; + if (huge_min_prec && prec >= huge_min_prec) + return bitint_prec_huge; + if (large_min_prec && prec >= large_min_prec) + return bitint_prec_large; + if (mid_min_prec && prec >= mid_min_prec) + return bitint_prec_middle; + + struct bitint_info info; + gcc_assert (targetm.c.bitint_type_info (prec, &info)); + scalar_int_mode limb_mode = as_a (info.limb_mode); + if (prec <= GET_MODE_PRECISION (limb_mode)) + { + small_max_prec = prec; + return bitint_prec_small; + } + scalar_int_mode arith_mode = (targetm.scalar_mode_supported_p (TImode) + ? TImode : DImode); + if (!large_min_prec + && GET_MODE_PRECISION (arith_mode) > GET_MODE_PRECISION (limb_mode)) + large_min_prec = GET_MODE_PRECISION (arith_mode) + 1; + if (!limb_prec) + limb_prec = GET_MODE_PRECISION (limb_mode); + if (!huge_min_prec) + { + if (4 * limb_prec >= GET_MODE_PRECISION (arith_mode)) + huge_min_prec = 4 * limb_prec; + else + huge_min_prec = GET_MODE_PRECISION (arith_mode) + 1; + } + if (prec <= GET_MODE_PRECISION (arith_mode)) + { + if (!mid_min_prec || prec < mid_min_prec) + mid_min_prec = prec; + return bitint_prec_middle; + } + if (large_min_prec && prec <= large_min_prec) + return bitint_prec_large; + return bitint_prec_huge; +} + +/* Same for a TYPE. */ + +static bitint_prec_kind +bitint_precision_kind (tree type) +{ + return bitint_precision_kind (TYPE_PRECISION (type)); +} + +/* Return minimum precision needed to describe INTEGER_CST + CST. All bits above that precision up to precision of + TREE_TYPE (CST) are cleared if EXT is set to 0, or set + if EXT is set to -1. */ + +static unsigned +bitint_min_cst_precision (tree cst, int &ext) +{ + ext = tree_int_cst_sgn (cst) < 0 ? -1 : 0; + wide_int w = wi::to_wide (cst); + unsigned min_prec = wi::min_precision (w, TYPE_SIGN (TREE_TYPE (cst))); + /* For signed values, we don't need to count the sign bit, + we'll use constant 0 or -1 for the upper bits. */ + if (!TYPE_UNSIGNED (TREE_TYPE (cst))) + --min_prec; + else + { + /* For unsigned values, also try signed min_precision + in case the constant has lots of most significant bits set. */ + unsigned min_prec2 = wi::min_precision (w, SIGNED) - 1; + if (min_prec2 < min_prec) + { + ext = -1; + return min_prec2; + } + } + return min_prec; +} + +namespace { + +/* If OP is middle _BitInt, cast it to corresponding INTEGER_TYPE + cached in TYPE and return it. */ + +tree +maybe_cast_middle_bitint (gimple_stmt_iterator *gsi, tree op, tree &type) +{ + if (op == NULL_TREE + || TREE_CODE (TREE_TYPE (op)) != BITINT_TYPE + || bitint_precision_kind (TREE_TYPE (op)) != bitint_prec_middle) + return op; + + int prec = TYPE_PRECISION (TREE_TYPE (op)); + int uns = TYPE_UNSIGNED (TREE_TYPE (op)); + if (type == NULL_TREE + || TYPE_PRECISION (type) != prec + || TYPE_UNSIGNED (type) != uns) + type = build_nonstandard_integer_type (prec, uns); + + if (TREE_CODE (op) != SSA_NAME) + { + tree nop = fold_convert (type, op); + if (is_gimple_val (nop)) + return nop; + } + + tree nop = make_ssa_name (type); + gimple *g = gimple_build_assign (nop, NOP_EXPR, op); + gsi_insert_before (gsi, g, GSI_SAME_STMT); + return nop; +} + +/* Return true if STMT can be handled in a loop from least to most + significant limb together with its dependencies. */ + +bool +mergeable_op (gimple *stmt) +{ + if (!is_gimple_assign (stmt)) + return false; + switch (gimple_assign_rhs_code (stmt)) + { + case PLUS_EXPR: + case MINUS_EXPR: + case NEGATE_EXPR: + case BIT_AND_EXPR: + case BIT_IOR_EXPR: + case BIT_XOR_EXPR: + case BIT_NOT_EXPR: + case SSA_NAME: + case INTEGER_CST: + return true; + case LSHIFT_EXPR: + { + tree cnt = gimple_assign_rhs2 (stmt); + if (tree_fits_uhwi_p (cnt) + && tree_to_uhwi (cnt) < (unsigned HOST_WIDE_INT) limb_prec) + return true; + } + break; + CASE_CONVERT: + case VIEW_CONVERT_EXPR: + { + tree lhs_type = TREE_TYPE (gimple_assign_lhs (stmt)); + tree rhs_type = TREE_TYPE (gimple_assign_rhs1 (stmt)); + if (TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME + && TREE_CODE (lhs_type) == BITINT_TYPE + && TREE_CODE (rhs_type) == BITINT_TYPE + && bitint_precision_kind (lhs_type) >= bitint_prec_large + && bitint_precision_kind (rhs_type) >= bitint_prec_large + && tree_int_cst_equal (TYPE_SIZE (lhs_type), TYPE_SIZE (rhs_type))) + { + if (TYPE_PRECISION (rhs_type) >= TYPE_PRECISION (lhs_type)) + return true; + if ((unsigned) TYPE_PRECISION (lhs_type) % (2 * limb_prec) != 0) + return true; + if (bitint_precision_kind (lhs_type) == bitint_prec_large) + return true; + } + break; + } + default: + break; + } + return false; +} + +/* Return non-zero if stmt is .{ADD,SUB,MUL}_OVERFLOW call with + _Complex large/huge _BitInt lhs which has at most two immediate uses, + at most one use in REALPART_EXPR stmt in the same bb and exactly one + IMAGPART_EXPR use in the same bb with a single use which casts it to + non-BITINT_TYPE integral type. If there is a REALPART_EXPR use, + return 2. Such cases (most common uses of those builtins) can be + optimized by marking their lhs and lhs of IMAGPART_EXPR and maybe lhs + of REALPART_EXPR as not needed to be backed up by a stack variable. + For .UBSAN_CHECK_{ADD,SUB,MUL} return 3. */ + +int +optimizable_arith_overflow (gimple *stmt) +{ + bool is_ubsan = false; + if (!is_gimple_call (stmt) || !gimple_call_internal_p (stmt)) + return false; + switch (gimple_call_internal_fn (stmt)) + { + case IFN_ADD_OVERFLOW: + case IFN_SUB_OVERFLOW: + case IFN_MUL_OVERFLOW: + break; + case IFN_UBSAN_CHECK_ADD: + case IFN_UBSAN_CHECK_SUB: + case IFN_UBSAN_CHECK_MUL: + is_ubsan = true; + break; + default: + return 0; + } + tree lhs = gimple_call_lhs (stmt); + if (!lhs) + return 0; + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + return 0; + tree type = is_ubsan ? TREE_TYPE (lhs) : TREE_TYPE (TREE_TYPE (lhs)); + if (TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) < bitint_prec_large) + return 0; + + if (is_ubsan) + { + use_operand_p use_p; + gimple *use_stmt; + if (!single_imm_use (lhs, &use_p, &use_stmt) + || gimple_bb (use_stmt) != gimple_bb (stmt) + || !gimple_store_p (use_stmt) + || !is_gimple_assign (use_stmt) + || gimple_has_volatile_ops (use_stmt) + || stmt_ends_bb_p (use_stmt)) + return 0; + return 3; + } + + imm_use_iterator ui; + use_operand_p use_p; + int seen = 0; + FOR_EACH_IMM_USE_FAST (use_p, ui, lhs) + { + gimple *g = USE_STMT (use_p); + if (is_gimple_debug (g)) + continue; + if (!is_gimple_assign (g) || gimple_bb (g) != gimple_bb (stmt)) + return 0; + if (gimple_assign_rhs_code (g) == REALPART_EXPR) + { + if ((seen & 1) != 0) + return 0; + seen |= 1; + } + else if (gimple_assign_rhs_code (g) == IMAGPART_EXPR) + { + if ((seen & 2) != 0) + return 0; + seen |= 2; + + use_operand_p use2_p; + gimple *use_stmt; + tree lhs2 = gimple_assign_lhs (g); + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs2)) + return 0; + if (!single_imm_use (lhs2, &use2_p, &use_stmt) + || gimple_bb (use_stmt) != gimple_bb (stmt) + || !gimple_assign_cast_p (use_stmt)) + return 0; + + lhs2 = gimple_assign_lhs (use_stmt); + if (!INTEGRAL_TYPE_P (TREE_TYPE (lhs2)) + || TREE_CODE (TREE_TYPE (lhs2)) == BITINT_TYPE) + return 0; + } + else + return 0; + } + if ((seen & 2) == 0) + return 0; + return seen == 3 ? 2 : 1; +} + +/* If STMT is some kind of comparison (GIMPLE_COND, comparison assignment) + comparing large/huge _BitInt types, return the comparison code and if + non-NULL fill in the comparison operands to *POP1 and *POP2. */ + +tree_code +comparison_op (gimple *stmt, tree *pop1, tree *pop2) +{ + tree op1 = NULL_TREE, op2 = NULL_TREE; + tree_code code = ERROR_MARK; + if (gimple_code (stmt) == GIMPLE_COND) + { + code = gimple_cond_code (stmt); + op1 = gimple_cond_lhs (stmt); + op2 = gimple_cond_rhs (stmt); + } + else if (is_gimple_assign (stmt)) + { + code = gimple_assign_rhs_code (stmt); + op1 = gimple_assign_rhs1 (stmt); + if (TREE_CODE_CLASS (code) == tcc_comparison + || TREE_CODE_CLASS (code) == tcc_binary) + op2 = gimple_assign_rhs2 (stmt); + } + if (TREE_CODE_CLASS (code) != tcc_comparison) + return ERROR_MARK; + tree type = TREE_TYPE (op1); + if (TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) < bitint_prec_large) + return ERROR_MARK; + if (pop1) + { + *pop1 = op1; + *pop2 = op2; + } + return code; +} + +/* Class used during large/huge _BitInt lowering containing all the + state for the methods. */ + +struct bitint_large_huge +{ + bitint_large_huge () + : m_names (NULL), m_loads (NULL), m_preserved (NULL), + m_single_use_names (NULL), m_map (NULL), m_vars (NULL), + m_limb_type (NULL_TREE), m_data (vNULL) {} + + ~bitint_large_huge (); + + void insert_before (gimple *); + tree limb_access_type (tree, tree); + tree limb_access (tree, tree, tree, bool); + void if_then (gimple *, profile_probability, edge &, edge &); + void if_then_else (gimple *, profile_probability, edge &, edge &); + void if_then_if_then_else (gimple *g, gimple *, + profile_probability, profile_probability, + edge &, edge &, edge &); + tree handle_operand (tree, tree); + tree prepare_data_in_out (tree, tree, tree *); + tree add_cast (tree, tree); + tree handle_plus_minus (tree_code, tree, tree, tree); + tree handle_lshift (tree, tree, tree); + tree handle_cast (tree, tree, tree); + tree handle_load (gimple *, tree); + tree handle_stmt (gimple *, tree); + tree handle_operand_addr (tree, gimple *, int *, int *); + tree create_loop (tree, tree *); + tree lower_mergeable_stmt (gimple *, tree_code &, tree, tree); + tree lower_comparison_stmt (gimple *, tree_code &, tree, tree); + void lower_shift_stmt (tree, gimple *); + void lower_muldiv_stmt (tree, gimple *); + void lower_float_conv_stmt (tree, gimple *); + tree arith_overflow_extract_bits (unsigned int, unsigned int, tree, + unsigned int, bool); + void finish_arith_overflow (tree, tree, tree, tree, tree, tree, gimple *, + tree_code); + void lower_addsub_overflow (tree, gimple *); + void lower_mul_overflow (tree, gimple *); + void lower_cplxpart_stmt (tree, gimple *); + void lower_complexexpr_stmt (gimple *); + void lower_call (tree, gimple *); + void lower_asm (gimple *); + void lower_stmt (gimple *); + + /* Bitmap of large/huge _BitInt SSA_NAMEs except those can be + merged with their uses. */ + bitmap m_names; + /* Subset of those for lhs of load statements. These will be + cleared in m_names if the loads will be mergeable with all + their uses. */ + bitmap m_loads; + /* Bitmap of large/huge _BitInt SSA_NAMEs that should survive + to later passes (arguments or return values of calls). */ + bitmap m_preserved; + /* Subset of m_names which have a single use. As the lowering + can replace various original statements with their lowered + form even before it is done iterating over all basic blocks, + testing has_single_use for the purpose of emitting clobbers + doesn't work properly. */ + bitmap m_single_use_names; + /* Used for coalescing/partitioning of large/huge _BitInt SSA_NAMEs + set in m_names. */ + var_map m_map; + /* Mapping of the partitions to corresponding decls. */ + tree *m_vars; + /* Unsigned integer type with limb precision. */ + tree m_limb_type; + /* Its TYPE_SIZE_UNIT. */ + unsigned HOST_WIDE_INT m_limb_size; + /* Location of a gimple stmt which is being currently lowered. */ + location_t m_loc; + /* Current stmt iterator where code is being lowered currently. */ + gimple_stmt_iterator m_gsi; + /* Statement after which any clobbers should be added if non-NULL. */ + gimple *m_after_stmt; + /* Set when creating loops to the loop header bb and its preheader. */ + basic_block m_bb, m_preheader_bb; + /* Stmt iterator after which initialization statements should be emitted. */ + gimple_stmt_iterator m_init_gsi; + /* Decl into which a mergeable statement stores result. */ + tree m_lhs; + /* handle_operand/handle_stmt can be invoked in various ways. + + lower_mergeable_stmt for large _BitInt calls those with constant + idx only, expanding to straight line code, for huge _BitInt + emits a loop from least significant limb upwards, where each loop + iteration handles 2 limbs, plus there can be up to one full limb + and one partial limb processed after the loop, where handle_operand + and/or handle_stmt are called with constant idx. m_upwards_2limb + is set for this case, false otherwise. m_upwards is true if it + is either large or huge _BitInt handled by lower_mergeable_stmt, + i.e. indexes always increase. + + Another way is used by lower_comparison_stmt, which walks limbs + from most significant to least significant, partial limb if any + processed first with constant idx and then loop processing a single + limb per iteration with non-constant idx. + + Another way is used in lower_shift_stmt, where for LSHIFT_EXPR + destination limbs are processed from most significant to least + significant or for RSHIFT_EXPR the other way around, in loops or + straight line code, but idx usually is non-constant (so from + handle_operand/handle_stmt POV random access). The LSHIFT_EXPR + handling there can access even partial limbs using non-constant + idx (then m_var_msb should be true, for all the other cases + including lower_mergeable_stmt/lower_comparison_stmt that is + not the case and so m_var_msb should be false. + + m_first should be set the first time handle_operand/handle_stmt + is called and clear when it is called for some other limb with + the same argument. If the lowering of an operand (e.g. INTEGER_CST) + or statement (e.g. +/-/<< with < limb_prec constant) needs some + state between the different calls, when m_first is true it should + push some trees to m_data vector and also make sure m_data_cnt is + incremented by how many trees were pushed, and when m_first is + false, it can use the m_data[m_data_cnt] etc. data or update them, + just needs to bump m_data_cnt by the same amount as when it was + called with m_first set. The toplevel calls to + handle_operand/handle_stmt should set m_data_cnt to 0 and truncate + m_data vector when setting m_first to true. + + m_cast_conditional and m_bitfld_load are used when handling a + bit-field load inside of a widening cast. handle_cast sometimes + needs to do runtime comparisons and handle_operand only conditionally + or even in two separate conditional blocks for one idx (once with + constant index after comparing the runtime one for equality with the + constant). In these cases, m_cast_conditional is set to true and + the bit-field load then communicates its m_data_cnt to handle_cast + using m_bitfld_load. */ + bool m_first; + bool m_var_msb; + unsigned m_upwards_2limb; + bool m_upwards; + bool m_cast_conditional; + unsigned m_bitfld_load; + vec m_data; + unsigned int m_data_cnt; +}; + +bitint_large_huge::~bitint_large_huge () +{ + BITMAP_FREE (m_names); + BITMAP_FREE (m_loads); + BITMAP_FREE (m_preserved); + BITMAP_FREE (m_single_use_names); + if (m_map) + delete_var_map (m_map); + XDELETEVEC (m_vars); + m_data.release (); +} + +/* Insert gimple statement G before current location + and set its gimple_location. */ + +void +bitint_large_huge::insert_before (gimple *g) +{ + gimple_set_location (g, m_loc); + gsi_insert_before (&m_gsi, g, GSI_SAME_STMT); +} + +/* Return type for accessing limb IDX of BITINT_TYPE TYPE. + This is normally m_limb_type, except for a partial most + significant limb if any. */ + +tree +bitint_large_huge::limb_access_type (tree type, tree idx) +{ + if (type == NULL_TREE) + return m_limb_type; + unsigned HOST_WIDE_INT i = tree_to_uhwi (idx); + unsigned int prec = TYPE_PRECISION (type); + gcc_assert (i * limb_prec < prec); + if ((i + 1) * limb_prec <= prec) + return m_limb_type; + else + return build_nonstandard_integer_type (prec % limb_prec, + TYPE_UNSIGNED (type)); +} + +/* Return a tree how to access limb IDX of VAR corresponding to BITINT_TYPE + TYPE. If WRITE_P is true, it will be a store, otherwise a read. */ + +tree +bitint_large_huge::limb_access (tree type, tree var, tree idx, bool write_p) +{ + tree atype = (tree_fits_uhwi_p (idx) + ? limb_access_type (type, idx) : m_limb_type); + tree ret; + if (DECL_P (var) && tree_fits_uhwi_p (idx)) + { + tree ptype = build_pointer_type (strip_array_types (TREE_TYPE (var))); + unsigned HOST_WIDE_INT off = tree_to_uhwi (idx) * m_limb_size; + ret = build2 (MEM_REF, m_limb_type, + build_fold_addr_expr (var), + build_int_cst (ptype, off)); + TREE_THIS_VOLATILE (ret) = TREE_THIS_VOLATILE (var); + TREE_SIDE_EFFECTS (ret) = TREE_SIDE_EFFECTS (var); + } + else if (TREE_CODE (var) == MEM_REF && tree_fits_uhwi_p (idx)) + { + ret + = build2 (MEM_REF, m_limb_type, TREE_OPERAND (var, 0), + size_binop (PLUS_EXPR, TREE_OPERAND (var, 1), + build_int_cst (TREE_TYPE (TREE_OPERAND (var, 1)), + tree_to_uhwi (idx) + * m_limb_size))); + TREE_THIS_VOLATILE (ret) = TREE_THIS_VOLATILE (var); + TREE_SIDE_EFFECTS (ret) = TREE_SIDE_EFFECTS (var); + TREE_THIS_NOTRAP (ret) = TREE_THIS_NOTRAP (var); + } + else + { + var = unshare_expr (var); + if (TREE_CODE (TREE_TYPE (var)) != ARRAY_TYPE + || !useless_type_conversion_p (m_limb_type, + TREE_TYPE (TREE_TYPE (var)))) + { + unsigned HOST_WIDE_INT nelts + = CEIL (tree_to_uhwi (TYPE_SIZE (type)), limb_prec); + tree atype = build_array_type_nelts (m_limb_type, nelts); + var = build1 (VIEW_CONVERT_EXPR, atype, var); + } + ret = build4 (ARRAY_REF, m_limb_type, var, idx, NULL_TREE, NULL_TREE); + } + if (!write_p && !useless_type_conversion_p (atype, m_limb_type)) + { + gimple *g = gimple_build_assign (make_ssa_name (m_limb_type), ret); + insert_before (g); + ret = gimple_assign_lhs (g); + ret = build1 (NOP_EXPR, atype, ret); + } + return ret; +} + +/* Emit a half diamond, + if (COND) + |\ + | \ + | \ + | new_bb1 + | / + | / + |/ + or if (COND) new_bb1; + PROB is the probability that the condition is true. + Updates m_gsi to start of new_bb1. + Sets EDGE_TRUE to edge from new_bb1 to successor and + EDGE_FALSE to the EDGE_FALSE_VALUE edge from if (COND) bb. */ + +void +bitint_large_huge::if_then (gimple *cond, profile_probability prob, + edge &edge_true, edge &edge_false) +{ + insert_before (cond); + edge e1 = split_block (gsi_bb (m_gsi), cond); + edge e2 = split_block (e1->dest, (gimple *) NULL); + edge e3 = make_edge (e1->src, e2->dest, EDGE_FALSE_VALUE); + e1->flags = EDGE_TRUE_VALUE; + e1->probability = prob; + e3->probability = prob.invert (); + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e1->src); + edge_true = e2; + edge_false = e3; + m_gsi = gsi_after_labels (e1->dest); +} + +/* Emit a full diamond, + if (COND) + /\ + / \ + / \ + new_bb1 new_bb2 + \ / + \ / + \/ + or if (COND) new_bb2; else new_bb1; + PROB is the probability that the condition is true. + Updates m_gsi to start of new_bb2. + Sets EDGE_TRUE to edge from new_bb1 to successor and + EDGE_FALSE to the EDGE_FALSE_VALUE edge from if (COND) bb. */ + +void +bitint_large_huge::if_then_else (gimple *cond, profile_probability prob, + edge &edge_true, edge &edge_false) +{ + insert_before (cond); + edge e1 = split_block (gsi_bb (m_gsi), cond); + edge e2 = split_block (e1->dest, (gimple *) NULL); + basic_block bb = create_empty_bb (e1->dest); + add_bb_to_loop (bb, e1->dest->loop_father); + edge e3 = make_edge (e1->src, bb, EDGE_TRUE_VALUE); + e1->flags = EDGE_FALSE_VALUE; + e3->probability = prob; + e1->probability = prob.invert (); + set_immediate_dominator (CDI_DOMINATORS, bb, e1->src); + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e1->src); + edge_true = make_edge (bb, e2->dest, EDGE_FALLTHRU); + edge_false = e2; + m_gsi = gsi_after_labels (bb); +} + +/* Emit a half diamond with full diamond in it + if (COND1) + |\ + | \ + | \ + | if (COND2) + | / \ + | / \ + |new_bb1 new_bb2 + | | / + \ | / + \ | / + \ | / + \|/ + or if (COND1) { if (COND2) new_bb2; else new_bb1; } + PROB1 is the probability that the condition 1 is true. + PROB2 is the probability that the condition 2 is true. + Updates m_gsi to start of new_bb1. + Sets EDGE_TRUE_TRUE to edge from new_bb2 to successor, + EDGE_TRUE_FALSE to edge from new_bb1 to successor and + EDGE_FALSE to the EDGE_FALSE_VALUE edge from if (COND1) bb. + If COND2 is NULL, this is equivalent to + if_then (COND1, PROB1, EDGE_TRUE_FALSE, EDGE_FALSE); + EDGE_TRUE_TRUE = NULL; */ + +void +bitint_large_huge::if_then_if_then_else (gimple *cond1, gimple *cond2, + profile_probability prob1, + profile_probability prob2, + edge &edge_true_true, + edge &edge_true_false, + edge &edge_false) +{ + edge e2, e3, e4 = NULL; + if_then (cond1, prob1, e2, e3); + if (cond2 == NULL) + { + edge_true_true = NULL; + edge_true_false = e2; + edge_false = e3; + return; + } + insert_before (cond2); + e2 = split_block (gsi_bb (m_gsi), cond2); + basic_block bb = create_empty_bb (e2->dest); + add_bb_to_loop (bb, e2->dest->loop_father); + e4 = make_edge (e2->src, bb, EDGE_TRUE_VALUE); + set_immediate_dominator (CDI_DOMINATORS, bb, e2->src); + e4->probability = prob2; + e2->flags = EDGE_FALSE_VALUE; + e2->probability = prob2.invert (); + e4 = make_edge (bb, e3->dest, EDGE_FALLTHRU); + e2 = find_edge (e2->dest, e3->dest); + edge_true_true = e4; + edge_true_false = e2; + edge_false = e3; + m_gsi = gsi_after_labels (e2->src); +} + +/* Emit code to access limb IDX from OP. */ + +tree +bitint_large_huge::handle_operand (tree op, tree idx) +{ + switch (TREE_CODE (op)) + { + case SSA_NAME: + if (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (op))) + { + if (SSA_NAME_IS_DEFAULT_DEF (op)) + { + if (m_first) + { + tree v = create_tmp_reg (m_limb_type); + if (SSA_NAME_VAR (op) && VAR_P (SSA_NAME_VAR (op))) + { + DECL_NAME (v) = DECL_NAME (SSA_NAME_VAR (op)); + DECL_SOURCE_LOCATION (v) + = DECL_SOURCE_LOCATION (SSA_NAME_VAR (op)); + } + v = get_or_create_ssa_default_def (cfun, v); + m_data.safe_push (v); + } + tree ret = m_data[m_data_cnt]; + m_data_cnt++; + if (tree_fits_uhwi_p (idx)) + { + tree type = limb_access_type (TREE_TYPE (op), idx); + ret = add_cast (type, ret); + } + return ret; + } + location_t loc_save = m_loc; + m_loc = gimple_location (SSA_NAME_DEF_STMT (op)); + tree ret = handle_stmt (SSA_NAME_DEF_STMT (op), idx); + m_loc = loc_save; + return ret; + } + int p; + gimple *g; + tree t; + p = var_to_partition (m_map, op); + gcc_assert (m_vars[p] != NULL_TREE); + t = limb_access (TREE_TYPE (op), m_vars[p], idx, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (t)), t); + insert_before (g); + t = gimple_assign_lhs (g); + if (m_first + && m_single_use_names + && m_vars[p] != m_lhs + && m_after_stmt + && bitmap_bit_p (m_single_use_names, SSA_NAME_VERSION (op))) + { + tree clobber = build_clobber (TREE_TYPE (m_vars[p]), CLOBBER_EOL); + g = gimple_build_assign (m_vars[p], clobber); + gimple_stmt_iterator gsi = gsi_for_stmt (m_after_stmt); + gsi_insert_after (&gsi, g, GSI_SAME_STMT); + } + return t; + case INTEGER_CST: + if (tree_fits_uhwi_p (idx)) + { + tree c, type = limb_access_type (TREE_TYPE (op), idx); + unsigned HOST_WIDE_INT i = tree_to_uhwi (idx); + if (m_first) + { + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + } + if (limb_prec != HOST_BITS_PER_WIDE_INT) + { + wide_int w = wi::rshift (wi::to_wide (op), i * limb_prec, + TYPE_SIGN (TREE_TYPE (op))); + c = wide_int_to_tree (type, + wide_int::from (w, TYPE_PRECISION (type), + UNSIGNED)); + } + else if (i >= TREE_INT_CST_EXT_NUNITS (op)) + c = build_int_cst (type, + tree_int_cst_sgn (op) < 0 ? -1 : 0); + else + c = build_int_cst (type, TREE_INT_CST_ELT (op, i)); + m_data_cnt += 2; + return c; + } + if (m_first + || (m_data[m_data_cnt] == NULL_TREE + && m_data[m_data_cnt + 1] == NULL_TREE)) + { + unsigned int prec = TYPE_PRECISION (TREE_TYPE (op)); + unsigned int rem = prec % (2 * limb_prec); + int ext; + unsigned min_prec = bitint_min_cst_precision (op, ext); + if (m_first) + { + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + } + if (integer_zerop (op)) + { + tree c = build_zero_cst (m_limb_type); + m_data[m_data_cnt] = c; + m_data[m_data_cnt + 1] = c; + } + else if (integer_all_onesp (op)) + { + tree c = build_all_ones_cst (m_limb_type); + m_data[m_data_cnt] = c; + m_data[m_data_cnt + 1] = c; + } + else if (m_upwards_2limb && min_prec <= (unsigned) limb_prec) + { + /* Single limb constant. Use a phi with that limb from + the preheader edge and 0 or -1 constant from the other edge + and for the second limb in the loop. */ + tree out; + gcc_assert (m_first); + m_data.pop (); + m_data.pop (); + prepare_data_in_out (fold_convert (m_limb_type, op), idx, &out); + g = gimple_build_assign (m_data[m_data_cnt + 1], + build_int_cst (m_limb_type, ext)); + insert_before (g); + m_data[m_data_cnt + 1] = gimple_assign_rhs1 (g); + } + else if (min_prec > prec - rem - 2 * limb_prec) + { + /* Constant which has enough significant bits that it isn't + worth trying to save .rodata space by extending from smaller + number. */ + tree type; + if (m_var_msb) + type = TREE_TYPE (op); + else + /* If we have a guarantee the most significant partial limb + (if any) will be only accessed through handle_operand + with INTEGER_CST idx, we don't need to include the partial + limb in .rodata. */ + type = build_bitint_type (prec - rem, 1); + tree c = tree_output_constant_def (fold_convert (type, op)); + m_data[m_data_cnt] = c; + m_data[m_data_cnt + 1] = NULL_TREE; + } + else if (m_upwards_2limb) + { + /* Constant with smaller number of bits. Trade conditional + code for .rodata space by extending from smaller number. */ + min_prec = CEIL (min_prec, 2 * limb_prec) * (2 * limb_prec); + tree type = build_bitint_type (min_prec, 1); + tree c = tree_output_constant_def (fold_convert (type, op)); + tree idx2 = make_ssa_name (sizetype); + g = gimple_build_assign (idx2, PLUS_EXPR, idx, size_one_node); + insert_before (g); + g = gimple_build_cond (LT_EXPR, idx, + size_int (min_prec / limb_prec), + NULL_TREE, NULL_TREE); + edge edge_true, edge_false; + if_then (g, (min_prec >= (prec - rem) / 2 + ? profile_probability::likely () + : profile_probability::unlikely ()), + edge_true, edge_false); + tree c1 = limb_access (TREE_TYPE (op), c, idx, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (c1)), c1); + insert_before (g); + c1 = gimple_assign_lhs (g); + tree c2 = limb_access (TREE_TYPE (op), c, idx2, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (c2)), c2); + insert_before (g); + c2 = gimple_assign_lhs (g); + tree c3 = build_int_cst (m_limb_type, ext); + m_gsi = gsi_after_labels (edge_true->dest); + m_data[m_data_cnt] = make_ssa_name (m_limb_type); + m_data[m_data_cnt + 1] = make_ssa_name (m_limb_type); + gphi *phi = create_phi_node (m_data[m_data_cnt], + edge_true->dest); + add_phi_arg (phi, c1, edge_true, UNKNOWN_LOCATION); + add_phi_arg (phi, c3, edge_false, UNKNOWN_LOCATION); + phi = create_phi_node (m_data[m_data_cnt + 1], edge_true->dest); + add_phi_arg (phi, c2, edge_true, UNKNOWN_LOCATION); + add_phi_arg (phi, c3, edge_false, UNKNOWN_LOCATION); + } + else + { + /* Constant with smaller number of bits. Trade conditional + code for .rodata space by extending from smaller number. + Version for loops with random access to the limbs or + downwards loops. */ + min_prec = CEIL (min_prec, limb_prec) * limb_prec; + tree c; + if (min_prec <= (unsigned) limb_prec) + c = fold_convert (m_limb_type, op); + else + { + tree type = build_bitint_type (min_prec, 1); + c = tree_output_constant_def (fold_convert (type, op)); + } + m_data[m_data_cnt] = c; + m_data[m_data_cnt + 1] = integer_type_node; + } + t = m_data[m_data_cnt]; + if (m_data[m_data_cnt + 1] == NULL_TREE) + { + t = limb_access (TREE_TYPE (op), t, idx, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (t)), t); + insert_before (g); + t = gimple_assign_lhs (g); + } + } + else if (m_data[m_data_cnt + 1] == NULL_TREE) + { + t = limb_access (TREE_TYPE (op), m_data[m_data_cnt], idx, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (t)), t); + insert_before (g); + t = gimple_assign_lhs (g); + } + else + t = m_data[m_data_cnt + 1]; + if (m_data[m_data_cnt + 1] == integer_type_node) + { + unsigned int prec = TYPE_PRECISION (TREE_TYPE (op)); + unsigned rem = prec % (2 * limb_prec); + int ext = tree_int_cst_sgn (op) < 0 ? -1 : 0; + tree c = m_data[m_data_cnt]; + unsigned min_prec = TYPE_PRECISION (TREE_TYPE (c)); + g = gimple_build_cond (LT_EXPR, idx, + size_int (min_prec / limb_prec), + NULL_TREE, NULL_TREE); + edge edge_true, edge_false; + if_then (g, (min_prec >= (prec - rem) / 2 + ? profile_probability::likely () + : profile_probability::unlikely ()), + edge_true, edge_false); + if (min_prec > (unsigned) limb_prec) + { + c = limb_access (TREE_TYPE (op), c, idx, false); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (c)), c); + insert_before (g); + c = gimple_assign_lhs (g); + } + tree c2 = build_int_cst (m_limb_type, ext); + m_gsi = gsi_after_labels (edge_true->dest); + t = make_ssa_name (m_limb_type); + gphi *phi = create_phi_node (t, edge_true->dest); + add_phi_arg (phi, c, edge_true, UNKNOWN_LOCATION); + add_phi_arg (phi, c2, edge_false, UNKNOWN_LOCATION); + } + m_data_cnt += 2; + return t; + default: + gcc_unreachable (); + } +} + +/* Helper method, add a PHI node with VAL from preheader edge if + inside of a loop and m_first. Keep state in a pair of m_data + elements. */ + +tree +bitint_large_huge::prepare_data_in_out (tree val, tree idx, tree *data_out) +{ + if (!m_first) + { + *data_out = tree_fits_uhwi_p (idx) ? NULL_TREE : m_data[m_data_cnt + 1]; + return m_data[m_data_cnt]; + } + + *data_out = NULL_TREE; + if (tree_fits_uhwi_p (idx)) + { + m_data.safe_push (val); + m_data.safe_push (NULL_TREE); + return val; + } + + tree in = make_ssa_name (TREE_TYPE (val)); + gphi *phi = create_phi_node (in, m_bb); + edge e1 = find_edge (m_preheader_bb, m_bb); + edge e2 = EDGE_PRED (m_bb, 0); + if (e1 == e2) + e2 = EDGE_PRED (m_bb, 1); + add_phi_arg (phi, val, e1, UNKNOWN_LOCATION); + tree out = make_ssa_name (TREE_TYPE (val)); + add_phi_arg (phi, out, e2, UNKNOWN_LOCATION); + m_data.safe_push (in); + m_data.safe_push (out); + return in; +} + +/* Return VAL cast to TYPE. If VAL is INTEGER_CST, just + convert it without emitting any code, otherwise emit + the conversion statement before the current location. */ + +tree +bitint_large_huge::add_cast (tree type, tree val) +{ + if (TREE_CODE (val) == INTEGER_CST) + return fold_convert (type, val); + + tree lhs = make_ssa_name (type); + gimple *g = gimple_build_assign (lhs, NOP_EXPR, val); + insert_before (g); + return lhs; +} + +/* Helper of handle_stmt method, handle PLUS_EXPR or MINUS_EXPR. */ + +tree +bitint_large_huge::handle_plus_minus (tree_code code, tree rhs1, tree rhs2, + tree idx) +{ + tree lhs, data_out, ctype; + tree rhs1_type = TREE_TYPE (rhs1); + gimple *g; + tree data_in = prepare_data_in_out (build_zero_cst (m_limb_type), idx, + &data_out); + + if (optab_handler (code == PLUS_EXPR ? uaddc5_optab : usubc5_optab, + TYPE_MODE (m_limb_type)) != CODE_FOR_nothing) + { + ctype = build_complex_type (m_limb_type); + if (!types_compatible_p (rhs1_type, m_limb_type)) + { + if (!TYPE_UNSIGNED (rhs1_type)) + { + tree type = unsigned_type_for (rhs1_type); + rhs1 = add_cast (type, rhs1); + rhs2 = add_cast (type, rhs2); + } + rhs1 = add_cast (m_limb_type, rhs1); + rhs2 = add_cast (m_limb_type, rhs2); + } + lhs = make_ssa_name (ctype); + g = gimple_build_call_internal (code == PLUS_EXPR + ? IFN_UADDC : IFN_USUBC, + 3, rhs1, rhs2, data_in); + gimple_call_set_lhs (g, lhs); + insert_before (g); + if (data_out == NULL_TREE) + data_out = make_ssa_name (m_limb_type); + g = gimple_build_assign (data_out, IMAGPART_EXPR, + build1 (IMAGPART_EXPR, m_limb_type, lhs)); + insert_before (g); + } + else if (types_compatible_p (rhs1_type, m_limb_type)) + { + ctype = build_complex_type (m_limb_type); + lhs = make_ssa_name (ctype); + g = gimple_build_call_internal (code == PLUS_EXPR + ? IFN_ADD_OVERFLOW : IFN_SUB_OVERFLOW, + 2, rhs1, rhs2); + gimple_call_set_lhs (g, lhs); + insert_before (g); + if (data_out == NULL_TREE) + data_out = make_ssa_name (m_limb_type); + if (!integer_zerop (data_in)) + { + rhs1 = make_ssa_name (m_limb_type); + g = gimple_build_assign (rhs1, REALPART_EXPR, + build1 (REALPART_EXPR, m_limb_type, lhs)); + insert_before (g); + rhs2 = make_ssa_name (m_limb_type); + g = gimple_build_assign (rhs2, IMAGPART_EXPR, + build1 (IMAGPART_EXPR, m_limb_type, lhs)); + insert_before (g); + lhs = make_ssa_name (ctype); + g = gimple_build_call_internal (code == PLUS_EXPR + ? IFN_ADD_OVERFLOW + : IFN_SUB_OVERFLOW, + 2, rhs1, data_in); + gimple_call_set_lhs (g, lhs); + insert_before (g); + data_in = make_ssa_name (m_limb_type); + g = gimple_build_assign (data_in, IMAGPART_EXPR, + build1 (IMAGPART_EXPR, m_limb_type, lhs)); + insert_before (g); + g = gimple_build_assign (data_out, PLUS_EXPR, rhs2, data_in); + insert_before (g); + } + else + { + g = gimple_build_assign (data_out, IMAGPART_EXPR, + build1 (IMAGPART_EXPR, m_limb_type, lhs)); + insert_before (g); + } + } + else + { + tree in = add_cast (rhs1_type, data_in); + lhs = make_ssa_name (rhs1_type); + g = gimple_build_assign (lhs, code, rhs1, rhs2); + insert_before (g); + rhs1 = make_ssa_name (rhs1_type); + g = gimple_build_assign (rhs1, code, lhs, in); + insert_before (g); + m_data[m_data_cnt] = NULL_TREE; + m_data_cnt += 2; + return rhs1; + } + rhs1 = make_ssa_name (m_limb_type); + g = gimple_build_assign (rhs1, REALPART_EXPR, + build1 (REALPART_EXPR, m_limb_type, lhs)); + insert_before (g); + if (!types_compatible_p (rhs1_type, m_limb_type)) + rhs1 = add_cast (rhs1_type, rhs1); + m_data[m_data_cnt] = data_out; + m_data_cnt += 2; + return rhs1; +} + +/* Helper function for handle_stmt method, handle LSHIFT_EXPR by + count in [0, limb_prec - 1] range. */ + +tree +bitint_large_huge::handle_lshift (tree rhs1, tree rhs2, tree idx) +{ + unsigned HOST_WIDE_INT cnt = tree_to_uhwi (rhs2); + gcc_checking_assert (cnt < (unsigned) limb_prec); + if (cnt == 0) + return rhs1; + + tree lhs, data_out, rhs1_type = TREE_TYPE (rhs1); + gimple *g; + tree data_in = prepare_data_in_out (build_zero_cst (m_limb_type), idx, + &data_out); + + if (!integer_zerop (data_in)) + { + lhs = make_ssa_name (m_limb_type); + g = gimple_build_assign (lhs, RSHIFT_EXPR, data_in, + build_int_cst (unsigned_type_node, + limb_prec - cnt)); + insert_before (g); + if (!types_compatible_p (rhs1_type, m_limb_type)) + lhs = add_cast (rhs1_type, lhs); + data_in = lhs; + } + if (types_compatible_p (rhs1_type, m_limb_type)) + { + if (data_out == NULL_TREE) + data_out = make_ssa_name (m_limb_type); + g = gimple_build_assign (data_out, rhs1); + insert_before (g); + } + if (cnt < (unsigned) TYPE_PRECISION (rhs1_type)) + { + lhs = make_ssa_name (rhs1_type); + g = gimple_build_assign (lhs, LSHIFT_EXPR, rhs1, rhs2); + insert_before (g); + if (!integer_zerop (data_in)) + { + rhs1 = lhs; + lhs = make_ssa_name (rhs1_type); + g = gimple_build_assign (lhs, BIT_IOR_EXPR, rhs1, data_in); + insert_before (g); + } + } + else + lhs = data_in; + m_data[m_data_cnt] = data_out; + m_data_cnt += 2; + return lhs; +} + +/* Helper function for handle_stmt method, handle an integral + to integral conversion. */ + +tree +bitint_large_huge::handle_cast (tree lhs_type, tree rhs1, tree idx) +{ + tree rhs_type = TREE_TYPE (rhs1); + gimple *g; + if (TREE_CODE (rhs1) == SSA_NAME + && TREE_CODE (lhs_type) == BITINT_TYPE + && TREE_CODE (rhs_type) == BITINT_TYPE + && bitint_precision_kind (lhs_type) >= bitint_prec_large + && bitint_precision_kind (rhs_type) >= bitint_prec_large) + { + if (TYPE_PRECISION (rhs_type) >= TYPE_PRECISION (lhs_type) + /* If lhs has bigger precision than rhs, we can use + the simple case only if there is a guarantee that + the most significant limb is handled in straight + line code. If m_var_msb (on left shifts) or + if m_upwards_2limb * limb_prec is equal to + lhs precision that is not the case. */ + || (!m_var_msb + && tree_int_cst_equal (TYPE_SIZE (rhs_type), + TYPE_SIZE (lhs_type)) + && (!m_upwards_2limb + || (m_upwards_2limb * limb_prec + < TYPE_PRECISION (lhs_type))))) + { + rhs1 = handle_operand (rhs1, idx); + if (tree_fits_uhwi_p (idx)) + { + tree type = limb_access_type (lhs_type, idx); + if (!types_compatible_p (type, TREE_TYPE (rhs1))) + rhs1 = add_cast (type, rhs1); + } + return rhs1; + } + tree t; + /* Indexes lower than this don't need any special processing. */ + unsigned low = ((unsigned) TYPE_PRECISION (rhs_type) + - !TYPE_UNSIGNED (rhs_type)) / limb_prec; + /* Indexes >= than this always contain an extension. */ + unsigned high = CEIL ((unsigned) TYPE_PRECISION (rhs_type), limb_prec); + bool save_first = m_first; + if (m_first) + { + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + if (TYPE_UNSIGNED (rhs_type)) + /* No need to keep state between iterations. */ + ; + else if (m_upwards && !m_upwards_2limb) + /* We need to keep state between iterations, but + not within any loop, everything is straight line + code with only increasing indexes. */ + ; + else if (!m_upwards_2limb) + { + unsigned save_data_cnt = m_data_cnt; + gimple_stmt_iterator save_gsi = m_gsi; + m_gsi = m_init_gsi; + if (gsi_end_p (m_gsi)) + m_gsi = gsi_after_labels (gsi_bb (m_gsi)); + else + gsi_next (&m_gsi); + m_data_cnt = save_data_cnt + 3; + t = handle_operand (rhs1, size_int (low)); + m_first = false; + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + m_data_cnt = save_data_cnt; + t = add_cast (signed_type_for (m_limb_type), t); + tree lpm1 = build_int_cst (unsigned_type_node, limb_prec - 1); + tree n = make_ssa_name (TREE_TYPE (t)); + g = gimple_build_assign (n, RSHIFT_EXPR, t, lpm1); + insert_before (g); + m_data[save_data_cnt + 1] = add_cast (m_limb_type, n); + m_gsi = save_gsi; + } + else if (m_upwards_2limb * limb_prec < TYPE_PRECISION (rhs_type)) + /* We need to keep state between iterations, but + fortunately not within the loop, only afterwards. */ + ; + else + { + tree out; + m_data.truncate (m_data_cnt); + prepare_data_in_out (build_zero_cst (m_limb_type), idx, &out); + m_data.safe_push (NULL_TREE); + } + } + + unsigned save_data_cnt = m_data_cnt; + m_data_cnt += 3; + if (!tree_fits_uhwi_p (idx)) + { + if (m_upwards_2limb + && (m_upwards_2limb * limb_prec + <= ((unsigned) TYPE_PRECISION (rhs_type) + - !TYPE_UNSIGNED (rhs_type)))) + { + rhs1 = handle_operand (rhs1, idx); + if (m_first) + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + m_first = save_first; + return rhs1; + } + bool single_comparison + = low == high || (m_upwards_2limb && (low & 1) == m_first); + g = gimple_build_cond (single_comparison ? LT_EXPR : LE_EXPR, + idx, size_int (low), NULL_TREE, NULL_TREE); + edge edge_true_true, edge_true_false, edge_false; + if_then_if_then_else (g, (single_comparison ? NULL + : gimple_build_cond (EQ_EXPR, idx, + size_int (low), + NULL_TREE, + NULL_TREE)), + profile_probability::likely (), + profile_probability::unlikely (), + edge_true_true, edge_true_false, edge_false); + bool save_cast_conditional = m_cast_conditional; + m_cast_conditional = true; + m_bitfld_load = 0; + tree t1 = handle_operand (rhs1, idx), t2 = NULL_TREE; + if (m_first) + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + tree ext = NULL_TREE; + tree bitfld = NULL_TREE; + if (!single_comparison) + { + m_gsi = gsi_after_labels (edge_true_true->src); + m_first = false; + m_data_cnt = save_data_cnt + 3; + if (m_bitfld_load) + { + bitfld = m_data[m_bitfld_load]; + m_data[m_bitfld_load] = m_data[m_bitfld_load + 2]; + m_bitfld_load = 0; + } + t2 = handle_operand (rhs1, size_int (low)); + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (t2))) + t2 = add_cast (m_limb_type, t2); + if (!TYPE_UNSIGNED (rhs_type) && m_upwards_2limb) + { + ext = add_cast (signed_type_for (m_limb_type), t2); + tree lpm1 = build_int_cst (unsigned_type_node, + limb_prec - 1); + tree n = make_ssa_name (TREE_TYPE (ext)); + g = gimple_build_assign (n, RSHIFT_EXPR, ext, lpm1); + insert_before (g); + ext = add_cast (m_limb_type, n); + } + } + tree t3; + if (TYPE_UNSIGNED (rhs_type)) + t3 = build_zero_cst (m_limb_type); + else if (m_upwards_2limb && (save_first || ext != NULL_TREE)) + t3 = m_data[save_data_cnt]; + else + t3 = m_data[save_data_cnt + 1]; + m_gsi = gsi_after_labels (edge_true_false->dest); + t = make_ssa_name (m_limb_type); + gphi *phi = create_phi_node (t, edge_true_false->dest); + add_phi_arg (phi, t1, edge_true_false, UNKNOWN_LOCATION); + add_phi_arg (phi, t3, edge_false, UNKNOWN_LOCATION); + if (edge_true_true) + add_phi_arg (phi, t2, edge_true_true, UNKNOWN_LOCATION); + if (ext) + { + tree t4 = make_ssa_name (m_limb_type); + phi = create_phi_node (t4, edge_true_false->dest); + add_phi_arg (phi, build_zero_cst (m_limb_type), edge_true_false, + UNKNOWN_LOCATION); + add_phi_arg (phi, m_data[save_data_cnt], edge_false, + UNKNOWN_LOCATION); + add_phi_arg (phi, ext, edge_true_true, UNKNOWN_LOCATION); + g = gimple_build_assign (m_data[save_data_cnt + 1], t4); + insert_before (g); + } + if (m_bitfld_load) + { + tree t4; + if (!m_first) + t4 = m_data[m_bitfld_load + 1]; + else + t4 = make_ssa_name (m_limb_type); + phi = create_phi_node (t4, edge_true_false->dest); + add_phi_arg (phi, + edge_true_true ? bitfld : m_data[m_bitfld_load], + edge_true_false, UNKNOWN_LOCATION); + add_phi_arg (phi, m_data[m_bitfld_load + 2], + edge_false, UNKNOWN_LOCATION); + if (edge_true_true) + add_phi_arg (phi, m_data[m_bitfld_load], edge_true_true, + UNKNOWN_LOCATION); + m_data[m_bitfld_load] = t4; + m_data[m_bitfld_load + 2] = t4; + m_bitfld_load = 0; + } + m_cast_conditional = save_cast_conditional; + m_first = save_first; + return t; + } + else + { + if (tree_to_uhwi (idx) < low) + { + t = handle_operand (rhs1, idx); + if (m_first) + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + } + else if (tree_to_uhwi (idx) < high) + { + t = handle_operand (rhs1, size_int (low)); + if (m_first) + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (t))) + t = add_cast (m_limb_type, t); + tree ext = NULL_TREE; + if (!TYPE_UNSIGNED (rhs_type) && m_upwards) + { + ext = add_cast (signed_type_for (m_limb_type), t); + tree lpm1 = build_int_cst (unsigned_type_node, + limb_prec - 1); + tree n = make_ssa_name (TREE_TYPE (ext)); + g = gimple_build_assign (n, RSHIFT_EXPR, ext, lpm1); + insert_before (g); + ext = add_cast (m_limb_type, n); + m_data[save_data_cnt + 1] = ext; + } + } + else + { + if (TYPE_UNSIGNED (rhs_type) && m_first) + { + handle_operand (rhs1, size_zero_node); + m_data[save_data_cnt + 2] + = build_int_cst (NULL_TREE, m_data_cnt); + } + else + m_data_cnt = tree_to_uhwi (m_data[save_data_cnt + 2]); + if (TYPE_UNSIGNED (rhs_type)) + t = build_zero_cst (m_limb_type); + else + t = m_data[save_data_cnt + 1]; + } + tree type = limb_access_type (lhs_type, idx); + if (!useless_type_conversion_p (type, m_limb_type)) + t = add_cast (type, t); + m_first = save_first; + return t; + } + } + else if (TREE_CODE (lhs_type) == BITINT_TYPE + && bitint_precision_kind (lhs_type) >= bitint_prec_large + && INTEGRAL_TYPE_P (rhs_type)) + { + /* Add support for 3 or more limbs filled in from normal integral + type if this assert fails. If no target chooses limb mode smaller + than half of largest supported normal integral type, this will not + be needed. */ + gcc_assert (TYPE_PRECISION (rhs_type) <= 2 * limb_prec); + tree r1 = NULL_TREE, r2 = NULL_TREE, rext = NULL_TREE; + if (m_first) + { + gimple_stmt_iterator save_gsi = m_gsi; + m_gsi = m_init_gsi; + if (gsi_end_p (m_gsi)) + m_gsi = gsi_after_labels (gsi_bb (m_gsi)); + else + gsi_next (&m_gsi); + if (TREE_CODE (rhs_type) == BITINT_TYPE + && bitint_precision_kind (rhs_type) == bitint_prec_middle) + { + tree type = NULL_TREE; + rhs1 = maybe_cast_middle_bitint (&m_gsi, rhs1, type); + rhs_type = TREE_TYPE (rhs1); + } + r1 = rhs1; + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (rhs1))) + r1 = add_cast (m_limb_type, rhs1); + if (TYPE_PRECISION (rhs_type) > limb_prec) + { + g = gimple_build_assign (make_ssa_name (rhs_type), + RSHIFT_EXPR, rhs1, + build_int_cst (unsigned_type_node, + limb_prec)); + insert_before (g); + r2 = add_cast (m_limb_type, gimple_assign_lhs (g)); + } + if (TYPE_UNSIGNED (rhs_type)) + rext = build_zero_cst (m_limb_type); + else + { + rext = add_cast (signed_type_for (m_limb_type), r2 ? r2 : r1); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rext)), + RSHIFT_EXPR, rext, + build_int_cst (unsigned_type_node, + limb_prec - 1)); + insert_before (g); + rext = add_cast (m_limb_type, gimple_assign_lhs (g)); + } + m_gsi = save_gsi; + } + tree t; + if (m_upwards_2limb) + { + if (m_first) + { + tree out1, out2; + prepare_data_in_out (r1, idx, &out1); + g = gimple_build_assign (m_data[m_data_cnt + 1], rext); + insert_before (g); + if (TYPE_PRECISION (rhs_type) > limb_prec) + { + prepare_data_in_out (r2, idx, &out2); + g = gimple_build_assign (m_data[m_data_cnt + 3], rext); + insert_before (g); + m_data.pop (); + t = m_data.pop (); + m_data[m_data_cnt + 1] = t; + } + else + m_data[m_data_cnt + 1] = rext; + m_data.safe_push (rext); + t = m_data[m_data_cnt]; + } + else if (!tree_fits_uhwi_p (idx)) + t = m_data[m_data_cnt + 1]; + else + { + tree type = limb_access_type (lhs_type, idx); + t = m_data[m_data_cnt + 2]; + if (!useless_type_conversion_p (type, m_limb_type)) + t = add_cast (type, t); + } + m_data_cnt += 3; + return t; + } + else if (m_first) + { + m_data.safe_push (r1); + m_data.safe_push (r2); + m_data.safe_push (rext); + } + if (tree_fits_uhwi_p (idx)) + { + tree type = limb_access_type (lhs_type, idx); + if (integer_zerop (idx)) + t = m_data[m_data_cnt]; + else if (TYPE_PRECISION (rhs_type) > limb_prec + && integer_onep (idx)) + t = m_data[m_data_cnt + 1]; + else + t = m_data[m_data_cnt + 2]; + if (!useless_type_conversion_p (type, m_limb_type)) + t = add_cast (type, t); + m_data_cnt += 3; + return t; + } + g = gimple_build_cond (NE_EXPR, idx, size_zero_node, + NULL_TREE, NULL_TREE); + edge e2, e3, e4 = NULL; + if_then (g, profile_probability::likely (), e2, e3); + if (m_data[m_data_cnt + 1]) + { + g = gimple_build_cond (EQ_EXPR, idx, size_one_node, + NULL_TREE, NULL_TREE); + insert_before (g); + edge e5 = split_block (gsi_bb (m_gsi), g); + e4 = make_edge (e5->src, e2->dest, EDGE_TRUE_VALUE); + e2 = find_edge (e5->dest, e2->dest); + e4->probability = profile_probability::unlikely (); + e5->flags = EDGE_FALSE_VALUE; + e5->probability = e4->probability.invert (); + } + m_gsi = gsi_after_labels (e2->dest); + t = make_ssa_name (m_limb_type); + gphi *phi = create_phi_node (t, e2->dest); + add_phi_arg (phi, m_data[m_data_cnt + 2], e2, UNKNOWN_LOCATION); + add_phi_arg (phi, m_data[m_data_cnt], e3, UNKNOWN_LOCATION); + if (e4) + add_phi_arg (phi, m_data[m_data_cnt + 1], e4, UNKNOWN_LOCATION); + m_data_cnt += 3; + return t; + } + return NULL_TREE; +} + +/* Helper function for handle_stmt method, handle a load from memory. */ + +tree +bitint_large_huge::handle_load (gimple *stmt, tree idx) +{ + tree rhs1 = gimple_assign_rhs1 (stmt); + tree rhs_type = TREE_TYPE (rhs1); + bool eh = stmt_ends_bb_p (stmt); + edge eh_edge = NULL; + gimple *g; + + if (eh) + { + edge_iterator ei; + basic_block bb = gimple_bb (stmt); + + FOR_EACH_EDGE (eh_edge, ei, bb->succs) + if (eh_edge->flags & EDGE_EH) + break; + } + + if (TREE_CODE (rhs1) == COMPONENT_REF + && DECL_BIT_FIELD_TYPE (TREE_OPERAND (rhs1, 1))) + { + tree fld = TREE_OPERAND (rhs1, 1); + /* For little-endian, we can allow as inputs bit-fields + which start at a limb boundary. */ + gcc_assert (tree_fits_uhwi_p (DECL_FIELD_BIT_OFFSET (fld))); + if (DECL_OFFSET_ALIGN (fld) >= TYPE_ALIGN (TREE_TYPE (rhs1)) + && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % limb_prec) == 0) + goto normal_load; + /* Even if DECL_FIELD_BIT_OFFSET (fld) is a multiple of UNITS_PER_BIT, + handle it normally for now. */ + if ((tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % BITS_PER_UNIT) == 0) + goto normal_load; + tree repr = DECL_BIT_FIELD_REPRESENTATIVE (fld); + poly_int64 bitoffset; + poly_uint64 field_offset, repr_offset; + bool var_field_off = false; + if (poly_int_tree_p (DECL_FIELD_OFFSET (fld), &field_offset) + && poly_int_tree_p (DECL_FIELD_OFFSET (repr), &repr_offset)) + bitoffset = (field_offset - repr_offset) * BITS_PER_UNIT; + else + { + bitoffset = 0; + var_field_off = true; + } + bitoffset += (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) + - tree_to_uhwi (DECL_FIELD_BIT_OFFSET (repr))); + tree nrhs1 = build3 (COMPONENT_REF, TREE_TYPE (repr), + TREE_OPERAND (rhs1, 0), repr, + var_field_off ? TREE_OPERAND (rhs1, 2) : NULL_TREE); + HOST_WIDE_INT bo = bitoffset.to_constant (); + unsigned bo_idx = (unsigned HOST_WIDE_INT) bo / limb_prec; + unsigned bo_bit = (unsigned HOST_WIDE_INT) bo % limb_prec; + if (m_first) + { + if (m_upwards) + { + gimple_stmt_iterator save_gsi = m_gsi; + m_gsi = m_init_gsi; + if (gsi_end_p (m_gsi)) + m_gsi = gsi_after_labels (gsi_bb (m_gsi)); + else + gsi_next (&m_gsi); + tree t = limb_access (rhs_type, nrhs1, size_int (bo_idx), true); + tree iv = make_ssa_name (m_limb_type); + g = gimple_build_assign (iv, t); + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_edge) + { + edge e = split_block (gsi_bb (m_gsi), g); + make_edge (e->src, eh_edge->dest, EDGE_EH)->probability + = profile_probability::very_unlikely (); + m_init_gsi.bb = e->dest; + } + } + m_gsi = save_gsi; + tree out; + prepare_data_in_out (iv, idx, &out); + out = m_data[m_data_cnt]; + m_data.safe_push (out); + } + else + { + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + m_data.safe_push (NULL_TREE); + } + } + + tree nidx0 = NULL_TREE, nidx1; + tree iv = m_data[m_data_cnt]; + if (m_cast_conditional && iv) + { + gcc_assert (!m_bitfld_load); + m_bitfld_load = m_data_cnt; + } + if (tree_fits_uhwi_p (idx)) + { + unsigned prec = TYPE_PRECISION (rhs_type); + unsigned HOST_WIDE_INT i = tree_to_uhwi (idx); + gcc_assert (i * limb_prec < prec); + nidx1 = size_int (i + bo_idx + 1); + if ((i + 1) * limb_prec > prec) + { + prec %= limb_prec; + if (prec + bo_bit <= (unsigned) limb_prec) + nidx1 = NULL_TREE; + } + if (!iv) + nidx0 = size_int (i + bo_idx); + } + else + { + if (!iv) + { + if (bo_idx == 0) + nidx0 = idx; + else + { + nidx0 = make_ssa_name (sizetype); + g = gimple_build_assign (nidx0, PLUS_EXPR, idx, + size_int (bo_idx)); + insert_before (g); + } + } + nidx1 = make_ssa_name (sizetype); + g = gimple_build_assign (nidx1, PLUS_EXPR, idx, + size_int (bo_idx + 1)); + insert_before (g); + } + + tree iv2 = NULL_TREE; + if (nidx0) + { + tree t = limb_access (rhs_type, nrhs1, nidx0, true); + iv = make_ssa_name (m_limb_type); + g = gimple_build_assign (iv, t); + insert_before (g); + gcc_assert (!eh); + } + if (nidx1) + { + bool conditional = m_var_msb && !tree_fits_uhwi_p (idx); + unsigned prec = TYPE_PRECISION (rhs_type); + if (conditional) + { + if ((prec % limb_prec) == 0 + || ((prec % limb_prec) + bo_bit > (unsigned) limb_prec)) + conditional = false; + } + edge edge_true = NULL, edge_false = NULL; + if (conditional) + { + g = gimple_build_cond (NE_EXPR, idx, + size_int (prec / limb_prec), + NULL_TREE, NULL_TREE); + if_then (g, profile_probability::likely (), + edge_true, edge_false); + } + tree t = limb_access (rhs_type, nrhs1, nidx1, true); + if (m_upwards_2limb + && !m_first + && !m_bitfld_load + && !tree_fits_uhwi_p (idx)) + iv2 = m_data[m_data_cnt + 1]; + else + iv2 = make_ssa_name (m_limb_type); + g = gimple_build_assign (iv2, t); + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_edge) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_edge->dest, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } + if (conditional) + { + tree iv3 = make_ssa_name (m_limb_type); + if (eh) + edge_true = find_edge (gsi_bb (m_gsi), edge_false->dest); + gphi *phi = create_phi_node (iv3, edge_true->dest); + add_phi_arg (phi, iv2, edge_true, UNKNOWN_LOCATION); + add_phi_arg (phi, build_zero_cst (m_limb_type), + edge_false, UNKNOWN_LOCATION); + m_gsi = gsi_after_labels (edge_true->dest); + } + } + g = gimple_build_assign (make_ssa_name (m_limb_type), RSHIFT_EXPR, + iv, build_int_cst (unsigned_type_node, bo_bit)); + insert_before (g); + iv = gimple_assign_lhs (g); + if (iv2) + { + g = gimple_build_assign (make_ssa_name (m_limb_type), LSHIFT_EXPR, + iv2, build_int_cst (unsigned_type_node, + limb_prec - bo_bit)); + insert_before (g); + g = gimple_build_assign (make_ssa_name (m_limb_type), BIT_IOR_EXPR, + gimple_assign_lhs (g), iv); + insert_before (g); + iv = gimple_assign_lhs (g); + if (m_data[m_data_cnt]) + m_data[m_data_cnt] = iv2; + } + if (tree_fits_uhwi_p (idx)) + { + tree atype = limb_access_type (rhs_type, idx); + if (!useless_type_conversion_p (atype, TREE_TYPE (iv))) + iv = add_cast (atype, iv); + } + m_data_cnt += 3; + return iv; + } + +normal_load: + /* Use write_p = true for loads with EH edges to make + sure limb_access doesn't add a cast as separate + statement after it. */ + rhs1 = limb_access (rhs_type, rhs1, idx, eh); + tree ret = make_ssa_name (TREE_TYPE (rhs1)); + g = gimple_build_assign (ret, rhs1); + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_edge) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_edge->dest, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + if (tree_fits_uhwi_p (idx)) + { + tree atype = limb_access_type (rhs_type, idx); + if (!useless_type_conversion_p (atype, TREE_TYPE (rhs1))) + ret = add_cast (atype, ret); + } + } + return ret; +} + +/* Return a limb IDX from a mergeable statement STMT. */ + +tree +bitint_large_huge::handle_stmt (gimple *stmt, tree idx) +{ + tree lhs, rhs1, rhs2 = NULL_TREE; + gimple *g; + switch (gimple_code (stmt)) + { + case GIMPLE_ASSIGN: + if (gimple_assign_load_p (stmt)) + return handle_load (stmt, idx); + switch (gimple_assign_rhs_code (stmt)) + { + case BIT_AND_EXPR: + case BIT_IOR_EXPR: + case BIT_XOR_EXPR: + rhs2 = handle_operand (gimple_assign_rhs2 (stmt), idx); + /* FALLTHRU */ + case BIT_NOT_EXPR: + rhs1 = handle_operand (gimple_assign_rhs1 (stmt), idx); + lhs = make_ssa_name (TREE_TYPE (rhs1)); + g = gimple_build_assign (lhs, gimple_assign_rhs_code (stmt), + rhs1, rhs2); + insert_before (g); + return lhs; + case PLUS_EXPR: + case MINUS_EXPR: + rhs1 = handle_operand (gimple_assign_rhs1 (stmt), idx); + rhs2 = handle_operand (gimple_assign_rhs2 (stmt), idx); + return handle_plus_minus (gimple_assign_rhs_code (stmt), + rhs1, rhs2, idx); + case NEGATE_EXPR: + rhs2 = handle_operand (gimple_assign_rhs1 (stmt), idx); + rhs1 = build_zero_cst (TREE_TYPE (rhs2)); + return handle_plus_minus (MINUS_EXPR, rhs1, rhs2, idx); + case LSHIFT_EXPR: + return handle_lshift (handle_operand (gimple_assign_rhs1 (stmt), + idx), + gimple_assign_rhs2 (stmt), idx); + case SSA_NAME: + case INTEGER_CST: + return handle_operand (gimple_assign_rhs1 (stmt), idx); + CASE_CONVERT: + case VIEW_CONVERT_EXPR: + return handle_cast (TREE_TYPE (gimple_assign_lhs (stmt)), + gimple_assign_rhs1 (stmt), idx); + default: + break; + } + break; + default: + break; + } + gcc_unreachable (); +} + +/* Return minimum precision of OP at STMT. + Positive value is minimum precision above which all bits + are zero, negative means all bits above negation of the + value are copies of the sign bit. */ + +static int +range_to_prec (tree op, gimple *stmt) +{ + int_range_max r; + wide_int w; + tree type = TREE_TYPE (op); + unsigned int prec = TYPE_PRECISION (type); + + if (!optimize + || !get_range_query (cfun)->range_of_expr (r, op, stmt)) + { + if (TYPE_UNSIGNED (type)) + return prec; + else + return -prec; + } + + if (!TYPE_UNSIGNED (TREE_TYPE (op))) + { + w = r.lower_bound (); + if (wi::neg_p (w)) + { + int min_prec1 = wi::min_precision (w, SIGNED); + w = r.upper_bound (); + int min_prec2 = wi::min_precision (w, SIGNED); + int min_prec = MAX (min_prec1, min_prec2); + return MIN (-min_prec, -2); + } + } + + w = r.upper_bound (); + int min_prec = wi::min_precision (w, UNSIGNED); + return MAX (min_prec, 1); +} + +/* Return address of the first limb of OP and write into *PREC + its precision. If positive, the operand is zero extended + from that precision, if it is negative, the operand is sign-extended + from -*PREC. If PREC_STORED is NULL, it is the toplevel call, + otherwise *PREC_STORED is prec from the innermost call without + range optimizations. */ + +tree +bitint_large_huge::handle_operand_addr (tree op, gimple *stmt, + int *prec_stored, int *prec) +{ + wide_int w; + location_t loc_save = m_loc; + if ((TREE_CODE (TREE_TYPE (op)) != BITINT_TYPE + || bitint_precision_kind (TREE_TYPE (op)) < bitint_prec_large) + && TREE_CODE (op) != INTEGER_CST) + { + do_int: + *prec = range_to_prec (op, stmt); + bitint_prec_kind kind = bitint_prec_small; + gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (op))); + if (TREE_CODE (TREE_TYPE (op)) == BITINT_TYPE) + kind = bitint_precision_kind (TREE_TYPE (op)); + if (kind == bitint_prec_middle) + { + tree type = NULL_TREE; + op = maybe_cast_middle_bitint (&m_gsi, op, type); + } + tree op_type = TREE_TYPE (op); + unsigned HOST_WIDE_INT nelts + = CEIL (TYPE_PRECISION (op_type), limb_prec); + /* Add support for 3 or more limbs filled in from normal + integral type if this assert fails. If no target chooses + limb mode smaller than half of largest supported normal + integral type, this will not be needed. */ + gcc_assert (nelts <= 2); + if (prec_stored) + *prec_stored = (TYPE_UNSIGNED (op_type) + ? TYPE_PRECISION (op_type) + : -TYPE_PRECISION (op_type)); + if (*prec <= limb_prec && *prec >= -limb_prec) + { + nelts = 1; + if (prec_stored) + { + if (TYPE_UNSIGNED (op_type)) + { + if (*prec_stored > limb_prec) + *prec_stored = limb_prec; + } + else if (*prec_stored < -limb_prec) + *prec_stored = -limb_prec; + } + } + tree atype = build_array_type_nelts (m_limb_type, nelts); + tree var = create_tmp_var (atype); + tree t1 = op; + if (!useless_type_conversion_p (m_limb_type, op_type)) + t1 = add_cast (m_limb_type, t1); + tree v = build4 (ARRAY_REF, m_limb_type, var, size_zero_node, + NULL_TREE, NULL_TREE); + gimple *g = gimple_build_assign (v, t1); + insert_before (g); + if (nelts > 1) + { + tree lp = build_int_cst (unsigned_type_node, limb_prec); + g = gimple_build_assign (make_ssa_name (op_type), + RSHIFT_EXPR, op, lp); + insert_before (g); + tree t2 = gimple_assign_lhs (g); + t2 = add_cast (m_limb_type, t2); + v = build4 (ARRAY_REF, m_limb_type, var, size_one_node, + NULL_TREE, NULL_TREE); + g = gimple_build_assign (v, t2); + insert_before (g); + } + tree ret = build_fold_addr_expr (var); + if (!stmt_ends_bb_p (gsi_stmt (m_gsi))) + { + tree clobber = build_clobber (atype, CLOBBER_EOL); + g = gimple_build_assign (var, clobber); + gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); + } + m_loc = loc_save; + return ret; + } + switch (TREE_CODE (op)) + { + case SSA_NAME: + if (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (op))) + { + gimple *g = SSA_NAME_DEF_STMT (op); + tree ret; + m_loc = gimple_location (g); + if (gimple_assign_load_p (g)) + { + *prec = range_to_prec (op, NULL); + if (prec_stored) + *prec_stored = (TYPE_UNSIGNED (TREE_TYPE (op)) + ? TYPE_PRECISION (TREE_TYPE (op)) + : -TYPE_PRECISION (TREE_TYPE (op))); + ret = build_fold_addr_expr (gimple_assign_rhs1 (g)); + ret = force_gimple_operand_gsi (&m_gsi, ret, true, + NULL_TREE, true, GSI_SAME_STMT); + } + else if (gimple_code (g) == GIMPLE_NOP) + { + tree var = create_tmp_var (m_limb_type); + TREE_ADDRESSABLE (var) = 1; + ret = build_fold_addr_expr (var); + if (!stmt_ends_bb_p (gsi_stmt (m_gsi))) + { + tree clobber = build_clobber (m_limb_type, CLOBBER_EOL); + g = gimple_build_assign (var, clobber); + gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); + } + } + else + { + gcc_assert (gimple_assign_cast_p (g)); + tree rhs1 = gimple_assign_rhs1 (g); + bitint_prec_kind kind = bitint_prec_small; + gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (rhs1))); + if (TREE_CODE (TREE_TYPE (rhs1)) == BITINT_TYPE) + kind = bitint_precision_kind (TREE_TYPE (rhs1)); + if (kind >= bitint_prec_large) + { + tree lhs_type = TREE_TYPE (op); + tree rhs_type = TREE_TYPE (rhs1); + int prec_stored_val = 0; + ret = handle_operand_addr (rhs1, g, &prec_stored_val, prec); + if (TYPE_PRECISION (lhs_type) > TYPE_PRECISION (rhs_type)) + { + if (TYPE_UNSIGNED (lhs_type) + && !TYPE_UNSIGNED (rhs_type)) + gcc_assert (*prec >= 0 || prec_stored == NULL); + } + else + { + if (*prec > 0 && *prec < TYPE_PRECISION (lhs_type)) + ; + else if (TYPE_UNSIGNED (lhs_type)) + { + gcc_assert (*prec > 0 + || prec_stored_val > 0 + || (-prec_stored_val + >= TYPE_PRECISION (lhs_type))); + *prec = TYPE_PRECISION (lhs_type); + } + else if (*prec < 0 && -*prec < TYPE_PRECISION (lhs_type)) + ; + else + *prec = -TYPE_PRECISION (lhs_type); + } + } + else + { + op = rhs1; + stmt = g; + goto do_int; + } + } + m_loc = loc_save; + return ret; + } + else + { + int p = var_to_partition (m_map, op); + gcc_assert (m_vars[p] != NULL_TREE); + *prec = range_to_prec (op, stmt); + if (prec_stored) + *prec_stored = (TYPE_UNSIGNED (TREE_TYPE (op)) + ? TYPE_PRECISION (TREE_TYPE (op)) + : -TYPE_PRECISION (TREE_TYPE (op))); + return build_fold_addr_expr (m_vars[p]); + } + case INTEGER_CST: + unsigned int min_prec, mp; + tree type; + w = wi::to_wide (op); + if (tree_int_cst_sgn (op) >= 0) + { + min_prec = wi::min_precision (w, UNSIGNED); + *prec = MAX (min_prec, 1); + } + else + { + min_prec = wi::min_precision (w, SIGNED); + *prec = MIN ((int) -min_prec, -2); + } + mp = CEIL (min_prec, limb_prec) * limb_prec; + if (mp >= (unsigned) TYPE_PRECISION (TREE_TYPE (op))) + type = TREE_TYPE (op); + else + type = build_bitint_type (mp, 1); + if (TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) == bitint_prec_small) + { + if (TYPE_PRECISION (type) <= limb_prec) + type = m_limb_type; + else + /* This case is for targets which e.g. have 64-bit + limb but categorize up to 128-bits _BitInts as + small. We could use type of m_limb_type[2] and + similar instead to save space. */ + type = build_bitint_type (mid_min_prec, 1); + } + if (prec_stored) + { + if (tree_int_cst_sgn (op) >= 0) + *prec_stored = MAX (TYPE_PRECISION (type), 1); + else + *prec_stored = MIN ((int) -TYPE_PRECISION (type), -2); + } + op = tree_output_constant_def (fold_convert (type, op)); + return build_fold_addr_expr (op); + default: + gcc_unreachable (); + } +} + +/* Helper function, create a loop before the current location, + start with sizetype INIT value from the preheader edge. Return + a PHI result and set *IDX_NEXT to SSA_NAME it creates and uses + from the latch edge. */ + +tree +bitint_large_huge::create_loop (tree init, tree *idx_next) +{ + if (!gsi_end_p (m_gsi)) + gsi_prev (&m_gsi); + else + m_gsi = gsi_last_bb (gsi_bb (m_gsi)); + edge e1 = split_block (gsi_bb (m_gsi), gsi_stmt (m_gsi)); + edge e2 = split_block (e1->dest, (gimple *) NULL); + edge e3 = make_edge (e1->dest, e1->dest, EDGE_TRUE_VALUE); + e3->probability = profile_probability::very_unlikely (); + e2->flags = EDGE_FALSE_VALUE; + e2->probability = e3->probability.invert (); + tree idx = make_ssa_name (sizetype); + gphi *phi = create_phi_node (idx, e1->dest); + add_phi_arg (phi, init, e1, UNKNOWN_LOCATION); + *idx_next = make_ssa_name (sizetype); + add_phi_arg (phi, *idx_next, e3, UNKNOWN_LOCATION); + m_gsi = gsi_after_labels (e1->dest); + m_bb = e1->dest; + m_preheader_bb = e1->src; + class loop *loop = alloc_loop (); + loop->header = e1->dest; + add_loop (loop, e1->src->loop_father); + return idx; +} + +/* Lower large/huge _BitInt statement mergeable or similar STMT which can be + lowered using iteration from the least significant limb up to the most + significant limb. For large _BitInt it is emitted as straight line code + before current location, for huge _BitInt as a loop handling two limbs + at once, followed by handling up to limbs in straight line code (at most + one full and one partial limb). It can also handle EQ_EXPR/NE_EXPR + comparisons, in that case CMP_CODE should be the comparison code and + CMP_OP1/CMP_OP2 the comparison operands. */ + +tree +bitint_large_huge::lower_mergeable_stmt (gimple *stmt, tree_code &cmp_code, + tree cmp_op1, tree cmp_op2) +{ + bool eq_p = cmp_code != ERROR_MARK; + tree type; + if (eq_p) + type = TREE_TYPE (cmp_op1); + else + type = TREE_TYPE (gimple_assign_lhs (stmt)); + gcc_assert (TREE_CODE (type) == BITINT_TYPE); + bitint_prec_kind kind = bitint_precision_kind (type); + gcc_assert (kind >= bitint_prec_large); + gimple *g; + tree lhs = gimple_get_lhs (stmt); + tree rhs1, lhs_type = lhs ? TREE_TYPE (lhs) : NULL_TREE; + if (lhs + && TREE_CODE (lhs) == SSA_NAME + && TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (lhs)) >= bitint_prec_large) + { + int p = var_to_partition (m_map, lhs); + gcc_assert (m_vars[p] != NULL_TREE); + m_lhs = lhs = m_vars[p]; + } + unsigned cnt, rem = 0, end = 0, prec = TYPE_PRECISION (type); + bool sext = false; + tree ext = NULL_TREE, store_operand = NULL_TREE; + bool eh = false; + basic_block eh_pad = NULL; + tree nlhs = NULL_TREE; + unsigned HOST_WIDE_INT bo_idx = 0; + unsigned HOST_WIDE_INT bo_bit = 0; + tree bf_cur = NULL_TREE, bf_next = NULL_TREE; + if (gimple_store_p (stmt)) + { + store_operand = gimple_assign_rhs1 (stmt); + eh = stmt_ends_bb_p (stmt); + if (eh) + { + edge e; + edge_iterator ei; + basic_block bb = gimple_bb (stmt); + + FOR_EACH_EDGE (e, ei, bb->succs) + if (e->flags & EDGE_EH) + { + eh_pad = e->dest; + break; + } + } + if (TREE_CODE (lhs) == COMPONENT_REF + && DECL_BIT_FIELD_TYPE (TREE_OPERAND (lhs, 1))) + { + tree fld = TREE_OPERAND (lhs, 1); + gcc_assert (tree_fits_uhwi_p (DECL_FIELD_BIT_OFFSET (fld))); + tree repr = DECL_BIT_FIELD_REPRESENTATIVE (fld); + poly_int64 bitoffset; + poly_uint64 field_offset, repr_offset; + if ((tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) % BITS_PER_UNIT) == 0) + nlhs = lhs; + else + { + bool var_field_off = false; + if (poly_int_tree_p (DECL_FIELD_OFFSET (fld), &field_offset) + && poly_int_tree_p (DECL_FIELD_OFFSET (repr), &repr_offset)) + bitoffset = (field_offset - repr_offset) * BITS_PER_UNIT; + else + { + bitoffset = 0; + var_field_off = true; + } + bitoffset += (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) + - tree_to_uhwi (DECL_FIELD_BIT_OFFSET (repr))); + nlhs = build3 (COMPONENT_REF, TREE_TYPE (repr), + TREE_OPERAND (lhs, 0), repr, + var_field_off + ? TREE_OPERAND (lhs, 2) : NULL_TREE); + HOST_WIDE_INT bo = bitoffset.to_constant (); + bo_idx = (unsigned HOST_WIDE_INT) bo / limb_prec; + bo_bit = (unsigned HOST_WIDE_INT) bo % limb_prec; + } + } + } + if ((store_operand + && TREE_CODE (store_operand) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (store_operand))) + && gimple_assign_cast_p (SSA_NAME_DEF_STMT (store_operand))) + || gimple_assign_cast_p (stmt)) + { + rhs1 = gimple_assign_rhs1 (store_operand + ? SSA_NAME_DEF_STMT (store_operand) + : stmt); + /* Optimize mergeable ops ending with widening cast to _BitInt + (or followed by store). We can lower just the limbs of the + cast operand and widen afterwards. */ + if (TREE_CODE (rhs1) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs1))) + && TREE_CODE (TREE_TYPE (rhs1)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (rhs1)) >= bitint_prec_large + && (CEIL ((unsigned) TYPE_PRECISION (TREE_TYPE (rhs1)), + limb_prec) < CEIL (prec, limb_prec) + || (kind == bitint_prec_huge + && TYPE_PRECISION (TREE_TYPE (rhs1)) < prec))) + { + store_operand = rhs1; + prec = TYPE_PRECISION (TREE_TYPE (rhs1)); + kind = bitint_precision_kind (TREE_TYPE (rhs1)); + if (!TYPE_UNSIGNED (TREE_TYPE (rhs1))) + sext = true; + } + } + tree idx = NULL_TREE, idx_first = NULL_TREE, idx_next = NULL_TREE; + if (kind == bitint_prec_large) + cnt = CEIL (prec, limb_prec); + else + { + rem = (prec % (2 * limb_prec)); + end = (prec - rem) / limb_prec; + cnt = 2 + CEIL (rem, limb_prec); + idx = idx_first = create_loop (size_zero_node, &idx_next); + } + + basic_block edge_bb = NULL; + if (eq_p) + { + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + gsi_prev (&gsi); + edge e = split_block (gsi_bb (gsi), gsi_stmt (gsi)); + edge_bb = e->src; + if (kind == bitint_prec_large) + { + m_gsi = gsi_last_bb (edge_bb); + if (!gsi_end_p (m_gsi)) + gsi_next (&m_gsi); + } + } + else + m_after_stmt = stmt; + if (kind != bitint_prec_large) + m_upwards_2limb = end; + m_upwards = true; + + bool separate_ext + = (prec != (unsigned) TYPE_PRECISION (type) + && (CEIL ((unsigned) TYPE_PRECISION (type), limb_prec) + > CEIL (prec, limb_prec))); + + for (unsigned i = 0; i < cnt; i++) + { + m_data_cnt = 0; + if (kind == bitint_prec_large) + idx = size_int (i); + else if (i >= 2) + idx = size_int (end + (i > 2)); + if (eq_p) + { + rhs1 = handle_operand (cmp_op1, idx); + tree rhs2 = handle_operand (cmp_op2, idx); + g = gimple_build_cond (NE_EXPR, rhs1, rhs2, NULL_TREE, NULL_TREE); + insert_before (g); + edge e1 = split_block (gsi_bb (m_gsi), g); + e1->flags = EDGE_FALSE_VALUE; + edge e2 = make_edge (e1->src, gimple_bb (stmt), EDGE_TRUE_VALUE); + e1->probability = profile_probability::unlikely (); + e2->probability = e1->probability.invert (); + if (i == 0) + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e2->src); + m_gsi = gsi_after_labels (e1->dest); + } + else + { + if (store_operand) + rhs1 = handle_operand (store_operand, idx); + else + rhs1 = handle_stmt (stmt, idx); + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (rhs1))) + rhs1 = add_cast (m_limb_type, rhs1); + if (sext && i == cnt - 1) + ext = rhs1; + tree nidx = idx; + if (bo_idx) + { + if (tree_fits_uhwi_p (idx)) + nidx = size_int (tree_to_uhwi (idx) + bo_idx); + else + { + nidx = make_ssa_name (sizetype); + g = gimple_build_assign (nidx, PLUS_EXPR, idx, + size_int (bo_idx)); + insert_before (g); + } + } + bool done = false; + basic_block new_bb = NULL; + /* Handle stores into bit-fields. */ + if (bo_bit) + { + if (i == 0) + { + edge e2 = NULL; + if (kind != bitint_prec_large) + { + prepare_data_in_out (build_zero_cst (m_limb_type), + idx, &bf_next); + bf_next = m_data.pop (); + bf_cur = m_data.pop (); + g = gimple_build_cond (EQ_EXPR, idx, size_zero_node, + NULL_TREE, NULL_TREE); + edge edge_true; + if_then_else (g, profile_probability::unlikely (), + edge_true, e2); + new_bb = e2->dest; + } + tree ftype + = build_nonstandard_integer_type (limb_prec - bo_bit, 1); + tree bfr = build3 (BIT_FIELD_REF, ftype, unshare_expr (nlhs), + bitsize_int (limb_prec - bo_bit), + bitsize_int (bo_idx * limb_prec + bo_bit)); + tree t = add_cast (ftype, rhs1); + g = gimple_build_assign (bfr, t); + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_pad) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_pad, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } + if (kind == bitint_prec_large) + { + bf_cur = rhs1; + done = true; + } + else if (e2) + m_gsi = gsi_after_labels (e2->src); + } + if (!done) + { + tree t1 = make_ssa_name (m_limb_type); + tree t2 = make_ssa_name (m_limb_type); + tree t3 = make_ssa_name (m_limb_type); + g = gimple_build_assign (t1, RSHIFT_EXPR, bf_cur, + build_int_cst (unsigned_type_node, + limb_prec - bo_bit)); + insert_before (g); + g = gimple_build_assign (t2, LSHIFT_EXPR, rhs1, + build_int_cst (unsigned_type_node, + bo_bit)); + insert_before (g); + bf_cur = rhs1; + g = gimple_build_assign (t3, BIT_IOR_EXPR, t1, t2); + insert_before (g); + rhs1 = t3; + if (bf_next && i == 1) + { + g = gimple_build_assign (bf_next, bf_cur); + insert_before (g); + } + } + } + if (!done) + { + /* Handle bit-field access to partial last limb if needed. */ + if (nlhs + && i == cnt - 1 + && !separate_ext + && tree_fits_uhwi_p (idx)) + { + unsigned int tprec = TYPE_PRECISION (type); + unsigned int rprec = tprec % limb_prec; + if (rprec + bo_bit < (unsigned) limb_prec) + { + tree ftype + = build_nonstandard_integer_type (rprec + bo_bit, 1); + tree bfr = build3 (BIT_FIELD_REF, ftype, + unshare_expr (nlhs), + bitsize_int (rprec + bo_bit), + bitsize_int ((bo_idx + + tprec / limb_prec) + * limb_prec)); + tree t = add_cast (ftype, rhs1); + g = gimple_build_assign (bfr, t); + done = true; + bf_cur = NULL_TREE; + } + else if (rprec + bo_bit == (unsigned) limb_prec) + bf_cur = NULL_TREE; + } + /* Otherwise, stores to any other lhs. */ + if (!done) + { + tree l = limb_access (lhs_type, nlhs ? nlhs : lhs, + nidx, true); + g = gimple_build_assign (l, rhs1); + } + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_pad) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_pad, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } + if (new_bb) + m_gsi = gsi_after_labels (new_bb); + } + } + m_first = false; + if (kind == bitint_prec_huge && i <= 1) + { + if (i == 0) + { + idx = make_ssa_name (sizetype); + g = gimple_build_assign (idx, PLUS_EXPR, idx_first, + size_one_node); + insert_before (g); + } + else + { + g = gimple_build_assign (idx_next, PLUS_EXPR, idx_first, + size_int (2)); + insert_before (g); + g = gimple_build_cond (NE_EXPR, idx_next, size_int (end), + NULL_TREE, NULL_TREE); + insert_before (g); + if (eq_p) + m_gsi = gsi_after_labels (edge_bb); + else + m_gsi = gsi_for_stmt (stmt); + } + } + } + + if (separate_ext) + { + if (sext) + { + ext = add_cast (signed_type_for (m_limb_type), ext); + tree lpm1 = build_int_cst (unsigned_type_node, + limb_prec - 1); + tree n = make_ssa_name (TREE_TYPE (ext)); + g = gimple_build_assign (n, RSHIFT_EXPR, ext, lpm1); + insert_before (g); + ext = add_cast (m_limb_type, n); + } + else + ext = build_zero_cst (m_limb_type); + kind = bitint_precision_kind (type); + unsigned start = CEIL (prec, limb_prec); + prec = TYPE_PRECISION (type); + idx = idx_first = idx_next = NULL_TREE; + if (prec <= (start + 2 + (bo_bit != 0)) * limb_prec) + kind = bitint_prec_large; + if (kind == bitint_prec_large) + cnt = CEIL (prec, limb_prec) - start; + else + { + rem = prec % limb_prec; + end = (prec - rem) / limb_prec; + cnt = (bo_bit != 0) + 1 + (rem != 0); + } + for (unsigned i = 0; i < cnt; i++) + { + if (kind == bitint_prec_large || (i == 0 && bo_bit != 0)) + idx = size_int (start + i); + else if (i == cnt - 1) + idx = size_int (end); + else if (i == (bo_bit != 0)) + idx = create_loop (size_int (start + i), &idx_next); + rhs1 = ext; + if (bf_cur != NULL_TREE && bf_cur != ext) + { + tree t1 = make_ssa_name (m_limb_type); + g = gimple_build_assign (t1, RSHIFT_EXPR, bf_cur, + build_int_cst (unsigned_type_node, + limb_prec - bo_bit)); + insert_before (g); + if (integer_zerop (ext)) + rhs1 = t1; + else + { + tree t2 = make_ssa_name (m_limb_type); + rhs1 = make_ssa_name (m_limb_type); + g = gimple_build_assign (t2, LSHIFT_EXPR, ext, + build_int_cst (unsigned_type_node, + bo_bit)); + insert_before (g); + g = gimple_build_assign (rhs1, BIT_IOR_EXPR, t1, t2); + insert_before (g); + } + bf_cur = ext; + } + tree nidx = idx; + if (bo_idx) + { + if (tree_fits_uhwi_p (idx)) + nidx = size_int (tree_to_uhwi (idx) + bo_idx); + else + { + nidx = make_ssa_name (sizetype); + g = gimple_build_assign (nidx, PLUS_EXPR, idx, + size_int (bo_idx)); + insert_before (g); + } + } + bool done = false; + /* Handle bit-field access to partial last limb if needed. */ + if (nlhs && i == cnt - 1) + { + unsigned int tprec = TYPE_PRECISION (type); + unsigned int rprec = tprec % limb_prec; + if (rprec + bo_bit < (unsigned) limb_prec) + { + tree ftype + = build_nonstandard_integer_type (rprec + bo_bit, 1); + tree bfr = build3 (BIT_FIELD_REF, ftype, + unshare_expr (nlhs), + bitsize_int (rprec + bo_bit), + bitsize_int ((bo_idx + tprec / limb_prec) + * limb_prec)); + tree t = add_cast (ftype, rhs1); + g = gimple_build_assign (bfr, t); + done = true; + bf_cur = NULL_TREE; + } + else if (rprec + bo_bit == (unsigned) limb_prec) + bf_cur = NULL_TREE; + } + /* Otherwise, stores to any other lhs. */ + if (!done) + { + tree l = limb_access (lhs_type, nlhs ? nlhs : lhs, nidx, true); + g = gimple_build_assign (l, rhs1); + } + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_pad) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_pad, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } + if (kind == bitint_prec_huge && i == (bo_bit != 0)) + { + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, + size_one_node); + insert_before (g); + g = gimple_build_cond (NE_EXPR, idx_next, size_int (end), + NULL_TREE, NULL_TREE); + insert_before (g); + m_gsi = gsi_for_stmt (stmt); + } + } + } + if (bf_cur != NULL_TREE) + { + unsigned int tprec = TYPE_PRECISION (type); + unsigned int rprec = tprec % limb_prec; + tree ftype = build_nonstandard_integer_type (rprec + bo_bit, 1); + tree bfr = build3 (BIT_FIELD_REF, ftype, unshare_expr (nlhs), + bitsize_int (rprec + bo_bit), + bitsize_int ((bo_idx + tprec / limb_prec) + * limb_prec)); + rhs1 = bf_cur; + if (bf_cur != ext) + { + rhs1 = make_ssa_name (TREE_TYPE (rhs1)); + g = gimple_build_assign (rhs1, RSHIFT_EXPR, bf_cur, + build_int_cst (unsigned_type_node, + limb_prec - bo_bit)); + insert_before (g); + } + rhs1 = add_cast (ftype, rhs1); + g = gimple_build_assign (bfr, rhs1); + insert_before (g); + if (eh) + { + maybe_duplicate_eh_stmt (g, stmt); + if (eh_pad) + { + edge e = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e->dest); + make_edge (e->src, eh_pad, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } + } + + if (gimple_store_p (stmt)) + { + unlink_stmt_vdef (stmt); + release_ssa_name (gimple_vdef (stmt)); + gsi_remove (&m_gsi, true); + } + if (eq_p) + { + lhs = make_ssa_name (boolean_type_node); + basic_block bb = gimple_bb (stmt); + gphi *phi = create_phi_node (lhs, bb); + edge e = find_edge (gsi_bb (m_gsi), bb); + unsigned int n = EDGE_COUNT (bb->preds); + for (unsigned int i = 0; i < n; i++) + { + edge e2 = EDGE_PRED (bb, i); + add_phi_arg (phi, e == e2 ? boolean_true_node : boolean_false_node, + e2, UNKNOWN_LOCATION); + } + cmp_code = cmp_code == EQ_EXPR ? NE_EXPR : EQ_EXPR; + return lhs; + } + else + return NULL_TREE; +} + +/* Handle a large/huge _BitInt comparison statement STMT other than + EQ_EXPR/NE_EXPR. CMP_CODE, CMP_OP1 and CMP_OP2 meaning is like in + lower_mergeable_stmt. The {GT,GE,LT,LE}_EXPR comparisons are + lowered by iteration from the most significant limb downwards to + the least significant one, for large _BitInt in straight line code, + otherwise with most significant limb handled in + straight line code followed by a loop handling one limb at a time. + Comparisons with unsigned huge _BitInt with precisions which are + multiples of limb precision can use just the loop and don't need to + handle most significant limb before the loop. The loop or straight + line code jumps to final basic block if a particular pair of limbs + is not equal. */ + +tree +bitint_large_huge::lower_comparison_stmt (gimple *stmt, tree_code &cmp_code, + tree cmp_op1, tree cmp_op2) +{ + tree type = TREE_TYPE (cmp_op1); + gcc_assert (TREE_CODE (type) == BITINT_TYPE); + bitint_prec_kind kind = bitint_precision_kind (type); + gcc_assert (kind >= bitint_prec_large); + gimple *g; + if (!TYPE_UNSIGNED (type) + && integer_zerop (cmp_op2) + && (cmp_code == GE_EXPR || cmp_code == LT_EXPR)) + { + unsigned end = CEIL ((unsigned) TYPE_PRECISION (type), limb_prec) - 1; + tree idx = size_int (end); + m_data_cnt = 0; + tree rhs1 = handle_operand (cmp_op1, idx); + if (TYPE_UNSIGNED (TREE_TYPE (rhs1))) + { + tree stype = signed_type_for (TREE_TYPE (rhs1)); + rhs1 = add_cast (stype, rhs1); + } + tree lhs = make_ssa_name (boolean_type_node); + g = gimple_build_assign (lhs, cmp_code, rhs1, + build_zero_cst (TREE_TYPE (rhs1))); + insert_before (g); + cmp_code = NE_EXPR; + return lhs; + } + + unsigned cnt, rem = 0, end = 0; + tree idx = NULL_TREE, idx_next = NULL_TREE; + if (kind == bitint_prec_large) + cnt = CEIL ((unsigned) TYPE_PRECISION (type), limb_prec); + else + { + rem = ((unsigned) TYPE_PRECISION (type) % limb_prec); + if (rem == 0 && !TYPE_UNSIGNED (type)) + rem = limb_prec; + end = ((unsigned) TYPE_PRECISION (type) - rem) / limb_prec; + cnt = 1 + (rem != 0); + } + + basic_block edge_bb = NULL; + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + gsi_prev (&gsi); + edge e = split_block (gsi_bb (gsi), gsi_stmt (gsi)); + edge_bb = e->src; + m_gsi = gsi_last_bb (edge_bb); + if (!gsi_end_p (m_gsi)) + gsi_next (&m_gsi); + + edge *edges = XALLOCAVEC (edge, cnt * 2); + for (unsigned i = 0; i < cnt; i++) + { + m_data_cnt = 0; + if (kind == bitint_prec_large) + idx = size_int (cnt - i - 1); + else if (i == cnt - 1) + idx = create_loop (size_int (end - 1), &idx_next); + else + idx = size_int (end); + tree rhs1 = handle_operand (cmp_op1, idx); + tree rhs2 = handle_operand (cmp_op2, idx); + if (i == 0 + && !TYPE_UNSIGNED (type) + && TYPE_UNSIGNED (TREE_TYPE (rhs1))) + { + tree stype = signed_type_for (TREE_TYPE (rhs1)); + rhs1 = add_cast (stype, rhs1); + rhs2 = add_cast (stype, rhs2); + } + g = gimple_build_cond (GT_EXPR, rhs1, rhs2, NULL_TREE, NULL_TREE); + insert_before (g); + edge e1 = split_block (gsi_bb (m_gsi), g); + e1->flags = EDGE_FALSE_VALUE; + edge e2 = make_edge (e1->src, gimple_bb (stmt), EDGE_TRUE_VALUE); + e1->probability = profile_probability::likely (); + e2->probability = e1->probability.invert (); + if (i == 0) + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e2->src); + m_gsi = gsi_after_labels (e1->dest); + edges[2 * i] = e2; + g = gimple_build_cond (LT_EXPR, rhs1, rhs2, NULL_TREE, NULL_TREE); + insert_before (g); + e1 = split_block (gsi_bb (m_gsi), g); + e1->flags = EDGE_FALSE_VALUE; + e2 = make_edge (e1->src, gimple_bb (stmt), EDGE_TRUE_VALUE); + e1->probability = profile_probability::unlikely (); + e2->probability = e1->probability.invert (); + m_gsi = gsi_after_labels (e1->dest); + edges[2 * i + 1] = e2; + m_first = false; + if (kind == bitint_prec_huge && i == cnt - 1) + { + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_int (-1)); + insert_before (g); + g = gimple_build_cond (NE_EXPR, idx, size_zero_node, + NULL_TREE, NULL_TREE); + insert_before (g); + edge true_edge, false_edge; + extract_true_false_edges_from_block (gsi_bb (m_gsi), + &true_edge, &false_edge); + m_gsi = gsi_after_labels (false_edge->dest); + } + } + + tree lhs = make_ssa_name (boolean_type_node); + basic_block bb = gimple_bb (stmt); + gphi *phi = create_phi_node (lhs, bb); + for (unsigned int i = 0; i < cnt * 2; i++) + { + tree val = ((cmp_code == GT_EXPR || cmp_code == GE_EXPR) + ^ (i & 1)) ? boolean_true_node : boolean_false_node; + add_phi_arg (phi, val, edges[i], UNKNOWN_LOCATION); + } + add_phi_arg (phi, (cmp_code == GE_EXPR || cmp_code == LE_EXPR) + ? boolean_true_node : boolean_false_node, + find_edge (gsi_bb (m_gsi), bb), UNKNOWN_LOCATION); + cmp_code = NE_EXPR; + return lhs; +} + +/* Lower large/huge _BitInt left and right shift except for left + shift by < limb_prec constant. */ + +void +bitint_large_huge::lower_shift_stmt (tree obj, gimple *stmt) +{ + tree rhs1 = gimple_assign_rhs1 (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree_code rhs_code = gimple_assign_rhs_code (stmt); + tree type = TREE_TYPE (rhs1); + gimple *final_stmt = gsi_stmt (m_gsi); + gcc_assert (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large); + int prec = TYPE_PRECISION (type); + tree n = gimple_assign_rhs2 (stmt), n1, n2, n3, n4; + gimple *g; + if (obj == NULL_TREE) + { + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + } + /* Preparation code common for both left and right shifts. + unsigned n1 = n % limb_prec; + size_t n2 = n / limb_prec; + size_t n3 = n1 != 0; + unsigned n4 = (limb_prec - n1) % limb_prec; + (for power of 2 limb_prec n4 can be -n1 & (limb_prec)). */ + if (TREE_CODE (n) == INTEGER_CST) + { + tree lp = build_int_cst (TREE_TYPE (n), limb_prec); + n1 = int_const_binop (TRUNC_MOD_EXPR, n, lp); + n2 = fold_convert (sizetype, int_const_binop (TRUNC_DIV_EXPR, n, lp)); + n3 = size_int (!integer_zerop (n1)); + n4 = int_const_binop (TRUNC_MOD_EXPR, + int_const_binop (MINUS_EXPR, lp, n1), lp); + } + else + { + n1 = make_ssa_name (TREE_TYPE (n)); + n2 = make_ssa_name (sizetype); + n3 = make_ssa_name (sizetype); + n4 = make_ssa_name (TREE_TYPE (n)); + if (pow2p_hwi (limb_prec)) + { + tree lpm1 = build_int_cst (TREE_TYPE (n), limb_prec - 1); + g = gimple_build_assign (n1, BIT_AND_EXPR, n, lpm1); + insert_before (g); + g = gimple_build_assign (useless_type_conversion_p (sizetype, + TREE_TYPE (n)) + ? n2 : make_ssa_name (TREE_TYPE (n)), + RSHIFT_EXPR, n, + build_int_cst (TREE_TYPE (n), + exact_log2 (limb_prec))); + insert_before (g); + if (gimple_assign_lhs (g) != n2) + { + g = gimple_build_assign (n2, NOP_EXPR, gimple_assign_lhs (g)); + insert_before (g); + } + g = gimple_build_assign (make_ssa_name (TREE_TYPE (n)), + NEGATE_EXPR, n1); + insert_before (g); + g = gimple_build_assign (n4, BIT_AND_EXPR, gimple_assign_lhs (g), + lpm1); + insert_before (g); + } + else + { + tree lp = build_int_cst (TREE_TYPE (n), limb_prec); + g = gimple_build_assign (n1, TRUNC_MOD_EXPR, n, lp); + insert_before (g); + g = gimple_build_assign (useless_type_conversion_p (sizetype, + TREE_TYPE (n)) + ? n2 : make_ssa_name (TREE_TYPE (n)), + TRUNC_DIV_EXPR, n, lp); + insert_before (g); + if (gimple_assign_lhs (g) != n2) + { + g = gimple_build_assign (n2, NOP_EXPR, gimple_assign_lhs (g)); + insert_before (g); + } + g = gimple_build_assign (make_ssa_name (TREE_TYPE (n)), + MINUS_EXPR, lp, n1); + insert_before (g); + g = gimple_build_assign (n4, TRUNC_MOD_EXPR, gimple_assign_lhs (g), + lp); + insert_before (g); + } + g = gimple_build_assign (make_ssa_name (boolean_type_node), NE_EXPR, n1, + build_zero_cst (TREE_TYPE (n))); + insert_before (g); + g = gimple_build_assign (n3, NOP_EXPR, gimple_assign_lhs (g)); + insert_before (g); + } + tree p = build_int_cst (sizetype, + prec / limb_prec - (prec % limb_prec == 0)); + if (rhs_code == RSHIFT_EXPR) + { + /* Lower + dst = src >> n; + as + unsigned n1 = n % limb_prec; + size_t n2 = n / limb_prec; + size_t n3 = n1 != 0; + unsigned n4 = (limb_prec - n1) % limb_prec; + size_t idx; + size_t p = prec / limb_prec - (prec % limb_prec == 0); + int signed_p = (typeof (src) -1) < 0; + for (idx = n2; idx < ((!signed_p && (prec % limb_prec == 0)) + ? p : p - n3); ++idx) + dst[idx - n2] = (src[idx] >> n1) | (src[idx + n3] << n4); + limb_type ext; + if (prec % limb_prec == 0) + ext = src[p]; + else if (signed_p) + ext = ((signed limb_type) (src[p] << (limb_prec + - (prec % limb_prec)))) + >> (limb_prec - (prec % limb_prec)); + else + ext = src[p] & (((limb_type) 1 << (prec % limb_prec)) - 1); + if (!signed_p && (prec % limb_prec == 0)) + ; + else if (idx < prec / 64) + { + dst[idx - n2] = (src[idx] >> n1) | (ext << n4); + ++idx; + } + idx -= n2; + if (signed_p) + { + dst[idx] = ((signed limb_type) ext) >> n1; + ext = ((signed limb_type) ext) >> (limb_prec - 1); + } + else + { + dst[idx] = ext >> n1; + ext = 0; + } + for (++idx; idx <= p; ++idx) + dst[idx] = ext; */ + tree pmn3; + if (TYPE_UNSIGNED (type) && prec % limb_prec == 0) + pmn3 = p; + else if (TREE_CODE (n3) == INTEGER_CST) + pmn3 = int_const_binop (MINUS_EXPR, p, n3); + else + { + pmn3 = make_ssa_name (sizetype); + g = gimple_build_assign (pmn3, MINUS_EXPR, p, n3); + insert_before (g); + } + g = gimple_build_cond (LT_EXPR, n2, pmn3, NULL_TREE, NULL_TREE); + edge edge_true, edge_false; + if_then (g, profile_probability::likely (), edge_true, edge_false); + tree idx_next; + tree idx = create_loop (n2, &idx_next); + tree idxmn2 = make_ssa_name (sizetype); + tree idxpn3 = make_ssa_name (sizetype); + g = gimple_build_assign (idxmn2, MINUS_EXPR, idx, n2); + insert_before (g); + g = gimple_build_assign (idxpn3, PLUS_EXPR, idx, n3); + insert_before (g); + m_data_cnt = 0; + tree t1 = handle_operand (rhs1, idx); + m_first = false; + g = gimple_build_assign (make_ssa_name (m_limb_type), + RSHIFT_EXPR, t1, n1); + insert_before (g); + t1 = gimple_assign_lhs (g); + if (!integer_zerop (n3)) + { + m_data_cnt = 0; + tree t2 = handle_operand (rhs1, idxpn3); + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, t2, n4); + insert_before (g); + t2 = gimple_assign_lhs (g); + g = gimple_build_assign (make_ssa_name (m_limb_type), + BIT_IOR_EXPR, t1, t2); + insert_before (g); + t1 = gimple_assign_lhs (g); + } + tree l = limb_access (TREE_TYPE (lhs), obj, idxmn2, true); + g = gimple_build_assign (l, t1); + insert_before (g); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_one_node); + insert_before (g); + g = gimple_build_cond (LT_EXPR, idx_next, pmn3, NULL_TREE, NULL_TREE); + insert_before (g); + idx = make_ssa_name (sizetype); + m_gsi = gsi_for_stmt (final_stmt); + gphi *phi = create_phi_node (idx, gsi_bb (m_gsi)); + edge_false = find_edge (edge_false->src, gsi_bb (m_gsi)); + edge_true = EDGE_PRED (gsi_bb (m_gsi), + EDGE_PRED (gsi_bb (m_gsi), 0) == edge_false); + add_phi_arg (phi, n2, edge_false, UNKNOWN_LOCATION); + add_phi_arg (phi, idx_next, edge_true, UNKNOWN_LOCATION); + m_data_cnt = 0; + tree ms = handle_operand (rhs1, p); + tree ext = ms; + if (!types_compatible_p (TREE_TYPE (ms), m_limb_type)) + ext = add_cast (m_limb_type, ms); + if (!(TYPE_UNSIGNED (type) && prec % limb_prec == 0) + && !integer_zerop (n3)) + { + g = gimple_build_cond (LT_EXPR, idx, p, NULL_TREE, NULL_TREE); + if_then (g, profile_probability::likely (), edge_true, edge_false); + m_data_cnt = 0; + t1 = handle_operand (rhs1, idx); + g = gimple_build_assign (make_ssa_name (m_limb_type), + RSHIFT_EXPR, t1, n1); + insert_before (g); + t1 = gimple_assign_lhs (g); + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, ext, n4); + insert_before (g); + tree t2 = gimple_assign_lhs (g); + g = gimple_build_assign (make_ssa_name (m_limb_type), + BIT_IOR_EXPR, t1, t2); + insert_before (g); + t1 = gimple_assign_lhs (g); + idxmn2 = make_ssa_name (sizetype); + g = gimple_build_assign (idxmn2, MINUS_EXPR, idx, n2); + insert_before (g); + l = limb_access (TREE_TYPE (lhs), obj, idxmn2, true); + g = gimple_build_assign (l, t1); + insert_before (g); + idx_next = make_ssa_name (sizetype); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_one_node); + insert_before (g); + m_gsi = gsi_for_stmt (final_stmt); + tree nidx = make_ssa_name (sizetype); + phi = create_phi_node (nidx, gsi_bb (m_gsi)); + edge_false = find_edge (edge_false->src, gsi_bb (m_gsi)); + edge_true = EDGE_PRED (gsi_bb (m_gsi), + EDGE_PRED (gsi_bb (m_gsi), 0) == edge_false); + add_phi_arg (phi, idx, edge_false, UNKNOWN_LOCATION); + add_phi_arg (phi, idx_next, edge_true, UNKNOWN_LOCATION); + idx = nidx; + } + g = gimple_build_assign (make_ssa_name (sizetype), MINUS_EXPR, idx, n2); + insert_before (g); + idx = gimple_assign_lhs (g); + tree sext = ext; + if (!TYPE_UNSIGNED (type)) + sext = add_cast (signed_type_for (m_limb_type), ext); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (sext)), + RSHIFT_EXPR, sext, n1); + insert_before (g); + t1 = gimple_assign_lhs (g); + if (!TYPE_UNSIGNED (type)) + { + t1 = add_cast (m_limb_type, t1); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (sext)), + RSHIFT_EXPR, sext, + build_int_cst (TREE_TYPE (n), + limb_prec - 1)); + insert_before (g); + ext = add_cast (m_limb_type, gimple_assign_lhs (g)); + } + else + ext = build_zero_cst (m_limb_type); + l = limb_access (TREE_TYPE (lhs), obj, idx, true); + g = gimple_build_assign (l, t1); + insert_before (g); + g = gimple_build_assign (make_ssa_name (sizetype), PLUS_EXPR, idx, + size_one_node); + insert_before (g); + idx = gimple_assign_lhs (g); + g = gimple_build_cond (LE_EXPR, idx, p, NULL_TREE, NULL_TREE); + if_then (g, profile_probability::likely (), edge_true, edge_false); + idx = create_loop (idx, &idx_next); + l = limb_access (TREE_TYPE (lhs), obj, idx, true); + g = gimple_build_assign (l, ext); + insert_before (g); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_one_node); + insert_before (g); + g = gimple_build_cond (LE_EXPR, idx_next, p, NULL_TREE, NULL_TREE); + insert_before (g); + } + else + { + /* Lower + dst = src << n; + as + unsigned n1 = n % limb_prec; + size_t n2 = n / limb_prec; + size_t n3 = n1 != 0; + unsigned n4 = (limb_prec - n1) % limb_prec; + size_t idx; + size_t p = prec / limb_prec - (prec % limb_prec == 0); + for (idx = p; (ssize_t) idx >= (ssize_t) (n2 + n3); --idx) + dst[idx] = (src[idx - n2] << n1) | (src[idx - n2 - n3] >> n4); + if (n1) + { + dst[idx] = src[idx - n2] << n1; + --idx; + } + for (; (ssize_t) idx >= 0; --idx) + dst[idx] = 0; */ + tree n2pn3; + if (TREE_CODE (n2) == INTEGER_CST && TREE_CODE (n3) == INTEGER_CST) + n2pn3 = int_const_binop (PLUS_EXPR, n2, n3); + else + { + n2pn3 = make_ssa_name (sizetype); + g = gimple_build_assign (n2pn3, PLUS_EXPR, n2, n3); + insert_before (g); + } + /* For LSHIFT_EXPR, we can use handle_operand with non-INTEGER_CST + idx even to access the most significant partial limb. */ + m_var_msb = true; + if (integer_zerop (n3)) + /* For n3 == 0 p >= n2 + n3 is always true for all valid shift + counts. Emit if (true) condition that can be optimized later. */ + g = gimple_build_cond (NE_EXPR, boolean_true_node, boolean_false_node, + NULL_TREE, NULL_TREE); + else + g = gimple_build_cond (LE_EXPR, n2pn3, p, NULL_TREE, NULL_TREE); + edge edge_true, edge_false; + if_then (g, profile_probability::likely (), edge_true, edge_false); + tree idx_next; + tree idx = create_loop (p, &idx_next); + tree idxmn2 = make_ssa_name (sizetype); + tree idxmn2mn3 = make_ssa_name (sizetype); + g = gimple_build_assign (idxmn2, MINUS_EXPR, idx, n2); + insert_before (g); + g = gimple_build_assign (idxmn2mn3, MINUS_EXPR, idxmn2, n3); + insert_before (g); + m_data_cnt = 0; + tree t1 = handle_operand (rhs1, idxmn2); + m_first = false; + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, t1, n1); + insert_before (g); + t1 = gimple_assign_lhs (g); + if (!integer_zerop (n3)) + { + m_data_cnt = 0; + tree t2 = handle_operand (rhs1, idxmn2mn3); + g = gimple_build_assign (make_ssa_name (m_limb_type), + RSHIFT_EXPR, t2, n4); + insert_before (g); + t2 = gimple_assign_lhs (g); + g = gimple_build_assign (make_ssa_name (m_limb_type), + BIT_IOR_EXPR, t1, t2); + insert_before (g); + t1 = gimple_assign_lhs (g); + } + tree l = limb_access (TREE_TYPE (lhs), obj, idx, true); + g = gimple_build_assign (l, t1); + insert_before (g); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_int (-1)); + insert_before (g); + tree sn2pn3 = add_cast (ssizetype, n2pn3); + g = gimple_build_cond (GE_EXPR, add_cast (ssizetype, idx_next), sn2pn3, + NULL_TREE, NULL_TREE); + insert_before (g); + idx = make_ssa_name (sizetype); + m_gsi = gsi_for_stmt (final_stmt); + gphi *phi = create_phi_node (idx, gsi_bb (m_gsi)); + edge_false = find_edge (edge_false->src, gsi_bb (m_gsi)); + edge_true = EDGE_PRED (gsi_bb (m_gsi), + EDGE_PRED (gsi_bb (m_gsi), 0) == edge_false); + add_phi_arg (phi, p, edge_false, UNKNOWN_LOCATION); + add_phi_arg (phi, idx_next, edge_true, UNKNOWN_LOCATION); + m_data_cnt = 0; + if (!integer_zerop (n3)) + { + g = gimple_build_cond (NE_EXPR, n3, size_zero_node, + NULL_TREE, NULL_TREE); + if_then (g, profile_probability::likely (), edge_true, edge_false); + idxmn2 = make_ssa_name (sizetype); + g = gimple_build_assign (idxmn2, MINUS_EXPR, idx, n2); + insert_before (g); + m_data_cnt = 0; + t1 = handle_operand (rhs1, idxmn2); + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, t1, n1); + insert_before (g); + t1 = gimple_assign_lhs (g); + l = limb_access (TREE_TYPE (lhs), obj, idx, true); + g = gimple_build_assign (l, t1); + insert_before (g); + idx_next = make_ssa_name (sizetype); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_int (-1)); + insert_before (g); + m_gsi = gsi_for_stmt (final_stmt); + tree nidx = make_ssa_name (sizetype); + phi = create_phi_node (nidx, gsi_bb (m_gsi)); + edge_false = find_edge (edge_false->src, gsi_bb (m_gsi)); + edge_true = EDGE_PRED (gsi_bb (m_gsi), + EDGE_PRED (gsi_bb (m_gsi), 0) == edge_false); + add_phi_arg (phi, idx, edge_false, UNKNOWN_LOCATION); + add_phi_arg (phi, idx_next, edge_true, UNKNOWN_LOCATION); + idx = nidx; + } + g = gimple_build_cond (GE_EXPR, add_cast (ssizetype, idx), + ssize_int (0), NULL_TREE, NULL_TREE); + if_then (g, profile_probability::likely (), edge_true, edge_false); + idx = create_loop (idx, &idx_next); + l = limb_access (TREE_TYPE (lhs), obj, idx, true); + g = gimple_build_assign (l, build_zero_cst (m_limb_type)); + insert_before (g); + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, size_int (-1)); + insert_before (g); + g = gimple_build_cond (GE_EXPR, add_cast (ssizetype, idx_next), + ssize_int (0), NULL_TREE, NULL_TREE); + insert_before (g); + } +} + +/* Lower large/huge _BitInt multiplication or division. */ + +void +bitint_large_huge::lower_muldiv_stmt (tree obj, gimple *stmt) +{ + tree rhs1 = gimple_assign_rhs1 (stmt); + tree rhs2 = gimple_assign_rhs2 (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree_code rhs_code = gimple_assign_rhs_code (stmt); + tree type = TREE_TYPE (rhs1); + gcc_assert (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large); + int prec = TYPE_PRECISION (type), prec1, prec2; + rhs1 = handle_operand_addr (rhs1, stmt, NULL, &prec1); + rhs2 = handle_operand_addr (rhs2, stmt, NULL, &prec2); + if (obj == NULL_TREE) + { + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + lhs = build_fold_addr_expr (obj); + } + else + { + lhs = build_fold_addr_expr (obj); + lhs = force_gimple_operand_gsi (&m_gsi, lhs, true, + NULL_TREE, true, GSI_SAME_STMT); + } + tree sitype = lang_hooks.types.type_for_mode (SImode, 0); + gimple *g; + switch (rhs_code) + { + case MULT_EXPR: + g = gimple_build_call_internal (IFN_MULBITINT, 6, + lhs, build_int_cst (sitype, prec), + rhs1, build_int_cst (sitype, prec1), + rhs2, build_int_cst (sitype, prec2)); + insert_before (g); + break; + case TRUNC_DIV_EXPR: + g = gimple_build_call_internal (IFN_DIVMODBITINT, 8, + lhs, build_int_cst (sitype, prec), + null_pointer_node, + build_int_cst (sitype, 0), + rhs1, build_int_cst (sitype, prec1), + rhs2, build_int_cst (sitype, prec2)); + if (!stmt_ends_bb_p (stmt)) + gimple_call_set_nothrow (as_a (g), true); + insert_before (g); + break; + case TRUNC_MOD_EXPR: + g = gimple_build_call_internal (IFN_DIVMODBITINT, 8, null_pointer_node, + build_int_cst (sitype, 0), + lhs, build_int_cst (sitype, prec), + rhs1, build_int_cst (sitype, prec1), + rhs2, build_int_cst (sitype, prec2)); + if (!stmt_ends_bb_p (stmt)) + gimple_call_set_nothrow (as_a (g), true); + insert_before (g); + break; + default: + gcc_unreachable (); + } + if (stmt_ends_bb_p (stmt)) + { + maybe_duplicate_eh_stmt (g, stmt); + edge e1; + edge_iterator ei; + basic_block bb = gimple_bb (stmt); + + FOR_EACH_EDGE (e1, ei, bb->succs) + if (e1->flags & EDGE_EH) + break; + if (e1) + { + edge e2 = split_block (gsi_bb (m_gsi), g); + m_gsi = gsi_after_labels (e2->dest); + make_edge (e2->src, e1->dest, EDGE_EH)->probability + = profile_probability::very_unlikely (); + } + } +} + +/* Lower large/huge _BitInt conversion to/from floating point. */ + +void +bitint_large_huge::lower_float_conv_stmt (tree obj, gimple *stmt) +{ + tree rhs1 = gimple_assign_rhs1 (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree_code rhs_code = gimple_assign_rhs_code (stmt); + tree sitype = lang_hooks.types.type_for_mode (SImode, 0); + gimple *g; + if (rhs_code == FIX_TRUNC_EXPR) + { + int prec = TYPE_PRECISION (TREE_TYPE (lhs)); + if (!TYPE_UNSIGNED (TREE_TYPE (lhs))) + prec = -prec; + if (obj == NULL_TREE) + { + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + lhs = build_fold_addr_expr (obj); + } + else + { + lhs = build_fold_addr_expr (obj); + lhs = force_gimple_operand_gsi (&m_gsi, lhs, true, + NULL_TREE, true, GSI_SAME_STMT); + } + scalar_mode from_mode + = as_a (TYPE_MODE (TREE_TYPE (rhs1))); +#ifdef HAVE_SFmode + /* IEEE single is a full superset of both IEEE half and + bfloat formats, convert to float first and then to _BitInt + to avoid the need of another 2 library routines. */ + if ((REAL_MODE_FORMAT (from_mode) == &arm_bfloat_half_format + || REAL_MODE_FORMAT (from_mode) == &ieee_half_format) + && REAL_MODE_FORMAT (SFmode) == &ieee_single_format) + { + tree type = lang_hooks.types.type_for_mode (SFmode, 0); + if (type) + rhs1 = add_cast (type, rhs1); + } +#endif + g = gimple_build_call_internal (IFN_FLOATTOBITINT, 3, + lhs, build_int_cst (sitype, prec), + rhs1); + insert_before (g); + } + else + { + int prec; + rhs1 = handle_operand_addr (rhs1, stmt, NULL, &prec); + g = gimple_build_call_internal (IFN_BITINTTOFLOAT, 2, + rhs1, build_int_cst (sitype, prec)); + gimple_call_set_lhs (g, lhs); + if (!stmt_ends_bb_p (stmt)) + gimple_call_set_nothrow (as_a (g), true); + gsi_replace (&m_gsi, g, true); + } +} + +/* Helper method for lower_addsub_overflow and lower_mul_overflow. + If check_zero is true, caller wants to check if all bits in [start, end) + are zero, otherwise if bits in [start, end) are either all zero or + all ones. L is the limb with index LIMB, START and END are measured + in bits. */ + +tree +bitint_large_huge::arith_overflow_extract_bits (unsigned int start, + unsigned int end, tree l, + unsigned int limb, + bool check_zero) +{ + unsigned startlimb = start / limb_prec; + unsigned endlimb = (end - 1) / limb_prec; + gimple *g; + + if ((start % limb_prec) == 0 && (end % limb_prec) == 0) + return l; + if (startlimb == endlimb && limb == startlimb) + { + if (check_zero) + { + wide_int w = wi::shifted_mask (start % limb_prec, + end - start, false, limb_prec); + g = gimple_build_assign (make_ssa_name (m_limb_type), + BIT_AND_EXPR, l, + wide_int_to_tree (m_limb_type, w)); + insert_before (g); + return gimple_assign_lhs (g); + } + unsigned int shift = start % limb_prec; + if ((end % limb_prec) != 0) + { + unsigned int lshift = (-end) % limb_prec; + shift += lshift; + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, l, + build_int_cst (unsigned_type_node, + lshift)); + insert_before (g); + l = gimple_assign_lhs (g); + } + l = add_cast (signed_type_for (m_limb_type), l); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (l)), + RSHIFT_EXPR, l, + build_int_cst (unsigned_type_node, shift)); + insert_before (g); + return add_cast (m_limb_type, gimple_assign_lhs (g)); + } + else if (limb == startlimb) + { + if ((start % limb_prec) == 0) + return l; + if (!check_zero) + l = add_cast (signed_type_for (m_limb_type), l); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (l)), + RSHIFT_EXPR, l, + build_int_cst (unsigned_type_node, + start % limb_prec)); + insert_before (g); + l = gimple_assign_lhs (g); + if (!check_zero) + l = add_cast (m_limb_type, l); + return l; + } + else if (limb == endlimb) + { + if ((end % limb_prec) == 0) + return l; + if (check_zero) + { + wide_int w = wi::mask (end % limb_prec, false, limb_prec); + g = gimple_build_assign (make_ssa_name (m_limb_type), + BIT_AND_EXPR, l, + wide_int_to_tree (m_limb_type, w)); + insert_before (g); + return gimple_assign_lhs (g); + } + unsigned int shift = (-end) % limb_prec; + g = gimple_build_assign (make_ssa_name (m_limb_type), + LSHIFT_EXPR, l, + build_int_cst (unsigned_type_node, shift)); + insert_before (g); + l = add_cast (signed_type_for (m_limb_type), gimple_assign_lhs (g)); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (l)), + RSHIFT_EXPR, l, + build_int_cst (unsigned_type_node, shift)); + insert_before (g); + return add_cast (m_limb_type, gimple_assign_lhs (g)); + } + return l; +} + +/* Helper method for lower_addsub_overflow and lower_mul_overflow. Store + result including overflow flag into the right locations. */ + +void +bitint_large_huge::finish_arith_overflow (tree var, tree obj, tree type, + tree ovf, tree lhs, tree orig_obj, + gimple *stmt, tree_code code) +{ + gimple *g; + + if (obj == NULL_TREE + && (TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) < bitint_prec_large)) + { + /* Add support for 3 or more limbs filled in from normal integral + type if this assert fails. If no target chooses limb mode smaller + than half of largest supported normal integral type, this will not + be needed. */ + gcc_assert (TYPE_PRECISION (type) <= 2 * limb_prec); + tree lhs_type = type; + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) == bitint_prec_middle) + lhs_type = build_nonstandard_integer_type (TYPE_PRECISION (type), + TYPE_UNSIGNED (type)); + tree r1 = limb_access (NULL_TREE, var, size_int (0), true); + g = gimple_build_assign (make_ssa_name (m_limb_type), r1); + insert_before (g); + r1 = gimple_assign_lhs (g); + if (!useless_type_conversion_p (lhs_type, TREE_TYPE (r1))) + r1 = add_cast (lhs_type, r1); + if (TYPE_PRECISION (lhs_type) > limb_prec) + { + tree r2 = limb_access (NULL_TREE, var, size_int (1), true); + g = gimple_build_assign (make_ssa_name (m_limb_type), r2); + insert_before (g); + r2 = gimple_assign_lhs (g); + r2 = add_cast (lhs_type, r2); + g = gimple_build_assign (make_ssa_name (lhs_type), LSHIFT_EXPR, r2, + build_int_cst (unsigned_type_node, + limb_prec)); + insert_before (g); + g = gimple_build_assign (make_ssa_name (lhs_type), BIT_IOR_EXPR, r1, + gimple_assign_lhs (g)); + insert_before (g); + r1 = gimple_assign_lhs (g); + } + if (lhs_type != type) + r1 = add_cast (type, r1); + ovf = add_cast (lhs_type, ovf); + if (lhs_type != type) + ovf = add_cast (type, ovf); + g = gimple_build_assign (lhs, COMPLEX_EXPR, r1, ovf); + m_gsi = gsi_for_stmt (stmt); + gsi_replace (&m_gsi, g, true); + } + else + { + unsigned HOST_WIDE_INT nelts = 0; + tree atype = NULL_TREE; + if (obj) + { + nelts = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (obj))) / limb_prec; + if (orig_obj == NULL_TREE) + nelts >>= 1; + atype = build_array_type_nelts (m_limb_type, nelts); + } + if (var && obj) + { + tree v1, v2; + tree zero; + if (orig_obj == NULL_TREE) + { + zero = build_zero_cst (build_pointer_type (TREE_TYPE (obj))); + v1 = build2 (MEM_REF, atype, + build_fold_addr_expr (unshare_expr (obj)), zero); + } + else if (!useless_type_conversion_p (atype, TREE_TYPE (obj))) + v1 = build1 (VIEW_CONVERT_EXPR, atype, unshare_expr (obj)); + else + v1 = unshare_expr (obj); + zero = build_zero_cst (build_pointer_type (TREE_TYPE (var))); + v2 = build2 (MEM_REF, atype, build_fold_addr_expr (var), zero); + g = gimple_build_assign (v1, v2); + insert_before (g); + } + if (orig_obj == NULL_TREE && obj) + { + ovf = add_cast (m_limb_type, ovf); + tree l = limb_access (NULL_TREE, obj, size_int (nelts), true); + g = gimple_build_assign (l, ovf); + insert_before (g); + if (nelts > 1) + { + atype = build_array_type_nelts (m_limb_type, nelts - 1); + tree off = build_int_cst (build_pointer_type (TREE_TYPE (obj)), + (nelts + 1) * m_limb_size); + tree v1 = build2 (MEM_REF, atype, + build_fold_addr_expr (unshare_expr (obj)), + off); + g = gimple_build_assign (v1, build_zero_cst (atype)); + insert_before (g); + } + } + else if (TREE_CODE (TREE_TYPE (lhs)) == COMPLEX_TYPE) + { + imm_use_iterator ui; + use_operand_p use_p; + FOR_EACH_IMM_USE_FAST (use_p, ui, lhs) + { + g = USE_STMT (use_p); + if (!is_gimple_assign (g) + || gimple_assign_rhs_code (g) != IMAGPART_EXPR) + continue; + tree lhs2 = gimple_assign_lhs (g); + gimple *use_stmt; + single_imm_use (lhs2, &use_p, &use_stmt); + lhs2 = gimple_assign_lhs (use_stmt); + gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt); + if (useless_type_conversion_p (TREE_TYPE (lhs2), TREE_TYPE (ovf))) + g = gimple_build_assign (lhs2, ovf); + else + g = gimple_build_assign (lhs2, NOP_EXPR, ovf); + gsi_replace (&gsi, g, true); + break; + } + } + else if (ovf != boolean_false_node) + { + g = gimple_build_cond (NE_EXPR, ovf, boolean_false_node, + NULL_TREE, NULL_TREE); + edge edge_true, edge_false; + if_then (g, profile_probability::very_unlikely (), + edge_true, edge_false); + tree zero = build_zero_cst (TREE_TYPE (lhs)); + tree fn = ubsan_build_overflow_builtin (code, m_loc, + TREE_TYPE (lhs), + zero, zero, NULL); + force_gimple_operand_gsi (&m_gsi, fn, true, NULL_TREE, + true, GSI_SAME_STMT); + m_gsi = gsi_after_labels (edge_true->dest); + } + } + if (var) + { + tree clobber = build_clobber (TREE_TYPE (var), CLOBBER_EOL); + g = gimple_build_assign (var, clobber); + gsi_insert_after (&m_gsi, g, GSI_SAME_STMT); + } +} + +/* Helper function for lower_addsub_overflow and lower_mul_overflow. + Given precisions of result TYPE (PREC), argument 0 precision PREC0, + argument 1 precision PREC1 and minimum precision for the result + PREC2, compute *START, *END, *CHECK_ZERO and return OVF. */ + +static tree +arith_overflow (tree_code code, tree type, int prec, int prec0, int prec1, + int prec2, unsigned *start, unsigned *end, bool *check_zero) +{ + *start = 0; + *end = 0; + *check_zero = true; + /* Ignore this special rule for subtraction, even if both + prec0 >= 0 and prec1 >= 0, their subtraction can be negative + in infinite precision. */ + if (code != MINUS_EXPR && prec0 >= 0 && prec1 >= 0) + { + /* Result in [0, prec2) is unsigned, if prec > prec2, + all bits above it will be zero. */ + if ((prec - !TYPE_UNSIGNED (type)) >= prec2) + return boolean_false_node; + else + { + /* ovf if any of bits in [start, end) is non-zero. */ + *start = prec - !TYPE_UNSIGNED (type); + *end = prec2; + } + } + else if (TYPE_UNSIGNED (type)) + { + /* If result in [0, prec2) is signed and if prec > prec2, + all bits above it will be sign bit copies. */ + if (prec >= prec2) + { + /* ovf if bit prec - 1 is non-zero. */ + *start = prec - 1; + *end = prec; + } + else + { + /* ovf if any of bits in [start, end) is non-zero. */ + *start = prec; + *end = prec2; + } + } + else if (prec >= prec2) + return boolean_false_node; + else + { + /* ovf if [start, end) bits aren't all zeros or all ones. */ + *start = prec - 1; + *end = prec2; + *check_zero = false; + } + return NULL_TREE; +} + +/* Lower a .{ADD,SUB}_OVERFLOW call with at least one large/huge _BitInt + argument or return type _Complex large/huge _BitInt. */ + +void +bitint_large_huge::lower_addsub_overflow (tree obj, gimple *stmt) +{ + tree arg0 = gimple_call_arg (stmt, 0); + tree arg1 = gimple_call_arg (stmt, 1); + tree lhs = gimple_call_lhs (stmt); + gimple *g; + + if (!lhs) + { + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + gsi_remove (&gsi, true); + return; + } + gimple *final_stmt = gsi_stmt (m_gsi); + tree type = TREE_TYPE (lhs); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + int prec = TYPE_PRECISION (type); + int prec0 = range_to_prec (arg0, stmt); + int prec1 = range_to_prec (arg1, stmt); + int prec2 = ((prec0 < 0) == (prec1 < 0) + ? MAX (prec0 < 0 ? -prec0 : prec0, + prec1 < 0 ? -prec1 : prec1) + 1 + : MAX (prec0 < 0 ? -prec0 : prec0 + 1, + prec1 < 0 ? -prec1 : prec1 + 1) + 1); + int prec3 = MAX (prec0 < 0 ? -prec0 : prec0, + prec1 < 0 ? -prec1 : prec1); + prec3 = MAX (prec3, prec); + tree var = NULL_TREE; + tree orig_obj = obj; + if (obj == NULL_TREE + && TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large + && m_names + && bitmap_bit_p (m_names, SSA_NAME_VERSION (lhs))) + { + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + if (TREE_TYPE (lhs) == type) + orig_obj = obj; + } + if (TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) < bitint_prec_large) + { + unsigned HOST_WIDE_INT nelts = CEIL (prec, limb_prec); + tree atype = build_array_type_nelts (m_limb_type, nelts); + var = create_tmp_var (atype); + } + + enum tree_code code; + switch (gimple_call_internal_fn (stmt)) + { + case IFN_ADD_OVERFLOW: + case IFN_UBSAN_CHECK_ADD: + code = PLUS_EXPR; + break; + case IFN_SUB_OVERFLOW: + case IFN_UBSAN_CHECK_SUB: + code = MINUS_EXPR; + break; + default: + gcc_unreachable (); + } + unsigned start, end; + bool check_zero; + tree ovf = arith_overflow (code, type, prec, prec0, prec1, prec2, + &start, &end, &check_zero); + + unsigned startlimb, endlimb; + if (ovf) + { + startlimb = ~0U; + endlimb = ~0U; + } + else + { + startlimb = start / limb_prec; + endlimb = (end - 1) / limb_prec; + } + + int prec4 = ovf != NULL_TREE ? prec : prec3; + bitint_prec_kind kind = bitint_precision_kind (prec4); + unsigned cnt, rem = 0, fin = 0; + tree idx = NULL_TREE, idx_first = NULL_TREE, idx_next = NULL_TREE; + bool last_ovf = (ovf == NULL_TREE + && CEIL (prec2, limb_prec) > CEIL (prec3, limb_prec)); + if (kind != bitint_prec_huge) + cnt = CEIL (prec4, limb_prec) + last_ovf; + else + { + rem = (prec4 % (2 * limb_prec)); + fin = (prec4 - rem) / limb_prec; + cnt = 2 + CEIL (rem, limb_prec) + last_ovf; + idx = idx_first = create_loop (size_zero_node, &idx_next); + } + + if (kind == bitint_prec_huge) + m_upwards_2limb = fin; + m_upwards = true; + + tree type0 = TREE_TYPE (arg0); + tree type1 = TREE_TYPE (arg1); + if (TYPE_PRECISION (type0) < prec3) + { + type0 = build_bitint_type (prec3, TYPE_UNSIGNED (type0)); + if (TREE_CODE (arg0) == INTEGER_CST) + arg0 = fold_convert (type0, arg0); + } + if (TYPE_PRECISION (type1) < prec3) + { + type1 = build_bitint_type (prec3, TYPE_UNSIGNED (type1)); + if (TREE_CODE (arg1) == INTEGER_CST) + arg1 = fold_convert (type1, arg1); + } + unsigned int data_cnt = 0; + tree last_rhs1 = NULL_TREE, last_rhs2 = NULL_TREE; + tree cmp = build_zero_cst (m_limb_type); + unsigned prec_limbs = CEIL ((unsigned) prec, limb_prec); + tree ovf_out = NULL_TREE, cmp_out = NULL_TREE; + for (unsigned i = 0; i < cnt; i++) + { + m_data_cnt = 0; + tree rhs1, rhs2; + if (kind != bitint_prec_huge) + idx = size_int (i); + else if (i >= 2) + idx = size_int (fin + (i > 2)); + if (!last_ovf || i < cnt - 1) + { + if (type0 != TREE_TYPE (arg0)) + rhs1 = handle_cast (type0, arg0, idx); + else + rhs1 = handle_operand (arg0, idx); + if (type1 != TREE_TYPE (arg1)) + rhs2 = handle_cast (type1, arg1, idx); + else + rhs2 = handle_operand (arg1, idx); + if (i == 0) + data_cnt = m_data_cnt; + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (rhs1))) + rhs1 = add_cast (m_limb_type, rhs1); + if (!useless_type_conversion_p (m_limb_type, TREE_TYPE (rhs2))) + rhs2 = add_cast (m_limb_type, rhs2); + last_rhs1 = rhs1; + last_rhs2 = rhs2; + } + else + { + m_data_cnt = data_cnt; + if (TYPE_UNSIGNED (type0)) + rhs1 = build_zero_cst (m_limb_type); + else + { + rhs1 = add_cast (signed_type_for (m_limb_type), last_rhs1); + if (TREE_CODE (rhs1) == INTEGER_CST) + rhs1 = build_int_cst (m_limb_type, + tree_int_cst_sgn (rhs1) < 0 ? -1 : 0); + else + { + tree lpm1 = build_int_cst (unsigned_type_node, + limb_prec - 1); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rhs1)), + RSHIFT_EXPR, rhs1, lpm1); + insert_before (g); + rhs1 = add_cast (m_limb_type, gimple_assign_lhs (g)); + } + } + if (TYPE_UNSIGNED (type1)) + rhs2 = build_zero_cst (m_limb_type); + else + { + rhs2 = add_cast (signed_type_for (m_limb_type), last_rhs2); + if (TREE_CODE (rhs2) == INTEGER_CST) + rhs2 = build_int_cst (m_limb_type, + tree_int_cst_sgn (rhs2) < 0 ? -1 : 0); + else + { + tree lpm1 = build_int_cst (unsigned_type_node, + limb_prec - 1); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rhs2)), + RSHIFT_EXPR, rhs2, lpm1); + insert_before (g); + rhs2 = add_cast (m_limb_type, gimple_assign_lhs (g)); + } + } + } + tree rhs = handle_plus_minus (code, rhs1, rhs2, idx); + if (ovf != boolean_false_node) + { + if (tree_fits_uhwi_p (idx)) + { + unsigned limb = tree_to_uhwi (idx); + if (limb >= startlimb && limb <= endlimb) + { + tree l = arith_overflow_extract_bits (start, end, rhs, + limb, check_zero); + tree this_ovf = make_ssa_name (boolean_type_node); + if (ovf == NULL_TREE && !check_zero) + { + cmp = l; + g = gimple_build_assign (make_ssa_name (m_limb_type), + PLUS_EXPR, l, + build_int_cst (m_limb_type, 1)); + insert_before (g); + g = gimple_build_assign (this_ovf, GT_EXPR, + gimple_assign_lhs (g), + build_int_cst (m_limb_type, 1)); + } + else + g = gimple_build_assign (this_ovf, NE_EXPR, l, cmp); + insert_before (g); + if (ovf == NULL_TREE) + ovf = this_ovf; + else + { + tree b = make_ssa_name (boolean_type_node); + g = gimple_build_assign (b, BIT_IOR_EXPR, ovf, this_ovf); + insert_before (g); + ovf = b; + } + } + } + else if (startlimb < fin) + { + if (m_first && startlimb + 2 < fin) + { + tree data_out; + ovf = prepare_data_in_out (boolean_false_node, idx, &data_out); + ovf_out = m_data.pop (); + m_data.pop (); + if (!check_zero) + { + cmp = prepare_data_in_out (cmp, idx, &data_out); + cmp_out = m_data.pop (); + m_data.pop (); + } + } + if (i != 0 || startlimb != fin - 1) + { + tree_code cmp_code; + bool single_comparison + = (startlimb + 2 >= fin || (startlimb & 1) != (i & 1)); + if (!single_comparison) + { + cmp_code = GE_EXPR; + if (!check_zero && (start % limb_prec) == 0) + single_comparison = true; + } + else if ((startlimb & 1) == (i & 1)) + cmp_code = EQ_EXPR; + else + cmp_code = GT_EXPR; + g = gimple_build_cond (cmp_code, idx, size_int (startlimb), + NULL_TREE, NULL_TREE); + edge edge_true_true, edge_true_false, edge_false; + gimple *g2 = NULL; + if (!single_comparison) + g2 = gimple_build_cond (EQ_EXPR, idx, + size_int (startlimb), NULL_TREE, + NULL_TREE); + if_then_if_then_else (g, g2, profile_probability::likely (), + profile_probability::unlikely (), + edge_true_true, edge_true_false, + edge_false); + unsigned tidx = startlimb + (cmp_code == GT_EXPR); + tree l = arith_overflow_extract_bits (start, end, rhs, tidx, + check_zero); + tree this_ovf = make_ssa_name (boolean_type_node); + if (cmp_code != GT_EXPR && !check_zero) + { + g = gimple_build_assign (make_ssa_name (m_limb_type), + PLUS_EXPR, l, + build_int_cst (m_limb_type, 1)); + insert_before (g); + g = gimple_build_assign (this_ovf, GT_EXPR, + gimple_assign_lhs (g), + build_int_cst (m_limb_type, 1)); + } + else + g = gimple_build_assign (this_ovf, NE_EXPR, l, cmp); + insert_before (g); + if (cmp_code == GT_EXPR) + { + tree t = make_ssa_name (boolean_type_node); + g = gimple_build_assign (t, BIT_IOR_EXPR, ovf, this_ovf); + insert_before (g); + this_ovf = t; + } + tree this_ovf2 = NULL_TREE; + if (!single_comparison) + { + m_gsi = gsi_after_labels (edge_true_true->src); + tree t = make_ssa_name (boolean_type_node); + g = gimple_build_assign (t, NE_EXPR, rhs, cmp); + insert_before (g); + this_ovf2 = make_ssa_name (boolean_type_node); + g = gimple_build_assign (this_ovf2, BIT_IOR_EXPR, + ovf, t); + insert_before (g); + } + m_gsi = gsi_after_labels (edge_true_false->dest); + tree t; + if (i == 1 && ovf_out) + t = ovf_out; + else + t = make_ssa_name (boolean_type_node); + gphi *phi = create_phi_node (t, edge_true_false->dest); + add_phi_arg (phi, this_ovf, edge_true_false, + UNKNOWN_LOCATION); + add_phi_arg (phi, ovf ? ovf + : boolean_false_node, edge_false, + UNKNOWN_LOCATION); + if (edge_true_true) + add_phi_arg (phi, this_ovf2, edge_true_true, + UNKNOWN_LOCATION); + ovf = t; + if (!check_zero && cmp_code != GT_EXPR) + { + t = cmp_out ? cmp_out : make_ssa_name (m_limb_type); + phi = create_phi_node (t, edge_true_false->dest); + add_phi_arg (phi, l, edge_true_false, UNKNOWN_LOCATION); + add_phi_arg (phi, cmp, edge_false, UNKNOWN_LOCATION); + if (edge_true_true) + add_phi_arg (phi, cmp, edge_true_true, + UNKNOWN_LOCATION); + cmp = t; + } + } + } + } + + if (var || obj) + { + if (tree_fits_uhwi_p (idx) && tree_to_uhwi (idx) >= prec_limbs) + ; + else if (!tree_fits_uhwi_p (idx) + && (unsigned) prec < (fin - (i == 0)) * limb_prec) + { + bool single_comparison + = (((unsigned) prec % limb_prec) == 0 + || prec_limbs + 1 >= fin + || (prec_limbs & 1) == (i & 1)); + g = gimple_build_cond (LE_EXPR, idx, size_int (prec_limbs - 1), + NULL_TREE, NULL_TREE); + gimple *g2 = NULL; + if (!single_comparison) + g2 = gimple_build_cond (LT_EXPR, idx, + size_int (prec_limbs - 1), + NULL_TREE, NULL_TREE); + edge edge_true_true, edge_true_false, edge_false; + if_then_if_then_else (g, g2, profile_probability::likely (), + profile_probability::likely (), + edge_true_true, edge_true_false, + edge_false); + tree l = limb_access (type, var ? var : obj, idx, true); + g = gimple_build_assign (l, rhs); + insert_before (g); + if (!single_comparison) + { + m_gsi = gsi_after_labels (edge_true_true->src); + l = limb_access (type, var ? var : obj, + size_int (prec_limbs - 1), true); + if (!useless_type_conversion_p (TREE_TYPE (l), + TREE_TYPE (rhs))) + rhs = add_cast (TREE_TYPE (l), rhs); + g = gimple_build_assign (l, rhs); + insert_before (g); + } + m_gsi = gsi_after_labels (edge_true_false->dest); + } + else + { + tree l = limb_access (type, var ? var : obj, idx, true); + if (!useless_type_conversion_p (TREE_TYPE (l), TREE_TYPE (rhs))) + rhs = add_cast (TREE_TYPE (l), rhs); + g = gimple_build_assign (l, rhs); + insert_before (g); + } + } + m_first = false; + if (kind == bitint_prec_huge && i <= 1) + { + if (i == 0) + { + idx = make_ssa_name (sizetype); + g = gimple_build_assign (idx, PLUS_EXPR, idx_first, + size_one_node); + insert_before (g); + } + else + { + g = gimple_build_assign (idx_next, PLUS_EXPR, idx_first, + size_int (2)); + insert_before (g); + g = gimple_build_cond (NE_EXPR, idx_next, size_int (fin), + NULL_TREE, NULL_TREE); + insert_before (g); + m_gsi = gsi_for_stmt (final_stmt); + } + } + } + + finish_arith_overflow (var, obj, type, ovf, lhs, orig_obj, stmt, code); +} + +/* Lower a .MUL_OVERFLOW call with at least one large/huge _BitInt + argument or return type _Complex large/huge _BitInt. */ + +void +bitint_large_huge::lower_mul_overflow (tree obj, gimple *stmt) +{ + tree arg0 = gimple_call_arg (stmt, 0); + tree arg1 = gimple_call_arg (stmt, 1); + tree lhs = gimple_call_lhs (stmt); + if (!lhs) + { + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + gsi_remove (&gsi, true); + return; + } + gimple *final_stmt = gsi_stmt (m_gsi); + tree type = TREE_TYPE (lhs); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + int prec = TYPE_PRECISION (type), prec0, prec1; + arg0 = handle_operand_addr (arg0, stmt, NULL, &prec0); + arg1 = handle_operand_addr (arg1, stmt, NULL, &prec1); + int prec2 = ((prec0 < 0 ? -prec0 : prec0) + + (prec1 < 0 ? -prec1 : prec1) + + ((prec0 < 0) != (prec1 < 0))); + tree var = NULL_TREE; + tree orig_obj = obj; + bool force_var = false; + if (obj == NULL_TREE + && TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large + && m_names + && bitmap_bit_p (m_names, SSA_NAME_VERSION (lhs))) + { + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + if (TREE_TYPE (lhs) == type) + orig_obj = obj; + } + else if (obj != NULL_TREE && DECL_P (obj)) + { + for (int i = 0; i < 2; ++i) + { + tree arg = i ? arg1 : arg0; + if (TREE_CODE (arg) == ADDR_EXPR) + arg = TREE_OPERAND (arg, 0); + if (get_base_address (arg) == obj) + { + force_var = true; + break; + } + } + } + if (obj == NULL_TREE + || force_var + || TREE_CODE (type) != BITINT_TYPE + || bitint_precision_kind (type) < bitint_prec_large + || prec2 > (CEIL (prec, limb_prec) * limb_prec * (orig_obj ? 1 : 2))) + { + unsigned HOST_WIDE_INT nelts = CEIL (MAX (prec, prec2), limb_prec); + tree atype = build_array_type_nelts (m_limb_type, nelts); + var = create_tmp_var (atype); + } + tree addr = build_fold_addr_expr (var ? var : obj); + addr = force_gimple_operand_gsi (&m_gsi, addr, true, + NULL_TREE, true, GSI_SAME_STMT); + tree sitype = lang_hooks.types.type_for_mode (SImode, 0); + gimple *g + = gimple_build_call_internal (IFN_MULBITINT, 6, + addr, build_int_cst (sitype, + MAX (prec2, prec)), + arg0, build_int_cst (sitype, prec0), + arg1, build_int_cst (sitype, prec1)); + insert_before (g); + + unsigned start, end; + bool check_zero; + tree ovf = arith_overflow (MULT_EXPR, type, prec, prec0, prec1, prec2, + &start, &end, &check_zero); + if (ovf == NULL_TREE) + { + unsigned startlimb = start / limb_prec; + unsigned endlimb = (end - 1) / limb_prec; + unsigned cnt; + bool use_loop = false; + if (startlimb == endlimb) + cnt = 1; + else if (startlimb + 1 == endlimb) + cnt = 2; + else if ((end % limb_prec) == 0) + { + cnt = 2; + use_loop = true; + } + else + { + cnt = 3; + use_loop = startlimb + 2 < endlimb; + } + if (cnt == 1) + { + tree l = limb_access (NULL_TREE, var ? var : obj, + size_int (startlimb), true); + g = gimple_build_assign (make_ssa_name (m_limb_type), l); + insert_before (g); + l = arith_overflow_extract_bits (start, end, gimple_assign_lhs (g), + startlimb, check_zero); + ovf = make_ssa_name (boolean_type_node); + if (check_zero) + g = gimple_build_assign (ovf, NE_EXPR, l, + build_zero_cst (m_limb_type)); + else + { + g = gimple_build_assign (make_ssa_name (m_limb_type), + PLUS_EXPR, l, + build_int_cst (m_limb_type, 1)); + insert_before (g); + g = gimple_build_assign (ovf, GT_EXPR, gimple_assign_lhs (g), + build_int_cst (m_limb_type, 1)); + } + insert_before (g); + } + else + { + basic_block edge_bb = NULL; + gimple_stmt_iterator gsi = m_gsi; + gsi_prev (&gsi); + edge e = split_block (gsi_bb (gsi), gsi_stmt (gsi)); + edge_bb = e->src; + m_gsi = gsi_last_bb (edge_bb); + if (!gsi_end_p (m_gsi)) + gsi_next (&m_gsi); + + tree cmp = build_zero_cst (m_limb_type); + for (unsigned i = 0; i < cnt; i++) + { + tree idx, idx_next = NULL_TREE; + if (i == 0) + idx = size_int (startlimb); + else if (i == 2) + idx = size_int (endlimb); + else if (use_loop) + idx = create_loop (size_int (startlimb + 1), &idx_next); + else + idx = size_int (startlimb + 1); + tree l = limb_access (NULL_TREE, var ? var : obj, idx, true); + g = gimple_build_assign (make_ssa_name (m_limb_type), l); + insert_before (g); + l = gimple_assign_lhs (g); + if (i == 0 || i == 2) + l = arith_overflow_extract_bits (start, end, l, + tree_to_uhwi (idx), + check_zero); + if (i == 0 && !check_zero) + { + cmp = l; + g = gimple_build_assign (make_ssa_name (m_limb_type), + PLUS_EXPR, l, + build_int_cst (m_limb_type, 1)); + insert_before (g); + g = gimple_build_cond (GT_EXPR, gimple_assign_lhs (g), + build_int_cst (m_limb_type, 1), + NULL_TREE, NULL_TREE); + } + else + g = gimple_build_cond (NE_EXPR, l, cmp, NULL_TREE, NULL_TREE); + insert_before (g); + edge e1 = split_block (gsi_bb (m_gsi), g); + e1->flags = EDGE_FALSE_VALUE; + edge e2 = make_edge (e1->src, gimple_bb (final_stmt), + EDGE_TRUE_VALUE); + e1->probability = profile_probability::likely (); + e2->probability = e1->probability.invert (); + if (i == 0) + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e2->src); + m_gsi = gsi_after_labels (e1->dest); + if (i == 1 && use_loop) + { + g = gimple_build_assign (idx_next, PLUS_EXPR, idx, + size_one_node); + insert_before (g); + g = gimple_build_cond (NE_EXPR, idx_next, + size_int (endlimb + (cnt == 1)), + NULL_TREE, NULL_TREE); + insert_before (g); + edge true_edge, false_edge; + extract_true_false_edges_from_block (gsi_bb (m_gsi), + &true_edge, + &false_edge); + m_gsi = gsi_after_labels (false_edge->dest); + } + } + + ovf = make_ssa_name (boolean_type_node); + basic_block bb = gimple_bb (final_stmt); + gphi *phi = create_phi_node (ovf, bb); + edge e1 = find_edge (gsi_bb (m_gsi), bb); + edge_iterator ei; + FOR_EACH_EDGE (e, ei, bb->preds) + { + tree val = e == e1 ? boolean_false_node : boolean_true_node; + add_phi_arg (phi, val, e, UNKNOWN_LOCATION); + } + m_gsi = gsi_for_stmt (final_stmt); + } + } + + finish_arith_overflow (var, obj, type, ovf, lhs, orig_obj, stmt, MULT_EXPR); +} + +/* Lower REALPART_EXPR or IMAGPART_EXPR stmt extracting part of result from + .{ADD,SUB,MUL}_OVERFLOW call. */ + +void +bitint_large_huge::lower_cplxpart_stmt (tree obj, gimple *stmt) +{ + tree rhs1 = gimple_assign_rhs1 (stmt); + rhs1 = TREE_OPERAND (rhs1, 0); + if (obj == NULL_TREE) + { + int part = var_to_partition (m_map, gimple_assign_lhs (stmt)); + gcc_assert (m_vars[part] != NULL_TREE); + obj = m_vars[part]; + } + if (TREE_CODE (rhs1) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs1)))) + { + lower_call (obj, SSA_NAME_DEF_STMT (rhs1)); + return; + } + int part = var_to_partition (m_map, rhs1); + gcc_assert (m_vars[part] != NULL_TREE); + tree var = m_vars[part]; + unsigned HOST_WIDE_INT nelts + = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (obj))) / limb_prec; + tree atype = build_array_type_nelts (m_limb_type, nelts); + if (!useless_type_conversion_p (atype, TREE_TYPE (obj))) + obj = build1 (VIEW_CONVERT_EXPR, atype, obj); + tree off = build_int_cst (build_pointer_type (TREE_TYPE (var)), + gimple_assign_rhs_code (stmt) == REALPART_EXPR + ? 0 : nelts * m_limb_size); + tree v2 = build2 (MEM_REF, atype, build_fold_addr_expr (var), off); + gimple *g = gimple_build_assign (obj, v2); + insert_before (g); +} + +/* Lower COMPLEX_EXPR stmt. */ + +void +bitint_large_huge::lower_complexexpr_stmt (gimple *stmt) +{ + tree lhs = gimple_assign_lhs (stmt); + tree rhs1 = gimple_assign_rhs1 (stmt); + tree rhs2 = gimple_assign_rhs2 (stmt); + int part = var_to_partition (m_map, lhs); + gcc_assert (m_vars[part] != NULL_TREE); + lhs = m_vars[part]; + unsigned HOST_WIDE_INT nelts + = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (rhs1))) / limb_prec; + tree atype = build_array_type_nelts (m_limb_type, nelts); + tree zero = build_zero_cst (build_pointer_type (TREE_TYPE (lhs))); + tree v1 = build2 (MEM_REF, atype, build_fold_addr_expr (lhs), zero); + tree v2; + if (TREE_CODE (rhs1) == SSA_NAME) + { + part = var_to_partition (m_map, rhs1); + gcc_assert (m_vars[part] != NULL_TREE); + v2 = m_vars[part]; + } + else if (integer_zerop (rhs1)) + v2 = build_zero_cst (atype); + else + v2 = tree_output_constant_def (rhs1); + if (!useless_type_conversion_p (atype, TREE_TYPE (v2))) + v2 = build1 (VIEW_CONVERT_EXPR, atype, v2); + gimple *g = gimple_build_assign (v1, v2); + insert_before (g); + tree off = fold_convert (build_pointer_type (TREE_TYPE (lhs)), + TYPE_SIZE_UNIT (atype)); + v1 = build2 (MEM_REF, atype, build_fold_addr_expr (lhs), off); + if (TREE_CODE (rhs2) == SSA_NAME) + { + part = var_to_partition (m_map, rhs2); + gcc_assert (m_vars[part] != NULL_TREE); + v2 = m_vars[part]; + } + else if (integer_zerop (rhs2)) + v2 = build_zero_cst (atype); + else + v2 = tree_output_constant_def (rhs2); + if (!useless_type_conversion_p (atype, TREE_TYPE (v2))) + v2 = build1 (VIEW_CONVERT_EXPR, atype, v2); + g = gimple_build_assign (v1, v2); + insert_before (g); +} + +/* Lower a call statement with one or more large/huge _BitInt + arguments or large/huge _BitInt return value. */ + +void +bitint_large_huge::lower_call (tree obj, gimple *stmt) +{ + gimple_stmt_iterator gsi = gsi_for_stmt (stmt); + unsigned int nargs = gimple_call_num_args (stmt); + if (gimple_call_internal_p (stmt)) + switch (gimple_call_internal_fn (stmt)) + { + case IFN_ADD_OVERFLOW: + case IFN_SUB_OVERFLOW: + case IFN_UBSAN_CHECK_ADD: + case IFN_UBSAN_CHECK_SUB: + lower_addsub_overflow (obj, stmt); + return; + case IFN_MUL_OVERFLOW: + case IFN_UBSAN_CHECK_MUL: + lower_mul_overflow (obj, stmt); + return; + default: + break; + } + for (unsigned int i = 0; i < nargs; ++i) + { + tree arg = gimple_call_arg (stmt, i); + if (TREE_CODE (arg) != SSA_NAME + || TREE_CODE (TREE_TYPE (arg)) != BITINT_TYPE + || bitint_precision_kind (TREE_TYPE (arg)) <= bitint_prec_middle) + continue; + int p = var_to_partition (m_map, arg); + tree v = m_vars[p]; + gcc_assert (v != NULL_TREE); + if (!types_compatible_p (TREE_TYPE (arg), TREE_TYPE (v))) + v = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (arg), v); + arg = make_ssa_name (TREE_TYPE (arg)); + gimple *g = gimple_build_assign (arg, v); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_call_set_arg (stmt, i, arg); + if (m_preserved == NULL) + m_preserved = BITMAP_ALLOC (NULL); + bitmap_set_bit (m_preserved, SSA_NAME_VERSION (arg)); + } + tree lhs = gimple_call_lhs (stmt); + if (lhs + && TREE_CODE (lhs) == SSA_NAME + && TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (lhs)) >= bitint_prec_large) + { + int p = var_to_partition (m_map, lhs); + tree v = m_vars[p]; + gcc_assert (v != NULL_TREE); + if (!types_compatible_p (TREE_TYPE (lhs), TREE_TYPE (v))) + v = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (lhs), v); + gimple_call_set_lhs (stmt, v); + SSA_NAME_DEF_STMT (lhs) = gimple_build_nop (); + } + update_stmt (stmt); +} + +/* Lower __asm STMT which involves large/huge _BitInt values. */ + +void +bitint_large_huge::lower_asm (gimple *stmt) +{ + gasm *g = as_a (stmt); + unsigned noutputs = gimple_asm_noutputs (g); + unsigned ninputs = gimple_asm_ninputs (g); + + for (unsigned i = 0; i < noutputs; ++i) + { + tree t = gimple_asm_output_op (g, i); + tree s = TREE_VALUE (t); + if (TREE_CODE (s) == SSA_NAME + && TREE_CODE (TREE_TYPE (s)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (s)) >= bitint_prec_large) + { + int part = var_to_partition (m_map, s); + gcc_assert (m_vars[part] != NULL_TREE); + TREE_VALUE (t) = m_vars[part]; + } + } + for (unsigned i = 0; i < ninputs; ++i) + { + tree t = gimple_asm_input_op (g, i); + tree s = TREE_VALUE (t); + if (TREE_CODE (s) == SSA_NAME + && TREE_CODE (TREE_TYPE (s)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (s)) >= bitint_prec_large) + { + int part = var_to_partition (m_map, s); + gcc_assert (m_vars[part] != NULL_TREE); + TREE_VALUE (t) = m_vars[part]; + } + } + update_stmt (stmt); +} + +/* Lower statement STMT which involves large/huge _BitInt values + into code accessing individual limbs. */ + +void +bitint_large_huge::lower_stmt (gimple *stmt) +{ + m_first = true; + m_lhs = NULL_TREE; + m_data.truncate (0); + m_data_cnt = 0; + m_gsi = gsi_for_stmt (stmt); + m_after_stmt = NULL; + m_bb = NULL; + m_init_gsi = m_gsi; + gsi_prev (&m_init_gsi); + m_preheader_bb = NULL; + m_upwards_2limb = 0; + m_upwards = false; + m_var_msb = false; + m_cast_conditional = false; + m_bitfld_load = 0; + m_loc = gimple_location (stmt); + if (is_gimple_call (stmt)) + { + lower_call (NULL_TREE, stmt); + return; + } + if (gimple_code (stmt) == GIMPLE_ASM) + { + lower_asm (stmt); + return; + } + tree lhs = NULL_TREE, cmp_op1 = NULL_TREE, cmp_op2 = NULL_TREE; + tree_code cmp_code = comparison_op (stmt, &cmp_op1, &cmp_op2); + bool eq_p = (cmp_code == EQ_EXPR || cmp_code == NE_EXPR); + bool mergeable_cast_p = false; + bool final_cast_p = false; + if (gimple_assign_cast_p (stmt)) + { + lhs = gimple_assign_lhs (stmt); + tree rhs1 = gimple_assign_rhs1 (stmt); + if (TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (lhs)) >= bitint_prec_large + && INTEGRAL_TYPE_P (TREE_TYPE (rhs1))) + mergeable_cast_p = true; + else if (TREE_CODE (TREE_TYPE (rhs1)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (rhs1)) >= bitint_prec_large + && INTEGRAL_TYPE_P (TREE_TYPE (lhs))) + { + final_cast_p = true; + if (TREE_CODE (rhs1) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs1)))) + { + gimple *g = SSA_NAME_DEF_STMT (rhs1); + if (is_gimple_assign (g) + && gimple_assign_rhs_code (g) == IMAGPART_EXPR) + { + tree rhs2 = TREE_OPERAND (gimple_assign_rhs1 (g), 0); + if (TREE_CODE (rhs2) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs2)))) + { + g = SSA_NAME_DEF_STMT (rhs2); + int ovf = optimizable_arith_overflow (g); + if (ovf == 2) + /* If .{ADD,SUB,MUL}_OVERFLOW has both REALPART_EXPR + and IMAGPART_EXPR uses, where the latter is cast to + non-_BitInt, it will be optimized when handling + the REALPART_EXPR. */ + return; + if (ovf == 1) + { + lower_call (NULL_TREE, g); + return; + } + } + } + } + } + } + if (gimple_store_p (stmt)) + { + tree rhs1 = gimple_assign_rhs1 (stmt); + if (TREE_CODE (rhs1) == SSA_NAME + && (m_names == NULL + || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs1)))) + { + gimple *g = SSA_NAME_DEF_STMT (rhs1); + m_loc = gimple_location (g); + lhs = gimple_assign_lhs (stmt); + if (is_gimple_assign (g) && !mergeable_op (g)) + switch (gimple_assign_rhs_code (g)) + { + case LSHIFT_EXPR: + case RSHIFT_EXPR: + lower_shift_stmt (lhs, g); + handled: + m_gsi = gsi_for_stmt (stmt); + unlink_stmt_vdef (stmt); + release_ssa_name (gimple_vdef (stmt)); + gsi_remove (&m_gsi, true); + return; + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + lower_muldiv_stmt (lhs, g); + goto handled; + case FIX_TRUNC_EXPR: + lower_float_conv_stmt (lhs, g); + goto handled; + case REALPART_EXPR: + case IMAGPART_EXPR: + lower_cplxpart_stmt (lhs, g); + goto handled; + default: + break; + } + else if (optimizable_arith_overflow (g) == 3) + { + lower_call (lhs, g); + goto handled; + } + m_loc = gimple_location (stmt); + } + } + if (mergeable_op (stmt) + || gimple_store_p (stmt) + || gimple_assign_load_p (stmt) + || eq_p + || mergeable_cast_p) + { + lhs = lower_mergeable_stmt (stmt, cmp_code, cmp_op1, cmp_op2); + if (!eq_p) + return; + } + else if (cmp_code != ERROR_MARK) + lhs = lower_comparison_stmt (stmt, cmp_code, cmp_op1, cmp_op2); + if (cmp_code != ERROR_MARK) + { + if (gimple_code (stmt) == GIMPLE_COND) + { + gcond *cstmt = as_a (stmt); + gimple_cond_set_lhs (cstmt, lhs); + gimple_cond_set_rhs (cstmt, boolean_false_node); + gimple_cond_set_code (cstmt, cmp_code); + update_stmt (stmt); + return; + } + if (gimple_assign_rhs_code (stmt) == COND_EXPR) + { + tree cond = build2 (cmp_code, boolean_type_node, lhs, + boolean_false_node); + gimple_assign_set_rhs1 (stmt, cond); + lhs = gimple_assign_lhs (stmt); + gcc_assert (TREE_CODE (TREE_TYPE (lhs)) != BITINT_TYPE + || (bitint_precision_kind (TREE_TYPE (lhs)) + <= bitint_prec_middle)); + update_stmt (stmt); + return; + } + gimple_assign_set_rhs1 (stmt, lhs); + gimple_assign_set_rhs2 (stmt, boolean_false_node); + gimple_assign_set_rhs_code (stmt, cmp_code); + update_stmt (stmt); + return; + } + if (final_cast_p) + { + tree lhs_type = TREE_TYPE (lhs); + /* Add support for 3 or more limbs filled in from normal integral + type if this assert fails. If no target chooses limb mode smaller + than half of largest supported normal integral type, this will not + be needed. */ + gcc_assert (TYPE_PRECISION (lhs_type) <= 2 * limb_prec); + gimple *g; + if (TREE_CODE (lhs_type) == BITINT_TYPE + && bitint_precision_kind (lhs_type) == bitint_prec_middle) + lhs_type = build_nonstandard_integer_type (TYPE_PRECISION (lhs_type), + TYPE_UNSIGNED (lhs_type)); + m_data_cnt = 0; + tree rhs1 = gimple_assign_rhs1 (stmt); + tree r1 = handle_operand (rhs1, size_int (0)); + if (!useless_type_conversion_p (lhs_type, TREE_TYPE (r1))) + r1 = add_cast (lhs_type, r1); + if (TYPE_PRECISION (lhs_type) > limb_prec) + { + m_data_cnt = 0; + m_first = false; + tree r2 = handle_operand (rhs1, size_int (1)); + r2 = add_cast (lhs_type, r2); + g = gimple_build_assign (make_ssa_name (lhs_type), LSHIFT_EXPR, r2, + build_int_cst (unsigned_type_node, + limb_prec)); + insert_before (g); + g = gimple_build_assign (make_ssa_name (lhs_type), BIT_IOR_EXPR, r1, + gimple_assign_lhs (g)); + insert_before (g); + r1 = gimple_assign_lhs (g); + } + if (lhs_type != TREE_TYPE (lhs)) + g = gimple_build_assign (lhs, NOP_EXPR, r1); + else + g = gimple_build_assign (lhs, r1); + gsi_replace (&m_gsi, g, true); + return; + } + if (is_gimple_assign (stmt)) + switch (gimple_assign_rhs_code (stmt)) + { + case LSHIFT_EXPR: + case RSHIFT_EXPR: + lower_shift_stmt (NULL_TREE, stmt); + return; + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + lower_muldiv_stmt (NULL_TREE, stmt); + return; + case FIX_TRUNC_EXPR: + case FLOAT_EXPR: + lower_float_conv_stmt (NULL_TREE, stmt); + return; + case REALPART_EXPR: + case IMAGPART_EXPR: + lower_cplxpart_stmt (NULL_TREE, stmt); + return; + case COMPLEX_EXPR: + lower_complexexpr_stmt (stmt); + return; + default: + break; + } + gcc_unreachable (); +} + +/* Helper for walk_non_aliased_vuses. Determine if we arrived at + the desired memory state. */ + +void * +vuse_eq (ao_ref *, tree vuse1, void *data) +{ + tree vuse2 = (tree) data; + if (vuse1 == vuse2) + return data; + + return NULL; +} + +/* Return true if STMT uses a library function and needs to take + address of its inputs. We need to avoid bit-fields in those + cases. */ + +bool +stmt_needs_operand_addr (gimple *stmt) +{ + if (is_gimple_assign (stmt)) + switch (gimple_assign_rhs_code (stmt)) + { + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + case FLOAT_EXPR: + return true; + default: + break; + } + else if (gimple_call_internal_p (stmt, IFN_MUL_OVERFLOW) + || gimple_call_internal_p (stmt, IFN_UBSAN_CHECK_MUL)) + return true; + return false; +} + +/* Dominator walker used to discover which large/huge _BitInt + loads could be sunk into all their uses. */ + +class bitint_dom_walker : public dom_walker +{ +public: + bitint_dom_walker (bitmap names, bitmap loads) + : dom_walker (CDI_DOMINATORS), m_names (names), m_loads (loads) {} + + edge before_dom_children (basic_block) final override; + +private: + bitmap m_names, m_loads; +}; + +edge +bitint_dom_walker::before_dom_children (basic_block bb) +{ + gphi *phi = get_virtual_phi (bb); + tree vop; + if (phi) + vop = gimple_phi_result (phi); + else if (bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)) + vop = NULL_TREE; + else + vop = (tree) get_immediate_dominator (CDI_DOMINATORS, bb)->aux; + + auto_vec worklist; + for (gimple_stmt_iterator gsi = gsi_start_bb (bb); + !gsi_end_p (gsi); gsi_next (&gsi)) + { + gimple *stmt = gsi_stmt (gsi); + if (is_gimple_debug (stmt)) + continue; + + if (!vop && gimple_vuse (stmt)) + vop = gimple_vuse (stmt); + + tree cvop = vop; + if (gimple_vdef (stmt)) + vop = gimple_vdef (stmt); + + tree lhs = gimple_get_lhs (stmt); + if (lhs + && TREE_CODE (lhs) == SSA_NAME + && TREE_CODE (TREE_TYPE (lhs)) != BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (lhs)) >= bitint_prec_large + && !bitmap_bit_p (m_names, SSA_NAME_VERSION (lhs))) + /* If lhs of stmt is large/huge _BitInt SSA_NAME not in m_names, + it means it will be handled in a loop or straight line code + at the location of its (ultimate) immediate use, so for + vop checking purposes check these only at the ultimate + immediate use. */ + continue; + + ssa_op_iter oi; + use_operand_p use_p; + FOR_EACH_SSA_USE_OPERAND (use_p, stmt, oi, SSA_OP_USE) + { + tree s = USE_FROM_PTR (use_p); + if (TREE_CODE (TREE_TYPE (s)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (s)) >= bitint_prec_large) + worklist.safe_push (s); + } + + bool needs_operand_addr = stmt_needs_operand_addr (stmt); + while (worklist.length () > 0) + { + tree s = worklist.pop (); + + if (!bitmap_bit_p (m_names, SSA_NAME_VERSION (s))) + { + gimple *g = SSA_NAME_DEF_STMT (s); + needs_operand_addr |= stmt_needs_operand_addr (g); + FOR_EACH_SSA_USE_OPERAND (use_p, g, oi, SSA_OP_USE) + { + tree s2 = USE_FROM_PTR (use_p); + if (TREE_CODE (TREE_TYPE (s2)) == BITINT_TYPE + && (bitint_precision_kind (TREE_TYPE (s2)) + >= bitint_prec_large)) + worklist.safe_push (s2); + } + continue; + } + if (!SSA_NAME_OCCURS_IN_ABNORMAL_PHI (s) + && gimple_assign_cast_p (SSA_NAME_DEF_STMT (s))) + { + tree rhs = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)); + if (TREE_CODE (rhs) == SSA_NAME + && bitmap_bit_p (m_loads, SSA_NAME_VERSION (rhs))) + s = rhs; + else + continue; + } + else if (!bitmap_bit_p (m_loads, SSA_NAME_VERSION (s))) + continue; + + tree rhs1 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)); + if (needs_operand_addr + && TREE_CODE (rhs1) == COMPONENT_REF + && DECL_BIT_FIELD_TYPE (TREE_OPERAND (rhs1, 1))) + { + tree fld = TREE_OPERAND (rhs1, 1); + /* For little-endian, we can allow as inputs bit-fields + which start at a limb boundary. */ + if (DECL_OFFSET_ALIGN (fld) >= TYPE_ALIGN (TREE_TYPE (rhs1)) + && tree_fits_uhwi_p (DECL_FIELD_BIT_OFFSET (fld)) + && (tree_to_uhwi (DECL_FIELD_BIT_OFFSET (fld)) + % limb_prec) == 0) + ; + else + { + bitmap_clear_bit (m_loads, SSA_NAME_VERSION (s)); + continue; + } + } + + ao_ref ref; + ao_ref_init (&ref, rhs1); + tree lvop = gimple_vuse (SSA_NAME_DEF_STMT (s)); + unsigned limit = 64; + tree vuse = cvop; + if (vop != cvop + && is_gimple_assign (stmt) + && gimple_store_p (stmt) + && !operand_equal_p (lhs, + gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)), + 0)) + vuse = vop; + if (vuse != lvop + && walk_non_aliased_vuses (&ref, vuse, false, vuse_eq, + NULL, NULL, limit, lvop) == NULL) + bitmap_clear_bit (m_loads, SSA_NAME_VERSION (s)); + } + } + + bb->aux = (void *) vop; + return NULL; +} + +} + +/* Replacement for normal processing of STMT in tree-ssa-coalesce.cc + build_ssa_conflict_graph. + The differences are: + 1) don't process assignments with large/huge _BitInt lhs not in NAMES + 2) for large/huge _BitInt multiplication/division/modulo process def + only after processing uses rather than before to make uses conflict + with the definition + 3) for large/huge _BitInt uses not in NAMES mark the uses of their + SSA_NAME_DEF_STMT (recursively), because those uses will be sunk into + the final statement. */ + +void +build_bitint_stmt_ssa_conflicts (gimple *stmt, live_track *live, + ssa_conflicts *graph, bitmap names, + void (*def) (live_track *, tree, + ssa_conflicts *), + void (*use) (live_track *, tree)) +{ + bool muldiv_p = false; + tree lhs = NULL_TREE; + if (is_gimple_assign (stmt)) + { + lhs = gimple_assign_lhs (stmt); + if (TREE_CODE (lhs) == SSA_NAME + && TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (lhs)) >= bitint_prec_large) + { + if (!bitmap_bit_p (names, SSA_NAME_VERSION (lhs))) + return; + switch (gimple_assign_rhs_code (stmt)) + { + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + muldiv_p = true; + default: + break; + } + } + } + + ssa_op_iter iter; + tree var; + if (!muldiv_p) + { + /* For stmts with more than one SSA_NAME definition pretend all the + SSA_NAME outputs but the first one are live at this point, so + that conflicts are added in between all those even when they are + actually not really live after the asm, because expansion might + copy those into pseudos after the asm and if multiple outputs + share the same partition, it might overwrite those that should + be live. E.g. + asm volatile (".." : "=r" (a) : "=r" (b) : "0" (a), "1" (a)); + return a; + See PR70593. */ + bool first = true; + FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF) + if (first) + first = false; + else + use (live, var); + + FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_DEF) + def (live, var, graph); + } + + auto_vec worklist; + FOR_EACH_SSA_TREE_OPERAND (var, stmt, iter, SSA_OP_USE) + if (TREE_CODE (TREE_TYPE (var)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (var)) >= bitint_prec_large) + { + if (bitmap_bit_p (names, SSA_NAME_VERSION (var))) + use (live, var); + else + worklist.safe_push (var); + } + + while (worklist.length () > 0) + { + tree s = worklist.pop (); + FOR_EACH_SSA_TREE_OPERAND (var, SSA_NAME_DEF_STMT (s), iter, SSA_OP_USE) + if (TREE_CODE (TREE_TYPE (var)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (var)) >= bitint_prec_large) + { + if (bitmap_bit_p (names, SSA_NAME_VERSION (var))) + use (live, var); + else + worklist.safe_push (var); + } + } + + if (muldiv_p) + def (live, lhs, graph); +} + +/* Entry point for _BitInt(N) operation lowering during optimization. */ + +static unsigned int +gimple_lower_bitint (void) +{ + small_max_prec = mid_min_prec = large_min_prec = huge_min_prec = 0; + limb_prec = 0; + + unsigned int i; + for (i = 0; i < num_ssa_names; ++i) + { + tree s = ssa_name (i); + if (s == NULL) + continue; + tree type = TREE_TYPE (s); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) != bitint_prec_small) + break; + /* We need to also rewrite stores of large/huge _BitInt INTEGER_CSTs + into memory. Such functions could have no large/huge SSA_NAMEs. */ + if (SSA_NAME_IS_VIRTUAL_OPERAND (s)) + { + gimple *g = SSA_NAME_DEF_STMT (s); + if (is_gimple_assign (g) && gimple_store_p (g)) + { + tree t = gimple_assign_rhs1 (g); + if (TREE_CODE (TREE_TYPE (t)) == BITINT_TYPE + && (bitint_precision_kind (TREE_TYPE (t)) + >= bitint_prec_large)) + break; + } + } + } + if (i == num_ssa_names) + return 0; + + basic_block bb; + auto_vec switch_statements; + FOR_EACH_BB_FN (bb, cfun) + { + if (gswitch *swtch = safe_dyn_cast (*gsi_last_bb (bb))) + { + tree idx = gimple_switch_index (swtch); + if (TREE_CODE (TREE_TYPE (idx)) != BITINT_TYPE + || bitint_precision_kind (TREE_TYPE (idx)) < bitint_prec_large) + continue; + + if (optimize) + group_case_labels_stmt (swtch); + switch_statements.safe_push (swtch); + } + } + + if (!switch_statements.is_empty ()) + { + bool expanded = false; + gimple *stmt; + unsigned int j; + i = 0; + FOR_EACH_VEC_ELT (switch_statements, j, stmt) + { + gswitch *swtch = as_a (stmt); + tree_switch_conversion::switch_decision_tree dt (swtch); + expanded |= dt.analyze_switch_statement (); + } + + if (expanded) + { + free_dominance_info (CDI_DOMINATORS); + free_dominance_info (CDI_POST_DOMINATORS); + mark_virtual_operands_for_renaming (cfun); + cleanup_tree_cfg (TODO_update_ssa); + } + } + + struct bitint_large_huge large_huge; + bool has_large_huge_parm_result = false; + bool has_large_huge = false; + unsigned int ret = 0, first_large_huge = ~0U; + bool edge_insertions = false; + for (; i < num_ssa_names; ++i) + { + tree s = ssa_name (i); + if (s == NULL) + continue; + tree type = TREE_TYPE (s); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large) + { + if (first_large_huge == ~0U) + first_large_huge = i; + gimple *stmt = SSA_NAME_DEF_STMT (s), *g; + gimple_stmt_iterator gsi; + tree_code rhs_code; + /* Unoptimize certain constructs to simpler alternatives to + avoid having to lower all of them. */ + if (is_gimple_assign (stmt)) + switch (rhs_code = gimple_assign_rhs_code (stmt)) + { + default: + break; + case LROTATE_EXPR: + case RROTATE_EXPR: + { + first_large_huge = 0; + location_t loc = gimple_location (stmt); + gsi = gsi_for_stmt (stmt); + tree rhs1 = gimple_assign_rhs1 (stmt); + tree type = TREE_TYPE (rhs1); + tree n = gimple_assign_rhs2 (stmt), m; + tree p = build_int_cst (TREE_TYPE (n), + TYPE_PRECISION (type)); + if (TREE_CODE (n) == INTEGER_CST) + m = fold_build2 (MINUS_EXPR, TREE_TYPE (n), p, n); + else + { + m = make_ssa_name (TREE_TYPE (n)); + g = gimple_build_assign (m, MINUS_EXPR, p, n); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + } + if (!TYPE_UNSIGNED (type)) + { + tree utype = build_bitint_type (TYPE_PRECISION (type), + 1); + if (TREE_CODE (rhs1) == INTEGER_CST) + rhs1 = fold_convert (utype, rhs1); + else + { + tree t = make_ssa_name (type); + g = gimple_build_assign (t, NOP_EXPR, rhs1); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + } + } + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rhs1)), + rhs_code == LROTATE_EXPR + ? LSHIFT_EXPR : RSHIFT_EXPR, + rhs1, n); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + tree op1 = gimple_assign_lhs (g); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rhs1)), + rhs_code == LROTATE_EXPR + ? RSHIFT_EXPR : LSHIFT_EXPR, + rhs1, m); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + tree op2 = gimple_assign_lhs (g); + tree lhs = gimple_assign_lhs (stmt); + if (!TYPE_UNSIGNED (type)) + { + g = gimple_build_assign (make_ssa_name (TREE_TYPE (op1)), + BIT_IOR_EXPR, op1, op2); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + g = gimple_build_assign (lhs, NOP_EXPR, + gimple_assign_lhs (g)); + } + else + g = gimple_build_assign (lhs, BIT_IOR_EXPR, op1, op2); + gsi_replace (&gsi, g, true); + gimple_set_location (g, loc); + } + break; + case ABS_EXPR: + case ABSU_EXPR: + case MIN_EXPR: + case MAX_EXPR: + case COND_EXPR: + first_large_huge = 0; + gsi = gsi_for_stmt (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree rhs1 = gimple_assign_rhs1 (stmt), rhs2 = NULL_TREE; + location_t loc = gimple_location (stmt); + if (rhs_code == ABS_EXPR) + g = gimple_build_cond (LT_EXPR, rhs1, + build_zero_cst (TREE_TYPE (rhs1)), + NULL_TREE, NULL_TREE); + else if (rhs_code == ABSU_EXPR) + { + rhs2 = make_ssa_name (TREE_TYPE (lhs)); + g = gimple_build_assign (rhs2, NOP_EXPR, rhs1); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + g = gimple_build_cond (LT_EXPR, rhs1, + build_zero_cst (TREE_TYPE (rhs1)), + NULL_TREE, NULL_TREE); + rhs1 = rhs2; + } + else if (rhs_code == MIN_EXPR || rhs_code == MAX_EXPR) + { + rhs2 = gimple_assign_rhs2 (stmt); + if (TREE_CODE (rhs1) == INTEGER_CST) + std::swap (rhs1, rhs2); + g = gimple_build_cond (LT_EXPR, rhs1, rhs2, + NULL_TREE, NULL_TREE); + if (rhs_code == MAX_EXPR) + std::swap (rhs1, rhs2); + } + else + { + g = gimple_build_cond (NE_EXPR, rhs1, + build_zero_cst (TREE_TYPE (rhs1)), + NULL_TREE, NULL_TREE); + rhs1 = gimple_assign_rhs2 (stmt); + rhs2 = gimple_assign_rhs3 (stmt); + } + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + edge e1 = split_block (gsi_bb (gsi), g); + edge e2 = split_block (e1->dest, (gimple *) NULL); + edge e3 = make_edge (e1->src, e2->dest, EDGE_FALSE_VALUE); + e3->probability = profile_probability::even (); + e1->flags = EDGE_TRUE_VALUE; + e1->probability = e3->probability.invert (); + if (dom_info_available_p (CDI_DOMINATORS)) + set_immediate_dominator (CDI_DOMINATORS, e2->dest, e1->src); + if (rhs_code == ABS_EXPR || rhs_code == ABSU_EXPR) + { + gsi = gsi_after_labels (e1->dest); + g = gimple_build_assign (make_ssa_name (TREE_TYPE (rhs1)), + NEGATE_EXPR, rhs1); + gsi_insert_before (&gsi, g, GSI_SAME_STMT); + gimple_set_location (g, loc); + rhs2 = gimple_assign_lhs (g); + std::swap (rhs1, rhs2); + } + gsi = gsi_for_stmt (stmt); + gsi_remove (&gsi, true); + gphi *phi = create_phi_node (lhs, e2->dest); + add_phi_arg (phi, rhs1, e2, UNKNOWN_LOCATION); + add_phi_arg (phi, rhs2, e3, UNKNOWN_LOCATION); + break; + } + } + /* We need to also rewrite stores of large/huge _BitInt INTEGER_CSTs + into memory. Such functions could have no large/huge SSA_NAMEs. */ + else if (SSA_NAME_IS_VIRTUAL_OPERAND (s)) + { + gimple *g = SSA_NAME_DEF_STMT (s); + if (is_gimple_assign (g) && gimple_store_p (g)) + { + tree t = gimple_assign_rhs1 (g); + if (TREE_CODE (TREE_TYPE (t)) == BITINT_TYPE + && (bitint_precision_kind (TREE_TYPE (t)) + >= bitint_prec_large)) + has_large_huge = true; + } + } + } + for (i = first_large_huge; i < num_ssa_names; ++i) + { + tree s = ssa_name (i); + if (s == NULL) + continue; + tree type = TREE_TYPE (s); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large) + { + use_operand_p use_p; + gimple *use_stmt; + has_large_huge = true; + if (optimize + && optimizable_arith_overflow (SSA_NAME_DEF_STMT (s))) + continue; + /* Ignore large/huge _BitInt SSA_NAMEs which have single use in + the same bb and could be handled in the same loop with the + immediate use. */ + if (optimize + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (s) + && single_imm_use (s, &use_p, &use_stmt) + && gimple_bb (SSA_NAME_DEF_STMT (s)) == gimple_bb (use_stmt)) + { + if (mergeable_op (SSA_NAME_DEF_STMT (s))) + { + if (mergeable_op (use_stmt)) + continue; + tree_code cmp_code = comparison_op (use_stmt, NULL, NULL); + if (cmp_code == EQ_EXPR || cmp_code == NE_EXPR) + continue; + if (gimple_assign_cast_p (use_stmt)) + { + tree lhs = gimple_assign_lhs (use_stmt); + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs))) + continue; + } + else if (gimple_store_p (use_stmt) + && is_gimple_assign (use_stmt) + && !gimple_has_volatile_ops (use_stmt) + && !stmt_ends_bb_p (use_stmt)) + continue; + } + if (gimple_assign_cast_p (SSA_NAME_DEF_STMT (s))) + { + tree rhs1 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)); + if (INTEGRAL_TYPE_P (TREE_TYPE (rhs1)) + && ((is_gimple_assign (use_stmt) + && (gimple_assign_rhs_code (use_stmt) + != COMPLEX_EXPR)) + || gimple_code (use_stmt) == GIMPLE_COND) + && (!gimple_store_p (use_stmt) + || (is_gimple_assign (use_stmt) + && !gimple_has_volatile_ops (use_stmt) + && !stmt_ends_bb_p (use_stmt))) + && (TREE_CODE (rhs1) != SSA_NAME + || !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1))) + { + if (TREE_CODE (TREE_TYPE (rhs1)) != BITINT_TYPE + || (bitint_precision_kind (TREE_TYPE (rhs1)) + < bitint_prec_large) + || (TYPE_PRECISION (TREE_TYPE (rhs1)) + >= TYPE_PRECISION (TREE_TYPE (s))) + || mergeable_op (SSA_NAME_DEF_STMT (s))) + continue; + /* Prevent merging a widening non-mergeable cast + on result of some narrower mergeable op + together with later mergeable operations. E.g. + result of _BitInt(223) addition shouldn't be + sign-extended to _BitInt(513) and have another + _BitInt(513) added to it, as handle_plus_minus + with its PHI node handling inside of handle_cast + will not work correctly. An exception is if + use_stmt is a store, this is handled directly + in lower_mergeable_stmt. */ + if (TREE_CODE (rhs1) != SSA_NAME + || !has_single_use (rhs1) + || (gimple_bb (SSA_NAME_DEF_STMT (rhs1)) + != gimple_bb (SSA_NAME_DEF_STMT (s))) + || !mergeable_op (SSA_NAME_DEF_STMT (rhs1)) + || gimple_store_p (use_stmt)) + continue; + if (gimple_assign_cast_p (SSA_NAME_DEF_STMT (rhs1))) + { + /* Another exception is if the widening cast is + from mergeable same precision cast from something + not mergeable. */ + tree rhs2 + = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (rhs1)); + if (TREE_CODE (TREE_TYPE (rhs2)) == BITINT_TYPE + && (TYPE_PRECISION (TREE_TYPE (rhs1)) + == TYPE_PRECISION (TREE_TYPE (rhs2)))) + { + if (TREE_CODE (rhs2) != SSA_NAME + || !has_single_use (rhs2) + || (gimple_bb (SSA_NAME_DEF_STMT (rhs2)) + != gimple_bb (SSA_NAME_DEF_STMT (s))) + || !mergeable_op (SSA_NAME_DEF_STMT (rhs2))) + continue; + } + } + } + } + if (is_gimple_assign (SSA_NAME_DEF_STMT (s))) + switch (gimple_assign_rhs_code (SSA_NAME_DEF_STMT (s))) + { + case IMAGPART_EXPR: + { + tree rhs1 = gimple_assign_rhs1 (SSA_NAME_DEF_STMT (s)); + rhs1 = TREE_OPERAND (rhs1, 0); + if (TREE_CODE (rhs1) == SSA_NAME) + { + gimple *g = SSA_NAME_DEF_STMT (rhs1); + if (optimizable_arith_overflow (g)) + continue; + } + } + /* FALLTHRU */ + case LSHIFT_EXPR: + case RSHIFT_EXPR: + case MULT_EXPR: + case TRUNC_DIV_EXPR: + case TRUNC_MOD_EXPR: + case FIX_TRUNC_EXPR: + case REALPART_EXPR: + if (gimple_store_p (use_stmt) + && is_gimple_assign (use_stmt) + && !gimple_has_volatile_ops (use_stmt) + && !stmt_ends_bb_p (use_stmt)) + { + tree lhs = gimple_assign_lhs (use_stmt); + /* As multiply/division passes address of the lhs + to library function and that assumes it can extend + it to whole number of limbs, avoid merging those + with bit-field stores. Don't allow it for + shifts etc. either, so that the bit-field store + handling doesn't have to be done everywhere. */ + if (TREE_CODE (lhs) == COMPONENT_REF + && DECL_BIT_FIELD_TYPE (TREE_OPERAND (lhs, 1))) + break; + continue; + } + break; + default: + break; + } + } + + /* Also ignore uninitialized uses. */ + if (SSA_NAME_IS_DEFAULT_DEF (s) + && (!SSA_NAME_VAR (s) || VAR_P (SSA_NAME_VAR (s)))) + continue; + + if (!large_huge.m_names) + large_huge.m_names = BITMAP_ALLOC (NULL); + bitmap_set_bit (large_huge.m_names, SSA_NAME_VERSION (s)); + if (has_single_use (s)) + { + if (!large_huge.m_single_use_names) + large_huge.m_single_use_names = BITMAP_ALLOC (NULL); + bitmap_set_bit (large_huge.m_single_use_names, + SSA_NAME_VERSION (s)); + } + if (SSA_NAME_VAR (s) + && ((TREE_CODE (SSA_NAME_VAR (s)) == PARM_DECL + && SSA_NAME_IS_DEFAULT_DEF (s)) + || TREE_CODE (SSA_NAME_VAR (s)) == RESULT_DECL)) + has_large_huge_parm_result = true; + if (optimize + && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (s) + && gimple_assign_load_p (SSA_NAME_DEF_STMT (s)) + && !gimple_has_volatile_ops (SSA_NAME_DEF_STMT (s)) + && !stmt_ends_bb_p (SSA_NAME_DEF_STMT (s))) + { + use_operand_p use_p; + imm_use_iterator iter; + bool optimizable_load = true; + FOR_EACH_IMM_USE_FAST (use_p, iter, s) + { + gimple *use_stmt = USE_STMT (use_p); + if (is_gimple_debug (use_stmt)) + continue; + if (gimple_code (use_stmt) == GIMPLE_PHI + || is_gimple_call (use_stmt)) + { + optimizable_load = false; + break; + } + } + + ssa_op_iter oi; + FOR_EACH_SSA_USE_OPERAND (use_p, SSA_NAME_DEF_STMT (s), + oi, SSA_OP_USE) + { + tree s2 = USE_FROM_PTR (use_p); + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (s2)) + { + optimizable_load = false; + break; + } + } + + if (optimizable_load && !stmt_ends_bb_p (SSA_NAME_DEF_STMT (s))) + { + if (!large_huge.m_loads) + large_huge.m_loads = BITMAP_ALLOC (NULL); + bitmap_set_bit (large_huge.m_loads, SSA_NAME_VERSION (s)); + } + } + } + /* We need to also rewrite stores of large/huge _BitInt INTEGER_CSTs + into memory. Such functions could have no large/huge SSA_NAMEs. */ + else if (SSA_NAME_IS_VIRTUAL_OPERAND (s)) + { + gimple *g = SSA_NAME_DEF_STMT (s); + if (is_gimple_assign (g) && gimple_store_p (g)) + { + tree t = gimple_assign_rhs1 (g); + if (TREE_CODE (TREE_TYPE (t)) == BITINT_TYPE + && bitint_precision_kind (TREE_TYPE (t)) >= bitint_prec_large) + has_large_huge = true; + } + } + } + + if (large_huge.m_names || has_large_huge) + { + ret = TODO_update_ssa_only_virtuals | TODO_cleanup_cfg; + calculate_dominance_info (CDI_DOMINATORS); + if (optimize) + enable_ranger (cfun); + if (large_huge.m_loads) + { + basic_block entry = ENTRY_BLOCK_PTR_FOR_FN (cfun); + entry->aux = NULL; + bitint_dom_walker (large_huge.m_names, + large_huge.m_loads).walk (entry); + bitmap_and_compl_into (large_huge.m_names, large_huge.m_loads); + clear_aux_for_blocks (); + BITMAP_FREE (large_huge.m_loads); + } + large_huge.m_limb_type = build_nonstandard_integer_type (limb_prec, 1); + large_huge.m_limb_size + = tree_to_uhwi (TYPE_SIZE_UNIT (large_huge.m_limb_type)); + } + if (large_huge.m_names) + { + large_huge.m_map + = init_var_map (num_ssa_names, NULL, large_huge.m_names); + coalesce_ssa_name (large_huge.m_map); + partition_view_normal (large_huge.m_map); + if (dump_file && (dump_flags & TDF_DETAILS)) + { + fprintf (dump_file, "After Coalescing:\n"); + dump_var_map (dump_file, large_huge.m_map); + } + large_huge.m_vars + = XCNEWVEC (tree, num_var_partitions (large_huge.m_map)); + bitmap_iterator bi; + if (has_large_huge_parm_result) + EXECUTE_IF_SET_IN_BITMAP (large_huge.m_names, 0, i, bi) + { + tree s = ssa_name (i); + if (SSA_NAME_VAR (s) + && ((TREE_CODE (SSA_NAME_VAR (s)) == PARM_DECL + && SSA_NAME_IS_DEFAULT_DEF (s)) + || TREE_CODE (SSA_NAME_VAR (s)) == RESULT_DECL)) + { + int p = var_to_partition (large_huge.m_map, s); + if (large_huge.m_vars[p] == NULL_TREE) + { + large_huge.m_vars[p] = SSA_NAME_VAR (s); + mark_addressable (SSA_NAME_VAR (s)); + } + } + } + tree atype = NULL_TREE; + EXECUTE_IF_SET_IN_BITMAP (large_huge.m_names, 0, i, bi) + { + tree s = ssa_name (i); + int p = var_to_partition (large_huge.m_map, s); + if (large_huge.m_vars[p] != NULL_TREE) + continue; + if (atype == NULL_TREE + || !tree_int_cst_equal (TYPE_SIZE (atype), + TYPE_SIZE (TREE_TYPE (s)))) + { + unsigned HOST_WIDE_INT nelts + = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (s))) / limb_prec; + atype = build_array_type_nelts (large_huge.m_limb_type, nelts); + } + large_huge.m_vars[p] = create_tmp_var (atype, "bitint"); + mark_addressable (large_huge.m_vars[p]); + } + } + + FOR_EACH_BB_REVERSE_FN (bb, cfun) + { + gimple_stmt_iterator prev; + for (gimple_stmt_iterator gsi = gsi_last_bb (bb); !gsi_end_p (gsi); + gsi = prev) + { + prev = gsi; + gsi_prev (&prev); + ssa_op_iter iter; + gimple *stmt = gsi_stmt (gsi); + if (is_gimple_debug (stmt)) + continue; + bitint_prec_kind kind = bitint_prec_small; + tree t; + FOR_EACH_SSA_TREE_OPERAND (t, stmt, iter, SSA_OP_ALL_OPERANDS) + if (TREE_CODE (TREE_TYPE (t)) == BITINT_TYPE) + { + bitint_prec_kind this_kind + = bitint_precision_kind (TREE_TYPE (t)); + if (this_kind > kind) + kind = this_kind; + } + if (is_gimple_assign (stmt) && gimple_store_p (stmt)) + { + t = gimple_assign_rhs1 (stmt); + if (TREE_CODE (TREE_TYPE (t)) == BITINT_TYPE) + { + bitint_prec_kind this_kind + = bitint_precision_kind (TREE_TYPE (t)); + if (this_kind > kind) + kind = this_kind; + } + } + if (is_gimple_call (stmt)) + { + t = gimple_call_lhs (stmt); + if (t + && TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE + && TREE_CODE (TREE_TYPE (TREE_TYPE (t))) == BITINT_TYPE) + { + bitint_prec_kind this_kind + = bitint_precision_kind (TREE_TYPE (TREE_TYPE (t))); + if (this_kind > kind) + kind = this_kind; + } + } + if (kind == bitint_prec_small) + continue; + switch (gimple_code (stmt)) + { + case GIMPLE_CALL: + /* For now. We'll need to handle some internal functions and + perhaps some builtins. */ + if (kind == bitint_prec_middle) + continue; + break; + case GIMPLE_ASM: + if (kind == bitint_prec_middle) + continue; + break; + case GIMPLE_RETURN: + continue; + case GIMPLE_ASSIGN: + if (gimple_clobber_p (stmt)) + continue; + if (kind >= bitint_prec_large) + break; + if (gimple_assign_single_p (stmt)) + /* No need to lower copies, loads or stores. */ + continue; + if (gimple_assign_cast_p (stmt)) + { + tree lhs = gimple_assign_lhs (stmt); + tree rhs = gimple_assign_rhs1 (stmt); + if (INTEGRAL_TYPE_P (TREE_TYPE (lhs)) + && INTEGRAL_TYPE_P (TREE_TYPE (rhs)) + && (TYPE_PRECISION (TREE_TYPE (lhs)) + == TYPE_PRECISION (TREE_TYPE (rhs)))) + /* No need to lower casts to same precision. */ + continue; + } + break; + default: + break; + } + + if (kind == bitint_prec_middle) + { + tree type = NULL_TREE; + /* Middle _BitInt(N) is rewritten to casts to INTEGER_TYPEs + with the same precision and back. */ + if (tree lhs = gimple_get_lhs (stmt)) + if (TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && (bitint_precision_kind (TREE_TYPE (lhs)) + == bitint_prec_middle)) + { + int prec = TYPE_PRECISION (TREE_TYPE (lhs)); + int uns = TYPE_UNSIGNED (TREE_TYPE (lhs)); + type = build_nonstandard_integer_type (prec, uns); + tree lhs2 = make_ssa_name (type); + gimple *g = gimple_build_assign (lhs, NOP_EXPR, lhs2); + gsi_insert_after (&gsi, g, GSI_SAME_STMT); + gimple_set_lhs (stmt, lhs2); + } + unsigned int nops = gimple_num_ops (stmt); + for (unsigned int i = 0; i < nops; ++i) + if (tree op = gimple_op (stmt, i)) + { + tree nop = maybe_cast_middle_bitint (&gsi, op, type); + if (nop != op) + gimple_set_op (stmt, i, nop); + else if (COMPARISON_CLASS_P (op)) + { + TREE_OPERAND (op, 0) + = maybe_cast_middle_bitint (&gsi, + TREE_OPERAND (op, 0), + type); + TREE_OPERAND (op, 1) + = maybe_cast_middle_bitint (&gsi, + TREE_OPERAND (op, 1), + type); + } + else if (TREE_CODE (op) == CASE_LABEL_EXPR) + { + CASE_LOW (op) + = maybe_cast_middle_bitint (&gsi, CASE_LOW (op), + type); + CASE_HIGH (op) + = maybe_cast_middle_bitint (&gsi, CASE_HIGH (op), + type); + } + } + update_stmt (stmt); + continue; + } + + if (tree lhs = gimple_get_lhs (stmt)) + if (TREE_CODE (lhs) == SSA_NAME) + { + tree type = TREE_TYPE (lhs); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large + && (large_huge.m_names == NULL + || !bitmap_bit_p (large_huge.m_names, + SSA_NAME_VERSION (lhs)))) + continue; + } + + large_huge.lower_stmt (stmt); + } + + tree atype = NULL_TREE; + for (gphi_iterator gsi = gsi_start_phis (bb); !gsi_end_p (gsi); + gsi_next (&gsi)) + { + gphi *phi = gsi.phi (); + tree lhs = gimple_phi_result (phi); + if (TREE_CODE (TREE_TYPE (lhs)) != BITINT_TYPE + || bitint_precision_kind (TREE_TYPE (lhs)) < bitint_prec_large) + continue; + int p1 = var_to_partition (large_huge.m_map, lhs); + gcc_assert (large_huge.m_vars[p1] != NULL_TREE); + tree v1 = large_huge.m_vars[p1]; + for (unsigned i = 0; i < gimple_phi_num_args (phi); ++i) + { + tree arg = gimple_phi_arg_def (phi, i); + edge e = gimple_phi_arg_edge (phi, i); + gimple *g; + switch (TREE_CODE (arg)) + { + case INTEGER_CST: + if (integer_zerop (arg) && VAR_P (v1)) + { + tree zero = build_zero_cst (TREE_TYPE (v1)); + g = gimple_build_assign (v1, zero); + gsi_insert_on_edge (e, g); + edge_insertions = true; + break; + } + int ext; + unsigned int min_prec, prec, rem; + tree c; + prec = TYPE_PRECISION (TREE_TYPE (arg)); + rem = prec % (2 * limb_prec); + min_prec = bitint_min_cst_precision (arg, ext); + if (min_prec > prec - rem - 2 * limb_prec + && min_prec > (unsigned) limb_prec) + /* Constant which has enough significant bits that it + isn't worth trying to save .rodata space by extending + from smaller number. */ + min_prec = prec; + else + min_prec = CEIL (min_prec, limb_prec) * limb_prec; + if (min_prec == 0) + c = NULL_TREE; + else if (min_prec == prec) + c = tree_output_constant_def (arg); + else if (min_prec == (unsigned) limb_prec) + c = fold_convert (large_huge.m_limb_type, arg); + else + { + tree ctype = build_bitint_type (min_prec, 1); + c = tree_output_constant_def (fold_convert (ctype, arg)); + } + if (c) + { + if (VAR_P (v1) && min_prec == prec) + { + tree v2 = build1 (VIEW_CONVERT_EXPR, + TREE_TYPE (v1), c); + g = gimple_build_assign (v1, v2); + gsi_insert_on_edge (e, g); + edge_insertions = true; + break; + } + if (TREE_CODE (TREE_TYPE (c)) == INTEGER_TYPE) + g = gimple_build_assign (build1 (VIEW_CONVERT_EXPR, + TREE_TYPE (c), v1), + c); + else + { + unsigned HOST_WIDE_INT nelts + = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (c))) + / limb_prec; + tree vtype + = build_array_type_nelts (large_huge.m_limb_type, + nelts); + g = gimple_build_assign (build1 (VIEW_CONVERT_EXPR, + vtype, v1), + build1 (VIEW_CONVERT_EXPR, + vtype, c)); + } + gsi_insert_on_edge (e, g); + } + if (ext == 0) + { + unsigned HOST_WIDE_INT nelts + = (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (v1))) + - min_prec) / limb_prec; + tree vtype + = build_array_type_nelts (large_huge.m_limb_type, + nelts); + tree ptype = build_pointer_type (TREE_TYPE (v1)); + tree off = fold_convert (ptype, + TYPE_SIZE_UNIT (TREE_TYPE (c))); + tree vd = build2 (MEM_REF, vtype, + build_fold_addr_expr (v1), off); + g = gimple_build_assign (vd, build_zero_cst (vtype)); + } + else + { + tree vd = v1; + if (c) + { + tree ptype = build_pointer_type (TREE_TYPE (v1)); + tree off + = fold_convert (ptype, + TYPE_SIZE_UNIT (TREE_TYPE (c))); + vd = build2 (MEM_REF, large_huge.m_limb_type, + build_fold_addr_expr (v1), off); + } + vd = build_fold_addr_expr (vd); + unsigned HOST_WIDE_INT nbytes + = tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (v1))); + if (c) + nbytes + -= tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (c))); + tree fn = builtin_decl_implicit (BUILT_IN_MEMSET); + g = gimple_build_call (fn, 3, vd, + integer_minus_one_node, + build_int_cst (sizetype, + nbytes)); + } + gsi_insert_on_edge (e, g); + edge_insertions = true; + break; + default: + gcc_unreachable (); + case SSA_NAME: + if (gimple_code (SSA_NAME_DEF_STMT (arg)) == GIMPLE_NOP) + { + if (large_huge.m_names == NULL + || !bitmap_bit_p (large_huge.m_names, + SSA_NAME_VERSION (arg))) + continue; + } + int p2 = var_to_partition (large_huge.m_map, arg); + if (p1 == p2) + continue; + gcc_assert (large_huge.m_vars[p2] != NULL_TREE); + tree v2 = large_huge.m_vars[p2]; + if (VAR_P (v1) && VAR_P (v2)) + g = gimple_build_assign (v1, v2); + else if (VAR_P (v1)) + g = gimple_build_assign (v1, build1 (VIEW_CONVERT_EXPR, + TREE_TYPE (v1), v2)); + else if (VAR_P (v2)) + g = gimple_build_assign (build1 (VIEW_CONVERT_EXPR, + TREE_TYPE (v2), v1), v2); + else + { + if (atype == NULL_TREE + || !tree_int_cst_equal (TYPE_SIZE (atype), + TYPE_SIZE (TREE_TYPE (lhs)))) + { + unsigned HOST_WIDE_INT nelts + = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (lhs))) + / limb_prec; + atype + = build_array_type_nelts (large_huge.m_limb_type, + nelts); + } + g = gimple_build_assign (build1 (VIEW_CONVERT_EXPR, + atype, v1), + build1 (VIEW_CONVERT_EXPR, + atype, v2)); + } + gsi_insert_on_edge (e, g); + edge_insertions = true; + break; + } + } + } + } + + if (large_huge.m_names || has_large_huge) + { + gimple *nop = NULL; + for (i = 0; i < num_ssa_names; ++i) + { + tree s = ssa_name (i); + if (s == NULL_TREE) + continue; + tree type = TREE_TYPE (s); + if (TREE_CODE (type) == COMPLEX_TYPE) + type = TREE_TYPE (type); + if (TREE_CODE (type) == BITINT_TYPE + && bitint_precision_kind (type) >= bitint_prec_large) + { + if (large_huge.m_preserved + && bitmap_bit_p (large_huge.m_preserved, + SSA_NAME_VERSION (s))) + continue; + gimple *g = SSA_NAME_DEF_STMT (s); + if (gimple_code (g) == GIMPLE_NOP) + { + if (SSA_NAME_VAR (s)) + set_ssa_default_def (cfun, SSA_NAME_VAR (s), NULL_TREE); + release_ssa_name (s); + continue; + } + if (gimple_code (g) != GIMPLE_ASM) + { + gimple_stmt_iterator gsi = gsi_for_stmt (g); + bool save_vta = flag_var_tracking_assignments; + flag_var_tracking_assignments = false; + gsi_remove (&gsi, true); + flag_var_tracking_assignments = save_vta; + } + if (nop == NULL) + nop = gimple_build_nop (); + SSA_NAME_DEF_STMT (s) = nop; + release_ssa_name (s); + } + } + if (optimize) + disable_ranger (cfun); + } + + if (edge_insertions) + gsi_commit_edge_inserts (); + + return ret; +} + +namespace { + +const pass_data pass_data_lower_bitint = +{ + GIMPLE_PASS, /* type */ + "bitintlower", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + TV_NONE, /* tv_id */ + PROP_ssa, /* properties_required */ + PROP_gimple_lbitint, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0, /* todo_flags_finish */ +}; + +class pass_lower_bitint : public gimple_opt_pass +{ +public: + pass_lower_bitint (gcc::context *ctxt) + : gimple_opt_pass (pass_data_lower_bitint, ctxt) + {} + + /* opt_pass methods: */ + opt_pass * clone () final override { return new pass_lower_bitint (m_ctxt); } + unsigned int execute (function *) final override + { + return gimple_lower_bitint (); + } + +}; // class pass_lower_bitint + +} // anon namespace + +gimple_opt_pass * +make_pass_lower_bitint (gcc::context *ctxt) +{ + return new pass_lower_bitint (ctxt); +} + + +namespace { + +const pass_data pass_data_lower_bitint_O0 = +{ + GIMPLE_PASS, /* type */ + "bitintlower0", /* name */ + OPTGROUP_NONE, /* optinfo_flags */ + TV_NONE, /* tv_id */ + PROP_cfg, /* properties_required */ + PROP_gimple_lbitint, /* properties_provided */ + 0, /* properties_destroyed */ + 0, /* todo_flags_start */ + 0, /* todo_flags_finish */ +}; + +class pass_lower_bitint_O0 : public gimple_opt_pass +{ +public: + pass_lower_bitint_O0 (gcc::context *ctxt) + : gimple_opt_pass (pass_data_lower_bitint_O0, ctxt) + {} + + /* opt_pass methods: */ + bool gate (function *fun) final override + { + /* With errors, normal optimization passes are not run. If we don't + lower bitint operations at all, rtl expansion will abort. */ + return !(fun->curr_properties & PROP_gimple_lbitint); + } + + unsigned int execute (function *) final override + { + return gimple_lower_bitint (); + } + +}; // class pass_lower_bitint_O0 + +} // anon namespace + +gimple_opt_pass * +make_pass_lower_bitint_O0 (gcc::context *ctxt) +{ + return new pass_lower_bitint_O0 (ctxt); +} From patchwork Wed Aug 9 18:19:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133408 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2990268vqr; Wed, 9 Aug 2023 11:20:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG9nV68L31+6OHJ/sRdfNy9c7wMLtHB7tajJZ12oPHdnIYkB9w67kl+jZ3zC8IFZnJiX+iI X-Received: by 2002:a17:907:75f6:b0:994:539d:f97f with SMTP id jz22-20020a17090775f600b00994539df97fmr2692877ejc.37.1691605237261; Wed, 09 Aug 2023 11:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605237; cv=none; d=google.com; s=arc-20160816; b=OHIzeKnXPpTi4tloY5+aga1OoRdKyefWzc84NVUNQZ76dbl/7RZ2pwc0B4wIB+q9kw 4OtkQi1p8hLqH+Hy7HSlLP1tnYpN22CLaOrPLo5/EAWNRIXiPcc+2torrIbQPDh6UO2E sHhRJZwBL3ztHEwIx2Td3ya1qNN7e1nt+1l8y5zU8qKHFidwUfWpLLqJ77ncF0lgJTr7 jKkO8lY4XB298l5YQSeDMj5g6eDD1a2dG5omV+0ylfsG6LMBFSar4bP0majAKFR4P2YS 9RQBBtejrkoBOHuFonDdtvqWup/72/fZJrq3C1lAyBKTb4bInKRQ6lnjLCorAsivcaGw ybGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/xzyAS5DHt5E8YsLAIP1xJwtU9CPgYxZOKNRYEwpyMg=; fh=BQfkErFzAsSsbjkTCyRX/B4NTVcq/Q0FVa8n2KPtmMA=; b=zFuJ1ynGJCwpUnR8B2LmH463n8coYm2oB5f3RZlFTpK037xxwvoQU4yuqTpap/fS2J CnAc010Adf9HanJYVM8pmBtL3sfPUNRtqUqzriX1+j0FITu7Ym+Sh0bSxWU4g7eEgDUM G6v6SO1p7RnV7APDigpmxBXXF4WMGYHfPJdTntaoKcGYJ8/VhQct4PDAkV3E4BK6DZGr 1i+1fmwvU7ne5TTjWadeTuH2+8Ny3GBNT/DYR1J6Lqq1ZssEg+723pCnwaA1j4AMKfLq wiBIIg/TaSagOzz6/UVBSGvDjjZtG8oj1kt+WRkZ3ECyhHyaNAxglmLadEAz9INzLz2k bHPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ROUypjbT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c16-20020a170906d19000b0098dfb10f3a6si8840449ejz.107.2023.08.09.11.20.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:20:37 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ROUypjbT; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 11F153857700 for ; Wed, 9 Aug 2023 18:20:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11F153857700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605230; bh=/xzyAS5DHt5E8YsLAIP1xJwtU9CPgYxZOKNRYEwpyMg=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ROUypjbThOnIxoW1uX64EEuu28MZNthwWI3M5gUCNlyPwR/3mCsv//F4xpXGdEw5B +6lI+QNYCS8AEZ/N6Y4bTPcgHLgpMsgjuzDhtgeBA+y1T1sAg5UAlvSTaSYlvS4IOQ /dos4IFNmk3r/asmMXZqaeTUrj+Zv4SDbgJdBv9s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AD6A13858002 for ; Wed, 9 Aug 2023 18:19:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD6A13858002 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-540-C4xCWo6ZOgK5dF7ZNgIlUw-1; Wed, 09 Aug 2023 14:19:45 -0400 X-MC-Unique: C4xCWo6ZOgK5dF7ZNgIlUw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 61EE3855712; Wed, 9 Aug 2023 18:19:45 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23B40401E54; Wed, 9 Aug 2023 18:19:45 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IJgCc2042932 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:19:43 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IJgUw2042931; Wed, 9 Aug 2023 20:19:42 +0200 Date: Wed, 9 Aug 2023 20:19:41 +0200 To: Uros Bizjak , hjl.tools@gmail.com Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 6/12] i386: Enable _BitInt on x86-64 [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776652925559768 X-GMAIL-MSGID: 1773776652925559768 Hi! The following patch enables _BitInt support on x86-64, the only target which has _BitInt specified in psABI. 2023-08-09 Jakub Jelinek PR c/102989 * config/i386/i386.cc (classify_argument): Handle BITINT_TYPE. (ix86_bitint_type_info): New function. (TARGET_C_BITINT_TYPE_INFO): Redefine. Jakub --- gcc/config/i386/i386.cc.jj 2023-08-08 15:55:05.627176766 +0200 +++ gcc/config/i386/i386.cc 2023-08-08 16:12:02.308940091 +0200 @@ -2121,7 +2121,8 @@ classify_argument (machine_mode mode, co return 0; } - if (type && AGGREGATE_TYPE_P (type)) + if (type && (AGGREGATE_TYPE_P (type) + || (TREE_CODE (type) == BITINT_TYPE && words > 1))) { int i; tree field; @@ -2270,6 +2271,14 @@ classify_argument (machine_mode mode, co } break; + case BITINT_TYPE: + /* _BitInt(N) for N > 64 is passed as structure containing + (N + 63) / 64 64-bit elements. */ + if (words > 2) + return 0; + classes[0] = classes[1] = X86_64_INTEGER_CLASS; + return 2; + default: gcc_unreachable (); } @@ -24842,6 +24851,26 @@ ix86_get_excess_precision (enum excess_p return FLT_EVAL_METHOD_UNPREDICTABLE; } +/* Return true if _BitInt(N) is supported and fill details about it into + *INFO. */ +bool +ix86_bitint_type_info (int n, struct bitint_info *info) +{ + if (!TARGET_64BIT) + return false; + if (n <= 8) + info->limb_mode = QImode; + else if (n <= 16) + info->limb_mode = HImode; + else if (n <= 32) + info->limb_mode = SImode; + else + info->limb_mode = DImode; + info->big_endian = false; + info->extended = false; + return true; +} + /* Implement PUSH_ROUNDING. On 386, we have pushw instruction that decrements by exactly 2 no matter what the position was, there is no pushb. @@ -25446,6 +25475,8 @@ ix86_run_selftests (void) #undef TARGET_C_EXCESS_PRECISION #define TARGET_C_EXCESS_PRECISION ix86_get_excess_precision +#undef TARGET_C_BITINT_TYPE_INFO +#define TARGET_C_BITINT_TYPE_INFO ix86_bitint_type_info #undef TARGET_PROMOTE_PROTOTYPES #define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true #undef TARGET_PUSH_ARGUMENT From patchwork Wed Aug 9 18:20:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133410 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2991626vqr; Wed, 9 Aug 2023 11:23:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEvWTrA8Rl8QoC3SnzmodUxn5j3iKfLFlXO8KGhaYGbG0kCKAj9AiMxsoyLdq2vJc4EMIna X-Received: by 2002:a2e:9084:0:b0:2b9:e230:25d0 with SMTP id l4-20020a2e9084000000b002b9e23025d0mr5291ljg.14.1691605391661; Wed, 09 Aug 2023 11:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605391; cv=none; d=google.com; s=arc-20160816; b=WPzV320modBy3BUI8dCoMz5VbLsXc3FGEs6PUkNW8osQ0vqcgxAX91cKbw2hbi4OTX Ej9kdVvLhOBmurJjcrxqW/m9Ov0XMLfEGLzoPGoU7YkC08sZ7NqsW++vZOsDaGulJXf3 ztINz47jqdV4GRV9Cl0UQtgcV+duQJ9sUgg6Efver3c3rqQZK5TvXlbdPP5jeMER4Y7D Vlif8fl9yVzOPekgJ00mWuMqu72rRqkQbWBv+wSJtnjg42S1qCRjWmYH6J0jRBt741iy EY/97AMNMW4eBHfQA9erXMmrhIBZOido+bjeBFG0aowNCrkwDotucZaO4PBxJZR7nU2X 1ucA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=ZiPojcxdLk3G1xFtO90aBUCS7C4gGvGCKnbi38EmBpE=; fh=fteJLpb59VrvFh/kM75rW7nRpNe+RexDgs4c2irEcIM=; b=ivfudb0GHbwRewylbF2foyVQdyntka9/shv+6RxS4q9re63m51oq+L4oOPKVcBZvYj ySJ4eekCKxog+ZavD8fHu+TlKEWMKwt2Z1kQxNVWNv8cGBZ6MtGAvQhusNtGLDrxkx2c DUVrXMXgZstKTJA1LCMgXO4TEfAgRjtG0i2niTvSQ0/ZoZ/I6E68xKbnhSFEU1sTWM7N 6/JzZYkeKjnRWBLb7H31XdE2iiOBLm+czNzp5j3sT//YLKUP6uZRgkzKhHciUd9kXRzs fhDWXqO2XYTxeeqcUtxayCTBYDSzyKVpNRTV54UtNyB1gt8SRtEIEh4OSqncIEDyNMlQ iXoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="FLg/C23v"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id t2-20020a1709063e4200b00993325b159csi8920220eji.659.2023.08.09.11.23.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="FLg/C23v"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 92A3A3857016 for ; Wed, 9 Aug 2023 18:23:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92A3A3857016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605382; bh=ZiPojcxdLk3G1xFtO90aBUCS7C4gGvGCKnbi38EmBpE=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=FLg/C23v+1ye06gIf1CAg7hhGVgejnTnt2Aym42ch2MfXrScpFjrflTtKgJmUR6kB 95oLfnb6ZV89f5nXllsiL5rvi+cPWrTFjzCSnu5bD4mHo/0TUIsDpmIkUqSCwu/uQW u1+w8bYM4e0VF9B5qlH5vnWGDSQW6B/+dEzvdA88= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2AE0A3858023 for ; Wed, 9 Aug 2023 18:20:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AE0A3858023 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-339-xZj7Cr_DOTOa5GezoZx_JA-1; Wed, 09 Aug 2023 14:20:41 -0400 X-MC-Unique: xZj7Cr_DOTOa5GezoZx_JA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28D0E101A52E; Wed, 9 Aug 2023 18:20:41 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E221D40C6F4E; Wed, 9 Aug 2023 18:20:40 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IKcHH2042946 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:20:38 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IKbXc2042945; Wed, 9 Aug 2023 20:20:37 +0200 Date: Wed, 9 Aug 2023 20:20:37 +0200 To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 7/12] ubsan: _BitInt -fsanitize=undefined support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776815128822290 X-GMAIL-MSGID: 1773776815128822290 Hi! The following patch introduces some -fsanitize=undefined support for _BitInt, but some of the diagnostics is limited by lack of proper support in the library. I've filed https://github.com/llvm/llvm-project/issues/64100 to request proper support, for now some of the diagnostics might have less or more confusing or inaccurate wording but UB should still be diagnosed when it happens. 2023-08-09 Jakub Jelinek PR c/102989 gcc/ * internal-fn.cc (expand_ubsan_result_store): Add LHS, MODE and DO_ERROR arguments. For non-mode precision BITINT_TYPE results check if all padding bits up to mode precision are zeros or sign bit copies and if not, jump to DO_ERROR. (expand_addsub_overflow, expand_neg_overflow, expand_mul_overflow): Adjust expand_ubsan_result_store callers. * ubsan.cc: Include target.h and langhooks.h. (ubsan_encode_value): Pass BITINT_TYPE values which fit into pointer size converted to pointer sized integer, pass BITINT_TYPE values which fit into TImode (if supported) or DImode as those integer types or otherwise for now punt (pass 0). (ubsan_type_descriptor): Handle BITINT_TYPE. For pstyle of UBSAN_PRINT_FORCE_INT use TK_Integer (0x0000) mode with a TImode/DImode precision rather than TK_Unknown used otherwise for large/huge BITINT_TYPEs. (instrument_si_overflow): Instrument BITINT_TYPE operations even when they don't have mode precision. * ubsan.h (enum ubsan_print_style): New enumerator. gcc/c-family/ * c-ubsan.cc (ubsan_instrument_shift): Use UBSAN_PRINT_FORCE_INT for type0 type descriptor. Jakub --- gcc/ubsan.cc.jj 2023-08-08 15:54:35.443599459 +0200 +++ gcc/ubsan.cc 2023-08-08 16:12:02.329939798 +0200 @@ -50,6 +50,8 @@ along with GCC; see the file COPYING3. #include "gimple-fold.h" #include "varasm.h" #include "realmpfr.h" +#include "target.h" +#include "langhooks.h" /* Map from a tree to a VAR_DECL tree. */ @@ -125,6 +127,25 @@ tree ubsan_encode_value (tree t, enum ubsan_encode_value_phase phase) { tree type = TREE_TYPE (t); + if (TREE_CODE (type) == BITINT_TYPE) + { + if (TYPE_PRECISION (type) <= POINTER_SIZE) + { + type = pointer_sized_int_node; + t = fold_build1 (NOP_EXPR, type, t); + } + else + { + scalar_int_mode arith_mode + = (targetm.scalar_mode_supported_p (TImode) ? TImode : DImode); + if (TYPE_PRECISION (type) > GET_MODE_PRECISION (arith_mode)) + return build_zero_cst (pointer_sized_int_node); + type + = build_nonstandard_integer_type (GET_MODE_PRECISION (arith_mode), + TYPE_UNSIGNED (type)); + t = fold_build1 (NOP_EXPR, type, t); + } + } scalar_mode mode = SCALAR_TYPE_MODE (type); const unsigned int bitsize = GET_MODE_BITSIZE (mode); if (bitsize <= POINTER_SIZE) @@ -355,14 +376,32 @@ ubsan_type_descriptor (tree type, enum u { /* See through any typedefs. */ type = TYPE_MAIN_VARIANT (type); + tree type3 = type; + if (pstyle == UBSAN_PRINT_FORCE_INT) + { + /* Temporary hack for -fsanitize=shift with _BitInt(129) and more. + libubsan crashes if it is not TK_Integer type. */ + if (TREE_CODE (type) == BITINT_TYPE) + { + scalar_int_mode arith_mode + = (targetm.scalar_mode_supported_p (TImode) + ? TImode : DImode); + if (TYPE_PRECISION (type) > GET_MODE_PRECISION (arith_mode)) + type3 = build_qualified_type (type, TYPE_QUAL_CONST); + } + if (type3 == type) + pstyle = UBSAN_PRINT_NORMAL; + } - tree decl = decl_for_type_lookup (type); + tree decl = decl_for_type_lookup (type3); /* It is possible that some of the earlier created DECLs were found unused, in that case they weren't emitted and varpool_node::get returns NULL node on them. But now we really need them. Thus, renew them here. */ if (decl != NULL_TREE && varpool_node::get (decl)) - return build_fold_addr_expr (decl); + { + return build_fold_addr_expr (decl); + } tree dtype = ubsan_get_type_descriptor_type (); tree type2 = type; @@ -370,6 +409,7 @@ ubsan_type_descriptor (tree type, enum u pretty_printer pretty_name; unsigned char deref_depth = 0; unsigned short tkind, tinfo; + char tname_bitint[sizeof ("unsigned _BitInt(2147483647)")]; /* Get the name of the type, or the name of the pointer type. */ if (pstyle == UBSAN_PRINT_POINTER) @@ -403,8 +443,18 @@ ubsan_type_descriptor (tree type, enum u } if (tname == NULL) - /* We weren't able to determine the type name. */ - tname = ""; + { + if (TREE_CODE (type2) == BITINT_TYPE) + { + snprintf (tname_bitint, sizeof (tname_bitint), + "%s_BitInt(%d)", TYPE_UNSIGNED (type2) ? "unsigned " : "", + TYPE_PRECISION (type2)); + tname = tname_bitint; + } + else + /* We weren't able to determine the type name. */ + tname = ""; + } pp_quote (&pretty_name); @@ -472,6 +522,18 @@ ubsan_type_descriptor (tree type, enum u case INTEGER_TYPE: tkind = 0x0000; break; + case BITINT_TYPE: + { + /* FIXME: libubsan right now only supports _BitInts which + fit into DImode or TImode. */ + scalar_int_mode arith_mode = (targetm.scalar_mode_supported_p (TImode) + ? TImode : DImode); + if (TYPE_PRECISION (eltype) <= GET_MODE_PRECISION (arith_mode)) + tkind = 0x0000; + else + tkind = 0xffff; + } + break; case REAL_TYPE: /* FIXME: libubsan right now only supports float, double and long double type formats. */ @@ -486,7 +548,17 @@ ubsan_type_descriptor (tree type, enum u tkind = 0xffff; break; } - tinfo = get_ubsan_type_info_for_type (eltype); + tinfo = tkind == 0xffff ? 0 : get_ubsan_type_info_for_type (eltype); + + if (pstyle == UBSAN_PRINT_FORCE_INT) + { + tkind = 0x0000; + scalar_int_mode arith_mode = (targetm.scalar_mode_supported_p (TImode) + ? TImode : DImode); + tree t = lang_hooks.types.type_for_mode (arith_mode, + TYPE_UNSIGNED (eltype)); + tinfo = get_ubsan_type_info_for_type (t); + } /* Create a new VAR_DECL of type descriptor. */ const char *tmp = pp_formatted_text (&pretty_name); @@ -522,7 +594,7 @@ ubsan_type_descriptor (tree type, enum u varpool_node::finalize_decl (decl); /* Save the VAR_DECL into the hash table. */ - decl_for_type_insert (type, decl); + decl_for_type_insert (type3, decl); return build_fold_addr_expr (decl); } @@ -1604,8 +1676,9 @@ instrument_si_overflow (gimple_stmt_iter Also punt on bit-fields. */ if (!INTEGRAL_TYPE_P (lhsinner) || TYPE_OVERFLOW_WRAPS (lhsinner) - || maybe_ne (GET_MODE_BITSIZE (TYPE_MODE (lhsinner)), - TYPE_PRECISION (lhsinner))) + || (TREE_CODE (lhsinner) != BITINT_TYPE + && maybe_ne (GET_MODE_BITSIZE (TYPE_MODE (lhsinner)), + TYPE_PRECISION (lhsinner)))) return; switch (code) --- gcc/ubsan.h.jj 2023-08-08 15:54:35.460599221 +0200 +++ gcc/ubsan.h 2023-08-08 16:12:02.329939798 +0200 @@ -39,7 +39,8 @@ enum ubsan_null_ckind { enum ubsan_print_style { UBSAN_PRINT_NORMAL, UBSAN_PRINT_POINTER, - UBSAN_PRINT_ARRAY + UBSAN_PRINT_ARRAY, + UBSAN_PRINT_FORCE_INT }; /* This controls ubsan_encode_value behavior. */ --- gcc/internal-fn.cc.jj 2023-08-08 15:55:06.709161614 +0200 +++ gcc/internal-fn.cc 2023-08-08 16:22:09.404440148 +0200 @@ -981,8 +981,38 @@ expand_arith_overflow_result_store (tree /* Helper for expand_*_overflow. Store RES into TARGET. */ static void -expand_ubsan_result_store (rtx target, rtx res) +expand_ubsan_result_store (tree lhs, rtx target, scalar_int_mode mode, + rtx res, rtx_code_label *do_error) { + if (TREE_CODE (TREE_TYPE (lhs)) == BITINT_TYPE + && TYPE_PRECISION (TREE_TYPE (lhs)) < GET_MODE_PRECISION (mode)) + { + int uns = TYPE_UNSIGNED (TREE_TYPE (lhs)); + int prec = TYPE_PRECISION (TREE_TYPE (lhs)); + int tgtprec = GET_MODE_PRECISION (mode); + rtx resc = gen_reg_rtx (mode), lres; + emit_move_insn (resc, res); + if (uns) + { + rtx mask + = immed_wide_int_const (wi::shifted_mask (0, prec, false, tgtprec), + mode); + lres = expand_simple_binop (mode, AND, res, mask, NULL_RTX, + true, OPTAB_LIB_WIDEN); + } + else + { + lres = expand_shift (LSHIFT_EXPR, mode, res, tgtprec - prec, + NULL_RTX, 1); + lres = expand_shift (RSHIFT_EXPR, mode, lres, tgtprec - prec, + NULL_RTX, 0); + } + if (lres != res) + emit_move_insn (res, lres); + do_compare_rtx_and_jump (res, resc, + NE, true, mode, NULL_RTX, NULL, do_error, + profile_probability::very_unlikely ()); + } if (GET_CODE (target) == SUBREG && SUBREG_PROMOTED_VAR_P (target)) /* If this is a scalar in a register that is stored in a wider mode than the declared mode, compute the result into its declared mode @@ -1431,7 +1461,7 @@ expand_addsub_overflow (location_t loc, if (lhs) { if (is_ubsan) - expand_ubsan_result_store (target, res); + expand_ubsan_result_store (lhs, target, mode, res, do_error); else { if (do_xor) @@ -1528,7 +1558,7 @@ expand_neg_overflow (location_t loc, tre if (lhs) { if (is_ubsan) - expand_ubsan_result_store (target, res); + expand_ubsan_result_store (lhs, target, mode, res, do_error); else expand_arith_overflow_result_store (lhs, target, mode, res); } @@ -2414,7 +2450,7 @@ expand_mul_overflow (location_t loc, tre if (lhs) { if (is_ubsan) - expand_ubsan_result_store (target, res); + expand_ubsan_result_store (lhs, target, mode, res, do_error); else expand_arith_overflow_result_store (lhs, target, mode, res); } --- gcc/c-family/c-ubsan.cc.jj 2023-08-08 15:54:33.596625322 +0200 +++ gcc/c-family/c-ubsan.cc 2023-08-08 16:12:02.332939756 +0200 @@ -256,8 +256,8 @@ ubsan_instrument_shift (location_t loc, tt = build_call_expr_loc (loc, builtin_decl_explicit (BUILT_IN_TRAP), 0); else { - tree data = ubsan_create_data ("__ubsan_shift_data", 1, &loc, - ubsan_type_descriptor (type0), + tree utd0 = ubsan_type_descriptor (type0, UBSAN_PRINT_FORCE_INT); + tree data = ubsan_create_data ("__ubsan_shift_data", 1, &loc, utd0, ubsan_type_descriptor (type1), NULL_TREE, NULL_TREE); data = build_fold_addr_expr_loc (loc, data); From patchwork Wed Aug 9 18:22:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133411 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2991827vqr; Wed, 9 Aug 2023 11:23:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGJ3/8oufL96kEClhM8tYkXgogv5n5Sj8hhvOE7/3Y6ko87tv9eU3V/5ipmAmwb3rBqI0S6 X-Received: by 2002:a05:6402:40cb:b0:51e:5898:a23d with SMTP id z11-20020a05640240cb00b0051e5898a23dmr533181edb.5.1691605415186; Wed, 09 Aug 2023 11:23:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605415; cv=none; d=google.com; s=arc-20160816; b=yZ+WrqppM9W9IXoHR5BIcXpZDMRs7BFKeLkol4SfFom2DJUtlXH9+oESrPXQPoaDJr baQN6ThIEsJlHl39zTTHlf/R8986AyCvlEcyH7B0oAKQ0/Jzb9lwsQANMgx/MdC6LZH6 yMAnl0MBgiSb73TLZNQoQJAjlJWm3R6KZNfgNnhwexQi3MtZuLNEgVdC+SdZEKMJEAu1 po1tu9pZGrMGpaOLHQ0kA6NAO7EQPV42myqSiaWc274sK+0UiVHtzZN8ZLKPu1L7zwh2 jo0ewZBUB6d64i/gYKU8nywcDunmi/zcDnDyArx5TrtrG3AOpOLudGYZXH1YvPvUk/XI LRJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=hgzR32QQPZwh+dtVCztjPL/HsW1SBV+5hOVAdyttdDY=; fh=4mNOhKok1LgwInaiu16myQpmn8f1SH+8KJcB3fEN4wU=; b=ZbPKbWxhHFrJIrOvpe9xL5KDqX6duGfVilDtNaqoNMJ3evtF3YtAHgAYCIxfjV5qXO 6wDWPNr/TDfEojTI3WpVhY3UsndC5V6qCogp53HitxRKQb6+049Q/ri6JD3w81e0JdCq NRwo5VL1jpZkSt4VE8w34RTnpad6eFmdklV3GiwanQI/3+Z3T0aEZvs6HFH/3p0drdde rPtS7EFj2w678oRVViDVdClPorQsbT8D5TQXHd0NMOJ8ueLsf3VH4VIj0bmacPRDynPE efJTMHIv+HKSSs+RZJ7qavx3Yf4cnUqobF871q9dkpW+MDYt9yT66xFeC2XlZ8dBRdUs v18A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xX4FoVQD; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q22-20020a056402033600b0052378b3cabesi183410edw.205.2023.08.09.11.23.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:23:35 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=xX4FoVQD; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D1ED33858005 for ; Wed, 9 Aug 2023 18:23:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1ED33858005 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605399; bh=hgzR32QQPZwh+dtVCztjPL/HsW1SBV+5hOVAdyttdDY=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=xX4FoVQDxWCqfy3iDUWphCnh4LKJ4g70ueElLvBBWxHUzDVavC7SlVXIwgRCksHZY DJtY6Mtimxg+UPnGpLkzKWDQR4VeGY5sGTKxY9pq/oFaKLopSNJtoJ0Xi+Zn6oxf22 WIhUOsDhyFYEF5TpjHeSW3Fifvdh7O8tTM1sTNuQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B80F63857C41 for ; Wed, 9 Aug 2023 18:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B80F63857C41 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-642-0PIagZujNP6z_xJIrLXxdA-1; Wed, 09 Aug 2023 14:22:13 -0400 X-MC-Unique: 0PIagZujNP6z_xJIrLXxdA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1DA778DC668; Wed, 9 Aug 2023 18:22:13 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D58640D2839; Wed, 9 Aug 2023 18:22:12 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IM9Vg2042964 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:22:10 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IM7ka2042963; Wed, 9 Aug 2023 20:22:07 +0200 Date: Wed, 9 Aug 2023 20:22:07 +0200 To: "Joseph S. Myers" , Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 8/12] libgcc: Generated tables for _BitInt <-> _Decimal* conversions [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776839758239254 X-GMAIL-MSGID: 1773776839758239254 Hi! The following patch adds a header with generated helper tables to support computation of powers of 10 from 10^0 to 10^6111 inclusive into a sufficiently large array of _BitInt limbs. This is split from the rest of the libgcc _BitInt support because it is quite large and together it would run into gcc-patches mail length limits. 2023-08-09 Jakub Jelinek PR c/102989 libgcc/ * soft-fp/bitintpow10.h: New file. Jakub --- libgcc/soft-fp/bitintpow10.h.jj 2023-08-08 16:23:20.234448767 +0200 +++ libgcc/soft-fp/bitintpow10.h 2023-08-09 15:16:44.086840801 +0200 @@ -0,0 +1,4947 @@ +/* Software floating-point emulation. + Generated tables for computing of powers of 10 into _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +/* The following tables have been generated using GMP library and + following helper linked with -lgmp. The tables omit least significant + limbs which contain just 0 bits (for 32-bit limbs only pairs of them) to + save space and because shifting left by bits in a limb is cheap. + +#include +#include +#include + +int +main () +{ + mpz_t a, b, c; + mpz_init2 (a, 65); + mpz_init2 (b, 2048); + mpz_init2 (c, 22000); + mpz_set_ui (b, 1); + mpz_set_ui (a, 0x10000L); + mpz_mul (a, a, a); + mpz_mul (a, a, a); + char buf[8192]; + int l = 0; + unsigned short offs32[280], offs64[280]; + printf ("static UBILtype pow10_limbs[] = {\n"); + offs32[0] = 0; + offs64[0] = 0; + for (int i = 0; i <= 256; ++i) + { + size_t s = mpz_sizeinbase (b, 2); + size_t s2 = (s + 63) / 64; + size_t s3 = ((s - 1) % 64) + 1; + size_t s4 = (s3 + 3) / 4; + char *p = buf; + offs32[l + 1] = offs32[l] + 2 * s2 - (s3 <= 32); + offs64[l + 1] = offs64[l] + s2; + ++l; + gmp_sprintf (buf, "%Zx", b); + printf (" /%c %d %c/\n ", '*', i, '*'); + int indent = 2; + if (s2 > 1) + { + printf ("BIL_SET%d (", (int) s2); + indent += 10 + (s2 >= 10); + } + if (s3 > 32) + printf ("BIL_PAIR (BIL_VAL (0x%.*s), BIL_VAL (0x%.8s))", + (int) s4 - 8, p, p + (s4 - 8)); + else + printf ("BIL_VAL (0x%.*s)", (int) s4, p); + p += s4; + for (size_t j = 1; j < s2; ++j, p += 16) + printf (",\n%*sBIL_PAIR (BIL_VAL (0x%.8s), BIL_VAL (0x%.8s))", + indent, "", p, p + 8); + if (i >= 64) + printf ("\n%*s/%c And implicit %d 0 bits. %c/", + indent, "", '*', i - (i % 64), '*'); + printf ("%s,\n", s2 > 1 ? ")" : ""); + if (*p != '\0') + abort (); + if (i != 256) + mpz_mul_ui (b, b, 10); + if ((i % 64) == 63) + mpz_divexact (b, b, a); + } + mpz_mul (c, b, b); + for (int i = 512; i <= 6111; i += 256) + { + size_t s = mpz_sizeinbase (c, 2); + size_t s2 = (s + 63) / 64; + size_t s3 = ((s - 1) % 64) + 1; + size_t s4 = (s3 + 3) / 4; + size_t s5 = (s2 + 14) / 15; + size_t s6 = s2 % 15; + if (s6 == 0) + s6 = 15; + offs32[l + 1] = offs32[l] + 2 * s2 - (s3 <= 32); + offs64[l + 1] = offs64[l] + s2; + ++l; + gmp_sprintf (buf, "%Zx", c); + printf (" /%c %d %c/\n ", '*', i, '*'); + int indent = 2; + if (s6 == 1) + { + printf ("BIL_SET%d (", (int) s5); + indent += 10 + (s5 >= 10); + } + else + { + printf ("BIL_SET%d (BIL_SET%d (", (int) s5, (int) s6); + indent += 20 + (s5 >= 10) + (s6 >= 10); + } + if (s3 > 32) + printf ("BIL_PAIR (BIL_VAL (0x%.*s), BIL_VAL (0x%.8s))", + (int) s4 - 8, buf, buf + (s4 - 8)); + else + printf ("BIL_VAL (0x%.*s)", (int) s4, buf); + for (size_t j = 1; j < s2; ++j) + { + if (j == s6) + { + if (j != 1) + printf (")"); + printf (",\n%*sBIL_SET15 (", 12 + (s5 >= 10), ""); + s6 += 15; + indent = 23 + (s5 >= 10); + } + else + printf (",\n%*s", indent, ""); + printf ("BIL_PAIR (BIL_VAL (0x%.8s), BIL_VAL (0x%.8s))", + buf + s4 + ((j - 1) * 16), + buf + s4 + ((j - 1) * 16) + 8); + } + printf ("\n%*s/%c And implicit %d 0 bits. %c/))%s\n", + indent, "", '*', i, '*', i + 256 <= 6111 ? "," : ""); + mpz_mul (c, c, b); + } + if (l != 279) + abort (); + printf ("};\n\nstatic unsigned short pow10_offs[] = {\n"); + for (l = 0; l <= 278; ++l) + printf (" /%c %d %c/ BIL_OFF (%d, %d),\n", + '*', l <= 256 ? l : (l - 255) * 256, '*', offs64[l], offs32[l]); + printf (" /%c End %c/ BIL_OFF (%d, %d)\n};\n", + '*', '*', offs64[l], offs32[l]); +} */ + +static UBILtype pow10_limbs[] = { + /* 0 */ + BIL_VAL (0x1), + /* 1 */ + BIL_VAL (0xa), + /* 2 */ + BIL_VAL (0x64), + /* 3 */ + BIL_VAL (0x3e8), + /* 4 */ + BIL_VAL (0x2710), + /* 5 */ + BIL_VAL (0x186a0), + /* 6 */ + BIL_VAL (0xf4240), + /* 7 */ + BIL_VAL (0x989680), + /* 8 */ + BIL_VAL (0x5f5e100), + /* 9 */ + BIL_VAL (0x3b9aca00), + /* 10 */ + BIL_PAIR (BIL_VAL (0x2), BIL_VAL (0x540be400)), + /* 11 */ + BIL_PAIR (BIL_VAL (0x17), BIL_VAL (0x4876e800)), + /* 12 */ + BIL_PAIR (BIL_VAL (0xe8), BIL_VAL (0xd4a51000)), + /* 13 */ + BIL_PAIR (BIL_VAL (0x918), BIL_VAL (0x4e72a000)), + /* 14 */ + BIL_PAIR (BIL_VAL (0x5af3), BIL_VAL (0x107a4000)), + /* 15 */ + BIL_PAIR (BIL_VAL (0x38d7e), BIL_VAL (0xa4c68000)), + /* 16 */ + BIL_PAIR (BIL_VAL (0x2386f2), BIL_VAL (0x6fc10000)), + /* 17 */ + BIL_PAIR (BIL_VAL (0x1634578), BIL_VAL (0x5d8a0000)), + /* 18 */ + BIL_PAIR (BIL_VAL (0xde0b6b3), BIL_VAL (0xa7640000)), + /* 19 */ + BIL_PAIR (BIL_VAL (0x8ac72304), BIL_VAL (0x89e80000)), + /* 20 */ + BIL_SET2 (BIL_VAL (0x5), + BIL_PAIR (BIL_VAL (0x6bc75e2d), BIL_VAL (0x63100000))), + /* 21 */ + BIL_SET2 (BIL_VAL (0x36), + BIL_PAIR (BIL_VAL (0x35c9adc5), BIL_VAL (0xdea00000))), + /* 22 */ + BIL_SET2 (BIL_VAL (0x21e), + BIL_PAIR (BIL_VAL (0x19e0c9ba), BIL_VAL (0xb2400000))), + /* 23 */ + BIL_SET2 (BIL_VAL (0x152d), + BIL_PAIR (BIL_VAL (0x02c7e14a), BIL_VAL (0xf6800000))), + /* 24 */ + BIL_SET2 (BIL_VAL (0xd3c2), + BIL_PAIR (BIL_VAL (0x1bcecced), BIL_VAL (0xa1000000))), + /* 25 */ + BIL_SET2 (BIL_VAL (0x84595), + BIL_PAIR (BIL_VAL (0x16140148), BIL_VAL (0x4a000000))), + /* 26 */ + BIL_SET2 (BIL_VAL (0x52b7d2), + BIL_PAIR (BIL_VAL (0xdcc80cd2), BIL_VAL (0xe4000000))), + /* 27 */ + BIL_SET2 (BIL_VAL (0x33b2e3c), + BIL_PAIR (BIL_VAL (0x9fd0803c), BIL_VAL (0xe8000000))), + /* 28 */ + BIL_SET2 (BIL_VAL (0x204fce5e), + BIL_PAIR (BIL_VAL (0x3e250261), BIL_VAL (0x10000000))), + /* 29 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x1), BIL_VAL (0x431e0fae)), + BIL_PAIR (BIL_VAL (0x6d7217ca), BIL_VAL (0xa0000000))), + /* 30 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0xc), BIL_VAL (0x9f2c9cd0)), + BIL_PAIR (BIL_VAL (0x4674edea), BIL_VAL (0x40000000))), + /* 31 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x7e), BIL_VAL (0x37be2022)), + BIL_PAIR (BIL_VAL (0xc0914b26), BIL_VAL (0x80000000))), + /* 32 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x4ee), BIL_VAL (0x2d6d415b)), + BIL_PAIR (BIL_VAL (0x85acef81), BIL_VAL (0x00000000))), + /* 33 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x314d), BIL_VAL (0xc6448d93)), + BIL_PAIR (BIL_VAL (0x38c15b0a), BIL_VAL (0x00000000))), + /* 34 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x1ed09), BIL_VAL (0xbead87c0)), + BIL_PAIR (BIL_VAL (0x378d8e64), BIL_VAL (0x00000000))), + /* 35 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x134261), BIL_VAL (0x72c74d82)), + BIL_PAIR (BIL_VAL (0x2b878fe8), BIL_VAL (0x00000000))), + /* 36 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0xc097ce), BIL_VAL (0x7bc90715)), + BIL_PAIR (BIL_VAL (0xb34b9f10), BIL_VAL (0x00000000))), + /* 37 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x785ee10), BIL_VAL (0xd5da46d9)), + BIL_PAIR (BIL_VAL (0x00f436a0), BIL_VAL (0x00000000))), + /* 38 */ + BIL_SET2 (BIL_PAIR (BIL_VAL (0x4b3b4ca8), BIL_VAL (0x5a86c47a)), + BIL_PAIR (BIL_VAL (0x098a2240), BIL_VAL (0x00000000))), + /* 39 */ + BIL_SET3 (BIL_VAL (0x2), + BIL_PAIR (BIL_VAL (0xf050fe93), BIL_VAL (0x8943acc4)), + BIL_PAIR (BIL_VAL (0x5f655680), BIL_VAL (0x00000000))), + /* 40 */ + BIL_SET3 (BIL_VAL (0x1d), + BIL_PAIR (BIL_VAL (0x6329f1c3), BIL_VAL (0x5ca4bfab)), + BIL_PAIR (BIL_VAL (0xb9f56100), BIL_VAL (0x00000000))), + /* 41 */ + BIL_SET3 (BIL_VAL (0x125), + BIL_PAIR (BIL_VAL (0xdfa371a1), BIL_VAL (0x9e6f7cb5)), + BIL_PAIR (BIL_VAL (0x4395ca00), BIL_VAL (0x00000000))), + /* 42 */ + BIL_SET3 (BIL_VAL (0xb7a), + BIL_PAIR (BIL_VAL (0xbc627050), BIL_VAL (0x305adf14)), + BIL_PAIR (BIL_VAL (0xa3d9e400), BIL_VAL (0x00000000))), + /* 43 */ + BIL_SET3 (BIL_VAL (0x72cb), + BIL_PAIR (BIL_VAL (0x5bd86321), BIL_VAL (0xe38cb6ce)), + BIL_PAIR (BIL_VAL (0x6682e800), BIL_VAL (0x00000000))), + /* 44 */ + BIL_SET3 (BIL_VAL (0x47bf1), + BIL_PAIR (BIL_VAL (0x9673df52), BIL_VAL (0xe37f2410)), + BIL_PAIR (BIL_VAL (0x011d1000), BIL_VAL (0x00000000))), + /* 45 */ + BIL_SET3 (BIL_VAL (0x2cd76f), + BIL_PAIR (BIL_VAL (0xe086b93c), BIL_VAL (0xe2f768a0)), + BIL_PAIR (BIL_VAL (0x0b22a000), BIL_VAL (0x00000000))), + /* 46 */ + BIL_SET3 (BIL_VAL (0x1c06a5e), + BIL_PAIR (BIL_VAL (0xc5433c60), BIL_VAL (0xddaa1640)), + BIL_PAIR (BIL_VAL (0x6f5a4000), BIL_VAL (0x00000000))), + /* 47 */ + BIL_SET3 (BIL_VAL (0x118427b3), + BIL_PAIR (BIL_VAL (0xb4a05bc8), BIL_VAL (0xa8a4de84)), + BIL_PAIR (BIL_VAL (0x59868000), BIL_VAL (0x00000000))), + /* 48 */ + BIL_SET3 (BIL_VAL (0xaf298d05), + BIL_PAIR (BIL_VAL (0x0e4395d6), BIL_VAL (0x9670b12b)), + BIL_PAIR (BIL_VAL (0x7f410000), BIL_VAL (0x00000000))), + /* 49 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x6), BIL_VAL (0xd79f8232)), + BIL_PAIR (BIL_VAL (0x8ea3da61), BIL_VAL (0xe066ebb2)), + BIL_PAIR (BIL_VAL (0xf88a0000), BIL_VAL (0x00000000))), + /* 50 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x44), BIL_VAL (0x6c3b15f9)), + BIL_PAIR (BIL_VAL (0x926687d2), BIL_VAL (0xc40534fd)), + BIL_PAIR (BIL_VAL (0xb5640000), BIL_VAL (0x00000000))), + /* 51 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x2ac), BIL_VAL (0x3a4edbbf)), + BIL_PAIR (BIL_VAL (0xb8014e3b), BIL_VAL (0xa83411e9)), + BIL_PAIR (BIL_VAL (0x15e80000), BIL_VAL (0x00000000))), + /* 52 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x1aba), BIL_VAL (0x4714957d)), + BIL_PAIR (BIL_VAL (0x300d0e54), BIL_VAL (0x9208b31a)), + BIL_PAIR (BIL_VAL (0xdb100000), BIL_VAL (0x00000000))), + /* 53 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x10b46), BIL_VAL (0xc6cdd6e3)), + BIL_PAIR (BIL_VAL (0xe0828f4d), BIL_VAL (0xb456ff0c)), + BIL_PAIR (BIL_VAL (0x8ea00000), BIL_VAL (0x00000000))), + /* 54 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0xa70c3), BIL_VAL (0xc40a64e6)), + BIL_PAIR (BIL_VAL (0xc5199909), BIL_VAL (0x0b65f67d)), + BIL_PAIR (BIL_VAL (0x92400000), BIL_VAL (0x00000000))), + /* 55 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x6867a5), BIL_VAL (0xa867f103)), + BIL_PAIR (BIL_VAL (0xb2fffa5a), BIL_VAL (0x71fba0e7)), + BIL_PAIR (BIL_VAL (0xb6800000), BIL_VAL (0x00000000))), + /* 56 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x4140c78), BIL_VAL (0x940f6a24)), + BIL_PAIR (BIL_VAL (0xfdffc788), BIL_VAL (0x73d4490d)), + BIL_PAIR (BIL_VAL (0x21000000), BIL_VAL (0x00000000))), + /* 57 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x28c87cb5), BIL_VAL (0xc89a2571)), + BIL_PAIR (BIL_VAL (0xebfdcb54), BIL_VAL (0x864ada83)), + BIL_PAIR (BIL_VAL (0x4a000000), BIL_VAL (0x00000000))), + /* 58 */ + BIL_SET4 (BIL_VAL (0x1), + BIL_PAIR (BIL_VAL (0x97d4df19), BIL_VAL (0xd6057673)), + BIL_PAIR (BIL_VAL (0x37e9f14d), BIL_VAL (0x3eec8920)), + BIL_PAIR (BIL_VAL (0xe4000000), BIL_VAL (0x00000000))), + /* 59 */ + BIL_SET4 (BIL_VAL (0xf), + BIL_PAIR (BIL_VAL (0xee50b702), BIL_VAL (0x5c36a080)), + BIL_PAIR (BIL_VAL (0x2f236d04), BIL_VAL (0x753d5b48)), + BIL_PAIR (BIL_VAL (0xe8000000), BIL_VAL (0x00000000))), + /* 60 */ + BIL_SET4 (BIL_VAL (0x9f), + BIL_PAIR (BIL_VAL (0x4f272617), BIL_VAL (0x9a224501)), + BIL_PAIR (BIL_VAL (0xd762422c), BIL_VAL (0x946590d9)), + BIL_PAIR (BIL_VAL (0x10000000), BIL_VAL (0x00000000))), + /* 61 */ + BIL_SET4 (BIL_VAL (0x639), + BIL_PAIR (BIL_VAL (0x17877cec), BIL_VAL (0x0556b212)), + BIL_PAIR (BIL_VAL (0x69d695bd), BIL_VAL (0xcbf7a87a)), + BIL_PAIR (BIL_VAL (0xa0000000), BIL_VAL (0x00000000))), + /* 62 */ + BIL_SET4 (BIL_VAL (0x3e3a), + BIL_PAIR (BIL_VAL (0xeb4ae138), BIL_VAL (0x3562f4b8)), + BIL_PAIR (BIL_VAL (0x2261d969), BIL_VAL (0xf7ac94ca)), + BIL_PAIR (BIL_VAL (0x40000000), BIL_VAL (0x00000000))), + /* 63 */ + BIL_SET4 (BIL_VAL (0x26e4d), + BIL_PAIR (BIL_VAL (0x30eccc32), BIL_VAL (0x15dd8f31)), + BIL_PAIR (BIL_VAL (0x57d27e23), BIL_VAL (0xacbdcfe6)), + BIL_PAIR (BIL_VAL (0x80000000), BIL_VAL (0x00000000))), + /* 64 */ + BIL_SET3 (BIL_VAL (0x184f03), + BIL_PAIR (BIL_VAL (0xe93ff9f4), BIL_VAL (0xdaa797ed)), + BIL_PAIR (BIL_VAL (0x6e38ed64), BIL_VAL (0xbf6a1f01)) + /* And implicit 64 0 bits. */), + /* 65 */ + BIL_SET3 (BIL_VAL (0xf31627), + BIL_PAIR (BIL_VAL (0x1c7fc390), BIL_VAL (0x8a8bef46)), + BIL_PAIR (BIL_VAL (0x4e3945ef), BIL_VAL (0x7a25360a)) + /* And implicit 64 0 bits. */), + /* 66 */ + BIL_SET3 (BIL_VAL (0x97edd87), + BIL_PAIR (BIL_VAL (0x1cfda3a5), BIL_VAL (0x697758bf)), + BIL_PAIR (BIL_VAL (0x0e3cbb5a), BIL_VAL (0xc5741c64)) + /* And implicit 64 0 bits. */), + /* 67 */ + BIL_SET3 (BIL_VAL (0x5ef4a747), + BIL_PAIR (BIL_VAL (0x21e86476), BIL_VAL (0x1ea97776)), + BIL_PAIR (BIL_VAL (0x8e5f518b), BIL_VAL (0xb6891be8)) + /* And implicit 64 0 bits. */), + /* 68 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x3), BIL_VAL (0xb58e88c7)), + BIL_PAIR (BIL_VAL (0x5313ec9d), BIL_VAL (0x329eaaa1)), + BIL_PAIR (BIL_VAL (0x8fb92f75), BIL_VAL (0x215b1710)) + /* And implicit 64 0 bits. */), + /* 69 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x25), BIL_VAL (0x179157c9)), + BIL_PAIR (BIL_VAL (0x3ec73e23), BIL_VAL (0xfa32aa4f)), + BIL_PAIR (BIL_VAL (0x9d3bda93), BIL_VAL (0x4d8ee6a0)) + /* And implicit 64 0 bits. */), + /* 70 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x172), BIL_VAL (0xebad6ddc)), + BIL_PAIR (BIL_VAL (0x73c86d67), BIL_VAL (0xc5faa71c)), + BIL_PAIR (BIL_VAL (0x245689c1), BIL_VAL (0x07950240)) + /* And implicit 64 0 bits. */), + /* 71 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0xe7d), BIL_VAL (0x34c64a9c)), + BIL_PAIR (BIL_VAL (0x85d4460d), BIL_VAL (0xbbca8719)), + BIL_PAIR (BIL_VAL (0x6b61618a), BIL_VAL (0x4bd21680)) + /* And implicit 64 0 bits. */), + /* 72 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x90e4), BIL_VAL (0x0fbeea1d)), + BIL_PAIR (BIL_VAL (0x3a4abc89), BIL_VAL (0x55e946fe)), + BIL_PAIR (BIL_VAL (0x31cdcf66), BIL_VAL (0xf634e100)) + /* And implicit 64 0 bits. */), + /* 73 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x5a8e8), BIL_VAL (0x9d752524)), + BIL_PAIR (BIL_VAL (0x46eb5d5d), BIL_VAL (0x5b1cc5ed)), + BIL_PAIR (BIL_VAL (0xf20a1a05), BIL_VAL (0x9e10ca00)) + /* And implicit 64 0 bits. */), + /* 74 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x389916), BIL_VAL (0x2693736a)), + BIL_PAIR (BIL_VAL (0xc531a5a5), BIL_VAL (0x8f1fbb4b)), + BIL_PAIR (BIL_VAL (0x74650438), BIL_VAL (0x2ca7e400)) + /* And implicit 64 0 bits. */), + /* 75 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x235fadd), BIL_VAL (0x81c2822b)), + BIL_PAIR (BIL_VAL (0xb3f07877), BIL_VAL (0x973d50f2)), + BIL_PAIR (BIL_VAL (0x8bf22a31), BIL_VAL (0xbe8ee800)) + /* And implicit 64 0 bits. */), + /* 76 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0x161bcca7), BIL_VAL (0x119915b5)), + BIL_PAIR (BIL_VAL (0x0764b4ab), BIL_VAL (0xe8652979)), + BIL_PAIR (BIL_VAL (0x7775a5f1), BIL_VAL (0x71951000)) + /* And implicit 64 0 bits. */), + /* 77 */ + BIL_SET3 (BIL_PAIR (BIL_VAL (0xdd15fe86), BIL_VAL (0xaffad912)), + BIL_PAIR (BIL_VAL (0x49ef0eb7), BIL_VAL (0x13f39ebe)), + BIL_PAIR (BIL_VAL (0xaa987b6e), BIL_VAL (0x6fd2a000)) + /* And implicit 64 0 bits. */), + /* 78 */ + BIL_SET4 (BIL_VAL (0x8), + BIL_PAIR (BIL_VAL (0xa2dbf142), BIL_VAL (0xdfcc7ab6)), + BIL_PAIR (BIL_VAL (0xe3569326), BIL_VAL (0xc7843372)), + BIL_PAIR (BIL_VAL (0xa9f4d250), BIL_VAL (0x5e3a4000)) + /* And implicit 64 0 bits. */), + /* 79 */ + BIL_SET4 (BIL_VAL (0x56), + BIL_PAIR (BIL_VAL (0x5c976c9c), BIL_VAL (0xbdfccb24)), + BIL_PAIR (BIL_VAL (0xe161bf83), BIL_VAL (0xcb2a027a)), + BIL_PAIR (BIL_VAL (0xa3903723), BIL_VAL (0xae468000)) + /* And implicit 64 0 bits. */), + /* 80 */ + BIL_SET4 (BIL_VAL (0x35f), + BIL_PAIR (BIL_VAL (0x9dea3e1f), BIL_VAL (0x6bdfef70)), + BIL_PAIR (BIL_VAL (0xcdd17b25), BIL_VAL (0xefa418ca)), + BIL_PAIR (BIL_VAL (0x63a22764), BIL_VAL (0xcec10000)) + /* And implicit 64 0 bits. */), + /* 81 */ + BIL_SET4 (BIL_VAL (0x21bc), + BIL_PAIR (BIL_VAL (0x2b266d3a), BIL_VAL (0x36bf5a68)), + BIL_PAIR (BIL_VAL (0x0a2ecf7b), BIL_VAL (0x5c68f7e7)), + BIL_PAIR (BIL_VAL (0xe45589f0), BIL_VAL (0x138a0000)) + /* And implicit 64 0 bits. */), + /* 82 */ + BIL_SET4 (BIL_VAL (0x15159), + BIL_PAIR (BIL_VAL (0xaf804446), BIL_VAL (0x23798810)), + BIL_PAIR (BIL_VAL (0x65d41ad1), BIL_VAL (0x9c19af0e)), + BIL_PAIR (BIL_VAL (0xeb576360), BIL_VAL (0xc3640000)) + /* And implicit 64 0 bits. */), + /* 83 */ + BIL_SET4 (BIL_VAL (0xd2d80), + BIL_PAIR (BIL_VAL (0xdb02aabd), BIL_VAL (0x62bf50a3)), + BIL_PAIR (BIL_VAL (0xfa490c30), BIL_VAL (0x1900d695)), + BIL_PAIR (BIL_VAL (0x3169e1c7), BIL_VAL (0xa1e80000)) + /* And implicit 64 0 bits. */), + /* 84 */ + BIL_SET4 (BIL_VAL (0x83c708), + BIL_PAIR (BIL_VAL (0x8e1aab65), BIL_VAL (0xdb792667)), + BIL_PAIR (BIL_VAL (0xc6da79e0), BIL_VAL (0xfa0861d3)), + BIL_PAIR (BIL_VAL (0xee22d1cc), BIL_VAL (0x53100000)) + /* And implicit 64 0 bits. */), + /* 85 */ + BIL_SET4 (BIL_VAL (0x525c655), + BIL_PAIR (BIL_VAL (0x8d0ab1fa), BIL_VAL (0x92bb800d)), + BIL_PAIR (BIL_VAL (0xc488c2c9), BIL_VAL (0xc453d247)), + BIL_PAIR (BIL_VAL (0x4d5c31fb), BIL_VAL (0x3ea00000)) + /* And implicit 64 0 bits. */), + /* 86 */ + BIL_SET4 (BIL_VAL (0x3379bf57), + BIL_PAIR (BIL_VAL (0x826af3c9), BIL_VAL (0xbb530089)), + BIL_PAIR (BIL_VAL (0xad579be1), BIL_VAL (0xab4636c9)), + BIL_PAIR (BIL_VAL (0x0599f3d0), BIL_VAL (0x72400000)) + /* And implicit 64 0 bits. */), + /* 87 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x2), BIL_VAL (0x02c1796b)), + BIL_PAIR (BIL_VAL (0x182d85e1), BIL_VAL (0x513e0560)), + BIL_PAIR (BIL_VAL (0xc56c16d0), BIL_VAL (0xb0be23da)), + BIL_PAIR (BIL_VAL (0x38038624), BIL_VAL (0x76800000)) + /* And implicit 64 0 bits. */), + /* 88 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x14), BIL_VAL (0x1b8ebe2e)), + BIL_PAIR (BIL_VAL (0xf1c73acd), BIL_VAL (0x2c6c35c7)), + BIL_PAIR (BIL_VAL (0xb638e426), BIL_VAL (0xe76d6686)), + BIL_PAIR (BIL_VAL (0x30233d6c), BIL_VAL (0xa1000000)) + /* And implicit 64 0 bits. */), + /* 89 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0xc9), BIL_VAL (0x13936dd5)), + BIL_PAIR (BIL_VAL (0x71c84c03), BIL_VAL (0xbc3a19cd)), + BIL_PAIR (BIL_VAL (0x1e38e985), BIL_VAL (0x0a46013d)), + BIL_PAIR (BIL_VAL (0xe160663e), BIL_VAL (0x4a000000)) + /* And implicit 64 0 bits. */), + /* 90 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x7da), BIL_VAL (0xc3c24a56)), + BIL_PAIR (BIL_VAL (0x71d2f825), BIL_VAL (0x5a450203)), + BIL_PAIR (BIL_VAL (0x2e391f32), BIL_VAL (0x66bc0c6a)), + BIL_PAIR (BIL_VAL (0xcdc3fe6e), BIL_VAL (0xe4000000)) + /* And implicit 64 0 bits. */), + /* 91 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x4e8b), BIL_VAL (0xa596e760)), + BIL_PAIR (BIL_VAL (0x723db175), BIL_VAL (0x86b2141f)), + BIL_PAIR (BIL_VAL (0xce3b37f8), BIL_VAL (0x03587c2c)), + BIL_PAIR (BIL_VAL (0x09a7f054), BIL_VAL (0xe8000000)) + /* And implicit 64 0 bits. */), + /* 92 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x31174), BIL_VAL (0x77e509c4)), + BIL_PAIR (BIL_VAL (0x7668ee97), BIL_VAL (0x42f4c93e)), + BIL_PAIR (BIL_VAL (0x0e502fb0), BIL_VAL (0x2174d9b8)), + BIL_PAIR (BIL_VAL (0x608f6351), BIL_VAL (0x10000000)) + /* And implicit 64 0 bits. */), + /* 93 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x1eae8c), BIL_VAL (0xaef261ac)), + BIL_PAIR (BIL_VAL (0xa01951e8), BIL_VAL (0x9d8fdc6c)), + BIL_PAIR (BIL_VAL (0x8f21dce1), BIL_VAL (0x4e908133)), + BIL_PAIR (BIL_VAL (0xc599e12a), BIL_VAL (0xa0000000)) + /* And implicit 64 0 bits. */), + /* 94 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x132d17e), BIL_VAL (0xd577d0be)), + BIL_PAIR (BIL_VAL (0x40fd3316), BIL_VAL (0x279e9c3d)), + BIL_PAIR (BIL_VAL (0x9752a0cd), BIL_VAL (0x11a50c05)), + BIL_PAIR (BIL_VAL (0xb802cbaa), BIL_VAL (0x40000000)) + /* And implicit 64 0 bits. */), + /* 95 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0xbfc2ef4), BIL_VAL (0x56ae276e)), + BIL_PAIR (BIL_VAL (0x89e3fedd), BIL_VAL (0x8c321a67)), + BIL_PAIR (BIL_VAL (0xe93a4802), BIL_VAL (0xb0727839)), + BIL_PAIR (BIL_VAL (0x301bf4a6), BIL_VAL (0x80000000)) + /* And implicit 64 0 bits. */), + /* 96 */ + BIL_SET4 (BIL_PAIR (BIL_VAL (0x77d9d58b), BIL_VAL (0x62cd8a51)), + BIL_PAIR (BIL_VAL (0x62e7f4a7), BIL_VAL (0x79f5080f)), + BIL_PAIR (BIL_VAL (0x1c46d01a), BIL_VAL (0xe478b23b)), + BIL_PAIR (BIL_VAL (0xe1178e81), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 97 */ + BIL_SET5 (BIL_VAL (0x4), + BIL_PAIR (BIL_VAL (0xae825771), BIL_VAL (0xdc07672d)), + BIL_PAIR (BIL_VAL (0xdd0f8e8a), BIL_VAL (0xc3925097)), + BIL_PAIR (BIL_VAL (0x1ac4210c), BIL_VAL (0xecb6f656)), + BIL_PAIR (BIL_VAL (0xcaeb910a), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 98 */ + BIL_SET5 (BIL_VAL (0x2e), + BIL_PAIR (BIL_VAL (0xd1176a72), BIL_VAL (0x984a07ca)), + BIL_PAIR (BIL_VAL (0xa29b916b), BIL_VAL (0xa3b725e7)), + BIL_PAIR (BIL_VAL (0x0ba94a81), BIL_VAL (0x3f259f63)), + BIL_PAIR (BIL_VAL (0xed33aa64), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 99 */ + BIL_SET5 (BIL_VAL (0x1d4), + BIL_PAIR (BIL_VAL (0x2aea2879), BIL_VAL (0xf2e44dea)), + BIL_PAIR (BIL_VAL (0x5a13ae34), BIL_VAL (0x65277b06)), + BIL_PAIR (BIL_VAL (0x749ce90c), BIL_VAL (0x777839e7)), + BIL_PAIR (BIL_VAL (0x4404a7e8), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 100 */ + BIL_SET5 (BIL_VAL (0x1249), + BIL_PAIR (BIL_VAL (0xad2594c3), BIL_VAL (0x7ceb0b27)), + BIL_PAIR (BIL_VAL (0x84c4ce0b), BIL_VAL (0xf38ace40)), + BIL_PAIR (BIL_VAL (0x8e211a7c), BIL_VAL (0xaab24308)), + BIL_PAIR (BIL_VAL (0xa82e8f10), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 101 */ + BIL_SET5 (BIL_VAL (0xb6e0), + BIL_PAIR (BIL_VAL (0xc377cfa2), BIL_VAL (0xe12e6f8b)), + BIL_PAIR (BIL_VAL (0x2fb00c77), BIL_VAL (0x836c0e85)), + BIL_PAIR (BIL_VAL (0x8d4b08de), BIL_VAL (0xaaf69e56)), + BIL_PAIR (BIL_VAL (0x91d196a0), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 102 */ + BIL_SET5 (BIL_VAL (0x724c7), + BIL_PAIR (BIL_VAL (0xa2ae1c5c), BIL_VAL (0xcbd05b6f)), + BIL_PAIR (BIL_VAL (0xdce07cab), BIL_VAL (0x22389137)), + BIL_PAIR (BIL_VAL (0x84ee58b2), BIL_VAL (0xada22f61)), + BIL_PAIR (BIL_VAL (0xb22fe240), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 103 */ + BIL_SET5 (BIL_VAL (0x476fcc), + BIL_PAIR (BIL_VAL (0x5acd1b9f), BIL_VAL (0xf623925e)), + BIL_PAIR (BIL_VAL (0xa0c4deaf), BIL_VAL (0x5635ac2b)), + BIL_PAIR (BIL_VAL (0x314f76fa), BIL_VAL (0xc855d9d0)), + BIL_PAIR (BIL_VAL (0xf5ded680), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 104 */ + BIL_SET5 (BIL_VAL (0x2ca5dfb), + BIL_PAIR (BIL_VAL (0x8c03143f), BIL_VAL (0x9d63b7b2)), + BIL_PAIR (BIL_VAL (0x47b0b2d9), BIL_VAL (0x5e18b9af)), + BIL_PAIR (BIL_VAL (0xed1aa5cb), BIL_VAL (0xd35a8229)), + BIL_PAIR (BIL_VAL (0x9ab46100), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 105 */ + BIL_SET5 (BIL_VAL (0x1be7abd3), + BIL_PAIR (BIL_VAL (0x781eca7c), BIL_VAL (0x25e52cf6)), + BIL_PAIR (BIL_VAL (0xcce6fc7d), BIL_VAL (0xacf740df)), + BIL_PAIR (BIL_VAL (0x430a79f6), BIL_VAL (0x418915a0)), + BIL_PAIR (BIL_VAL (0x0b0bca00), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 106 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x1), BIL_VAL (0x170cb642)), + BIL_PAIR (BIL_VAL (0xb133e8d9), BIL_VAL (0x7af3c1a4)), + BIL_PAIR (BIL_VAL (0x0105dce8), BIL_VAL (0xc1a888b8)), + BIL_PAIR (BIL_VAL (0x9e68c39e), BIL_VAL (0x8f5ad840)), + BIL_PAIR (BIL_VAL (0x6e75e400), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 107 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0xa), BIL_VAL (0xe67f1e9a)), + BIL_PAIR (BIL_VAL (0xec07187e), BIL_VAL (0xcd859068)), + BIL_PAIR (BIL_VAL (0x0a3aa117), BIL_VAL (0x90955736)), + BIL_PAIR (BIL_VAL (0x3017a431), BIL_VAL (0x998c7284)), + BIL_PAIR (BIL_VAL (0x509ae800), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 108 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x6d), BIL_VAL (0x00f7320d)), + BIL_PAIR (BIL_VAL (0x3846f4f4), BIL_VAL (0x0737a410)), + BIL_PAIR (BIL_VAL (0x664a4aeb), BIL_VAL (0xa5d5681d)), + BIL_PAIR (BIL_VAL (0xe0ec69ef), BIL_VAL (0xff7c792b)), + BIL_PAIR (BIL_VAL (0x260d1000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 109 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x442), BIL_VAL (0x09a7f484)), + BIL_PAIR (BIL_VAL (0x32c59188), BIL_VAL (0x482c68a3)), + BIL_PAIR (BIL_VAL (0xfee6ed34), BIL_VAL (0x7a56112a)), + BIL_PAIR (BIL_VAL (0xc93c235f), BIL_VAL (0xfadcbbaf)), + BIL_PAIR (BIL_VAL (0x7c82a000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 110 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x2a94), BIL_VAL (0x608f8d29)), + BIL_PAIR (BIL_VAL (0xfbb7af52), BIL_VAL (0xd1bc1667)), + BIL_PAIR (BIL_VAL (0xf505440c), BIL_VAL (0xc75cabab)), + BIL_PAIR (BIL_VAL (0xdc5961bf), BIL_VAL (0xcc9f54da)), + BIL_PAIR (BIL_VAL (0xdd1a4000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 111 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x1a9cb), BIL_VAL (0xc59b83a3)), + BIL_PAIR (BIL_VAL (0xd52cd93c), BIL_VAL (0x3158e00f)), + BIL_PAIR (BIL_VAL (0x9234a87f), BIL_VAL (0xc99eb4b6)), + BIL_PAIR (BIL_VAL (0x9b7dd17d), BIL_VAL (0xfe39508c)), + BIL_PAIR (BIL_VAL (0xa3068000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 112 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x10a1f5), BIL_VAL (0xb8132466)), + BIL_PAIR (BIL_VAL (0x53c07c59), BIL_VAL (0xed78c09b)), + BIL_PAIR (BIL_VAL (0xb60e94fd), BIL_VAL (0xe0330f22)), + BIL_PAIR (BIL_VAL (0x12ea2eeb), BIL_VAL (0xee3d257e)), + BIL_PAIR (BIL_VAL (0x5e410000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 113 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0xa65399), BIL_VAL (0x30bf6bff)), + BIL_PAIR (BIL_VAL (0x4584db83), BIL_VAL (0x46b78615)), + BIL_PAIR (BIL_VAL (0x1c91d1ea), BIL_VAL (0xc1fe9754)), + BIL_PAIR (BIL_VAL (0xbd25d537), BIL_VAL (0x4e6376ef)), + BIL_PAIR (BIL_VAL (0xae8a0000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 114 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x67f43fb), BIL_VAL (0xe77a37f8)), + BIL_PAIR (BIL_VAL (0xb7309320), BIL_VAL (0xc32b3cd3)), + BIL_PAIR (BIL_VAL (0x1db2332b), BIL_VAL (0x93f1e94f)), + BIL_PAIR (BIL_VAL (0x637a5429), BIL_VAL (0x0fe2a55c)), + BIL_PAIR (BIL_VAL (0xd1640000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 115 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x40f8a7d7), BIL_VAL (0x0ac62fb7)), + BIL_PAIR (BIL_VAL (0x27e5bf47), BIL_VAL (0x9fb0603f)), + BIL_PAIR (BIL_VAL (0x28f5ffb3), BIL_VAL (0xc7731d19)), + BIL_PAIR (BIL_VAL (0xe2c7499a), BIL_VAL (0x9eda75a0)), + BIL_PAIR (BIL_VAL (0x2de80000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 116 */ + BIL_SET6 (BIL_VAL (0x2), + BIL_PAIR (BIL_VAL (0x89b68e66), BIL_VAL (0x6bbddd27)), + BIL_PAIR (BIL_VAL (0x8ef978cc), BIL_VAL (0x3ce3c277)), + BIL_PAIR (BIL_VAL (0x999bfd05), BIL_VAL (0xca7f2302)), + BIL_PAIR (BIL_VAL (0xdbc8e00a), BIL_VAL (0x34889841)), + BIL_PAIR (BIL_VAL (0xcb100000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 117 */ + BIL_SET6 (BIL_VAL (0x19), + BIL_PAIR (BIL_VAL (0x61219000), BIL_VAL (0x356aa38b)), + BIL_PAIR (BIL_VAL (0x95beb7fa), BIL_VAL (0x60e598ac)), + BIL_PAIR (BIL_VAL (0x0017e239), BIL_VAL (0xe8f75e1c)), + BIL_PAIR (BIL_VAL (0x95d8c066), BIL_VAL (0x0d55f291)), + BIL_PAIR (BIL_VAL (0xeea00000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 118 */ + BIL_SET6 (BIL_VAL (0xfd), + BIL_PAIR (BIL_VAL (0xcb4fa002), BIL_VAL (0x162a6373)), + BIL_PAIR (BIL_VAL (0xd9732fc7), BIL_VAL (0xc8f7f6b8)), + BIL_PAIR (BIL_VAL (0x00eed643), BIL_VAL (0x19a9ad1d)), + BIL_PAIR (BIL_VAL (0xda7783fc), BIL_VAL (0x855b79b3)), + BIL_PAIR (BIL_VAL (0x52400000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 119 */ + BIL_SET6 (BIL_VAL (0x9e9), + BIL_PAIR (BIL_VAL (0xf11c4014), BIL_VAL (0xdda7e286)), + BIL_PAIR (BIL_VAL (0x7e7fddcd), BIL_VAL (0xd9afa330)), + BIL_PAIR (BIL_VAL (0x09545e9f), BIL_VAL (0x00a0c32a)), + BIL_PAIR (BIL_VAL (0x88ab27dd), BIL_VAL (0x3592c101)), + BIL_PAIR (BIL_VAL (0x36800000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 120 */ + BIL_SET6 (BIL_VAL (0x6323), + BIL_PAIR (BIL_VAL (0x6b1a80d0), BIL_VAL (0xa88ed940)), + BIL_PAIR (BIL_VAL (0xf0feaa0a), BIL_VAL (0x80dc5fe0)), + BIL_PAIR (BIL_VAL (0x5d4bb236), BIL_VAL (0x06479fa9)), + BIL_PAIR (BIL_VAL (0x56af8ea4), BIL_VAL (0x17bb8a0c)), + BIL_PAIR (BIL_VAL (0x21000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 121 */ + BIL_SET6 (BIL_VAL (0x3df62), + BIL_PAIR (BIL_VAL (0x2f090826), BIL_VAL (0x95947c89)), + BIL_PAIR (BIL_VAL (0x69f2a469), BIL_VAL (0x089bbec3)), + BIL_PAIR (BIL_VAL (0xa4f4f61c), BIL_VAL (0x3ecc3c9d)), + BIL_PAIR (BIL_VAL (0x62db9268), BIL_VAL (0xed536479)), + BIL_PAIR (BIL_VAL (0x4a000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 122 */ + BIL_SET6 (BIL_VAL (0x26b9d5), + BIL_PAIR (BIL_VAL (0xd65a5181), BIL_VAL (0xd7ccdd5e)), + BIL_PAIR (BIL_VAL (0x237a6c1a), BIL_VAL (0x561573a4)), + BIL_PAIR (BIL_VAL (0x71919d1a), BIL_VAL (0x73fa5e25)), + BIL_PAIR (BIL_VAL (0xdc93b819), BIL_VAL (0x4541ecbc)), + BIL_PAIR (BIL_VAL (0xe4000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 123 */ + BIL_SET6 (BIL_VAL (0x183425a), + BIL_PAIR (BIL_VAL (0x5f872f12), BIL_VAL (0x6e00a5ad)), + BIL_PAIR (BIL_VAL (0x62c83907), BIL_VAL (0x5cd6846c)), + BIL_PAIR (BIL_VAL (0x6fb02308), BIL_VAL (0x87c7ad7a)), + BIL_PAIR (BIL_VAL (0x9dc530fc), BIL_VAL (0xb4933f60)), + BIL_PAIR (BIL_VAL (0xe8000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 124 */ + BIL_SET6 (BIL_VAL (0xf209787), + BIL_PAIR (BIL_VAL (0xbb47d6b8), BIL_VAL (0x4c0678c5)), + BIL_PAIR (BIL_VAL (0xdbd23a49), BIL_VAL (0xa0612c3c)), + BIL_PAIR (BIL_VAL (0x5ce15e55), BIL_VAL (0x4dccc6ca)), + BIL_PAIR (BIL_VAL (0x29b3e9df), BIL_VAL (0x0dc079c9)), + BIL_PAIR (BIL_VAL (0x10000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 125 */ + BIL_SET6 (BIL_VAL (0x9745eb4d), + BIL_PAIR (BIL_VAL (0x50ce6332), BIL_VAL (0xf840b7ba)), + BIL_PAIR (BIL_VAL (0x963646e0), BIL_VAL (0x43cbba5b)), + BIL_PAIR (BIL_VAL (0xa0cdaf55), BIL_VAL (0x09ffc3e5)), + BIL_PAIR (BIL_VAL (0xa10722b6), BIL_VAL (0x8984c1da)), + BIL_PAIR (BIL_VAL (0xa0000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 126 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x5), BIL_VAL (0xe8bb3105)), + BIL_PAIR (BIL_VAL (0x280fdffd), BIL_VAL (0xb2872d49)), + BIL_PAIR (BIL_VAL (0xde1ec4c2), BIL_VAL (0xa5f54794)), + BIL_PAIR (BIL_VAL (0x4808d952), BIL_VAL (0x63fda6f8)), + BIL_PAIR (BIL_VAL (0x4a475b21), BIL_VAL (0x5f2f928a)), + BIL_PAIR (BIL_VAL (0x40000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 127 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x3b), BIL_VAL (0x174fea33)), + BIL_PAIR (BIL_VAL (0x909ebfe8), BIL_VAL (0xf947c4e2)), + BIL_PAIR (BIL_VAL (0xad33af9a), BIL_VAL (0x7b94cbca)), + BIL_PAIR (BIL_VAL (0xd0587d37), BIL_VAL (0xe7e885b2)), + BIL_PAIR (BIL_VAL (0xe6c98f4d), BIL_VAL (0xb7dbb966)), + BIL_PAIR (BIL_VAL (0x80000000), BIL_VAL (0x00000000)) + /* And implicit 64 0 bits. */), + /* 128 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x24e), BIL_VAL (0xe91f2603)), + BIL_PAIR (BIL_VAL (0xa6337f19), BIL_VAL (0xbccdb0da)), + BIL_PAIR (BIL_VAL (0xc404dc08), BIL_VAL (0xd3cff5ec)), + BIL_PAIR (BIL_VAL (0x2374e42f), BIL_VAL (0x0f1538fd)), + BIL_PAIR (BIL_VAL (0x03df9909), BIL_VAL (0x2e953e01)) + /* And implicit 128 0 bits. */), + /* 129 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x1715), BIL_VAL (0x1b377c24)), + BIL_PAIR (BIL_VAL (0x7e02f701), BIL_VAL (0x6008e88b)), + BIL_PAIR (BIL_VAL (0xa8309858), BIL_VAL (0x461f9b39)), + BIL_PAIR (BIL_VAL (0x6290e9d6), BIL_VAL (0x96d439e2)), + BIL_PAIR (BIL_VAL (0x26bbfa5b), BIL_VAL (0xd1d46c0a)) + /* And implicit 128 0 bits. */), + /* 130 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0xe6d3), BIL_VAL (0x102ad96c)), + BIL_PAIR (BIL_VAL (0xec1da60d), BIL_VAL (0xc0591574)), + BIL_PAIR (BIL_VAL (0x91e5f372), BIL_VAL (0xbd3c103d)), + BIL_PAIR (BIL_VAL (0xd9a92261), BIL_VAL (0xe44a42d5)), + BIL_PAIR (BIL_VAL (0x8357c796), BIL_VAL (0x324c3864)) + /* And implicit 128 0 bits. */), + /* 131 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x9043e), BIL_VAL (0xa1ac7e41)), + BIL_PAIR (BIL_VAL (0x39287c89), BIL_VAL (0x837ad68d)), + BIL_PAIR (BIL_VAL (0xb2fb827b), BIL_VAL (0x6458a26a)), + BIL_PAIR (BIL_VAL (0x809b57d2), BIL_VAL (0xeae69c57)), + BIL_PAIR (BIL_VAL (0x216dcbdd), BIL_VAL (0xf6fa33e8)) + /* And implicit 128 0 bits. */), + /* 132 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x5a2a72), BIL_VAL (0x50bcee8c)), + BIL_PAIR (BIL_VAL (0x3b94dd5f), BIL_VAL (0x22cc6188)), + BIL_PAIR (BIL_VAL (0xfdd318d1), BIL_VAL (0xeb765829)), + BIL_PAIR (BIL_VAL (0x06116e3d), BIL_VAL (0x2d021b67)), + BIL_PAIR (BIL_VAL (0x4e49f6ab), BIL_VAL (0xa5c60710)) + /* And implicit 128 0 bits. */), + /* 133 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x385a877), BIL_VAL (0x2761517a)), + BIL_PAIR (BIL_VAL (0x53d0a5b7), BIL_VAL (0x5bfbcf59)), + BIL_PAIR (BIL_VAL (0xea3ef833), BIL_VAL (0x329f719a)), + BIL_PAIR (BIL_VAL (0x3cae4e63), BIL_VAL (0xc2151209)), + BIL_PAIR (BIL_VAL (0x0ee3a2b4), BIL_VAL (0x79bc46a0)) + /* And implicit 128 0 bits. */), + /* 134 */ + BIL_SET5 (BIL_PAIR (BIL_VAL (0x233894a7), BIL_VAL (0x89cd2ec7)), + BIL_PAIR (BIL_VAL (0x46267929), BIL_VAL (0x97d61983)), + BIL_PAIR (BIL_VAL (0x2675b1ff), BIL_VAL (0xfa3a7006)), + BIL_PAIR (BIL_VAL (0x5ecf0fe5), BIL_VAL (0x94d2b45a)), + BIL_PAIR (BIL_VAL (0x94e45b0c), BIL_VAL (0xc15ac240)) + /* And implicit 128 0 bits. */), + /* 135 */ + BIL_SET6 (BIL_VAL (0x1), + BIL_PAIR (BIL_VAL (0x6035ce8b), BIL_VAL (0x6203d3c8)), + BIL_PAIR (BIL_VAL (0xbd80bb9f), BIL_VAL (0xee5cff1f)), + BIL_PAIR (BIL_VAL (0x8098f3ff), BIL_VAL (0xc648603f)), + BIL_PAIR (BIL_VAL (0xb4169ef7), BIL_VAL (0xd03b0b89)), + BIL_PAIR (BIL_VAL (0xd0eb8e7f), BIL_VAL (0x8d8b9680)) + /* And implicit 128 0 bits. */), + /* 136 */ + BIL_SET6 (BIL_VAL (0xd), + BIL_PAIR (BIL_VAL (0xc21a1171), BIL_VAL (0xd42645d7)), + BIL_PAIR (BIL_VAL (0x6707543f), BIL_VAL (0x4fa1f73b)), + BIL_PAIR (BIL_VAL (0x05f987fd), BIL_VAL (0xbed3c27d)), + BIL_PAIR (BIL_VAL (0x08e235ae), BIL_VAL (0x224e7362)), + BIL_PAIR (BIL_VAL (0x293390fb), BIL_VAL (0x8773e100)) + /* And implicit 128 0 bits. */), + /* 137 */ + BIL_SET6 (BIL_VAL (0x89), + BIL_PAIR (BIL_VAL (0x9504ae72), BIL_VAL (0x497eba6a)), + BIL_PAIR (BIL_VAL (0x06494a79), BIL_VAL (0x1c53a84e)), + BIL_PAIR (BIL_VAL (0x3bbf4fe9), BIL_VAL (0x744598e2)), + BIL_PAIR (BIL_VAL (0x58d618cd), BIL_VAL (0x571081d5)), + BIL_PAIR (BIL_VAL (0x9c03a9d3), BIL_VAL (0x4a86ca00)) + /* And implicit 128 0 bits. */), + /* 138 */ + BIL_SET6 (BIL_VAL (0x55f), + BIL_PAIR (BIL_VAL (0xd22ed076), BIL_VAL (0xdef34824)), + BIL_PAIR (BIL_VAL (0x3edce8bb), BIL_VAL (0x1b44930e)), + BIL_PAIR (BIL_VAL (0x55791f1e), BIL_VAL (0x8ab7f8d7)), + BIL_PAIR (BIL_VAL (0x785cf805), BIL_VAL (0x66a51258)), + BIL_PAIR (BIL_VAL (0x1824a240), BIL_VAL (0xe943e400)) + /* And implicit 128 0 bits. */), + /* 139 */ + BIL_SET6 (BIL_VAL (0x35be), + BIL_PAIR (BIL_VAL (0x35d424a4), BIL_VAL (0xb580d16a)), + BIL_PAIR (BIL_VAL (0x74a1174f), BIL_VAL (0x10adbe8f)), + BIL_PAIR (BIL_VAL (0x56bb3731), BIL_VAL (0x6b2fb86a)), + BIL_PAIR (BIL_VAL (0xb3a1b036), BIL_VAL (0x0272b770)), + BIL_PAIR (BIL_VAL (0xf16e5689), BIL_VAL (0x1ca6e800)) + /* And implicit 128 0 bits. */), + /* 140 */ + BIL_SET6 (BIL_VAL (0x2196e), + BIL_PAIR (BIL_VAL (0x1a496e6f), BIL_VAL (0x17082e28)), + BIL_PAIR (BIL_VAL (0x8e4ae916), BIL_VAL (0xa6c97199)), + BIL_PAIR (BIL_VAL (0x635027ee), BIL_VAL (0x2fdd342b)), + BIL_PAIR (BIL_VAL (0x0450e21c), BIL_VAL (0x187b2a69)), + BIL_PAIR (BIL_VAL (0x6e4f615b), BIL_VAL (0x1e851000)) + /* And implicit 128 0 bits. */), + /* 141 */ + BIL_SET6 (BIL_VAL (0x14fe4d), + BIL_PAIR (BIL_VAL (0x06de5056), BIL_VAL (0xe651cd95)), + BIL_PAIR (BIL_VAL (0x8eed1ae2), BIL_VAL (0x83de6ffd)), + BIL_PAIR (BIL_VAL (0xe1218f4d), BIL_VAL (0xdea409ae)), + BIL_PAIR (BIL_VAL (0x2b28d518), BIL_VAL (0xf4cfa81e)), + BIL_PAIR (BIL_VAL (0x4f19cd8f), BIL_VAL (0x3132a000)) + /* And implicit 128 0 bits. */), + /* 142 */ + BIL_SET6 (BIL_VAL (0xd1ef02), + BIL_PAIR (BIL_VAL (0x44af2364), BIL_VAL (0xff3207d7)), + BIL_PAIR (BIL_VAL (0x95430cd9), BIL_VAL (0x26b05fea)), + BIL_PAIR (BIL_VAL (0xcb4f990a), BIL_VAL (0xb26860cd)), + BIL_PAIR (BIL_VAL (0xaf9852f9), BIL_VAL (0x901c912f)), + BIL_PAIR (BIL_VAL (0x17020797), BIL_VAL (0xebfa4000)) + /* And implicit 128 0 bits. */), + /* 143 */ + BIL_SET6 (BIL_VAL (0x8335616), + BIL_PAIR (BIL_VAL (0xaed761f1), BIL_VAL (0xf7f44e6b)), + BIL_PAIR (BIL_VAL (0xd49e807b), BIL_VAL (0x82e3bf2b)), + BIL_PAIR (BIL_VAL (0xf11bfa6a), BIL_VAL (0xf813c808)), + BIL_PAIR (BIL_VAL (0xdbf33dbf), BIL_VAL (0xa11dabd6)), + BIL_PAIR (BIL_VAL (0xe6144bef), BIL_VAL (0x37c68000)) + /* And implicit 128 0 bits. */), + /* 144 */ + BIL_SET6 (BIL_VAL (0x52015ce2), + BIL_PAIR (BIL_VAL (0xd469d373), BIL_VAL (0xaf8b1036)), + BIL_PAIR (BIL_VAL (0x4e3104d3), BIL_VAL (0x1ce577b7)), + BIL_PAIR (BIL_VAL (0x6b17c82d), BIL_VAL (0xb0c5d058)), + BIL_PAIR (BIL_VAL (0x9780697c), BIL_VAL (0x4b28b664)), + BIL_PAIR (BIL_VAL (0xfccaf758), BIL_VAL (0x2dc10000)) + /* And implicit 128 0 bits. */), + /* 145 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x3), BIL_VAL (0x340da0dc)), + BIL_PAIR (BIL_VAL (0x4c224284), BIL_VAL (0xdb6ea21f)), + BIL_PAIR (BIL_VAL (0x0dea303f), BIL_VAL (0x20f6ad2a)), + BIL_PAIR (BIL_VAL (0x2eedd1c8), BIL_VAL (0xe7ba2375)), + BIL_PAIR (BIL_VAL (0xeb041eda), BIL_VAL (0xef971ff1)), + BIL_PAIR (BIL_VAL (0xdfeda971), BIL_VAL (0xc98a0000)) + /* And implicit 128 0 bits. */), + /* 146 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x20), BIL_VAL (0x0888489a)), + BIL_PAIR (BIL_VAL (0xf9569930), BIL_VAL (0x92525536)), + BIL_PAIR (BIL_VAL (0x8b25e277), BIL_VAL (0x49a2c3a5)), + BIL_PAIR (BIL_VAL (0xd54a31d9), BIL_VAL (0x0d45629b)), + BIL_PAIR (BIL_VAL (0x2e29348d), BIL_VAL (0x5be73f72)), + BIL_PAIR (BIL_VAL (0xbf489e71), BIL_VAL (0xdf640000)) + /* And implicit 128 0 bits. */), + /* 147 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x140), BIL_VAL (0x5552d60d)), + BIL_PAIR (BIL_VAL (0xbd61fbe5), BIL_VAL (0xb7375421)), + BIL_PAIR (BIL_VAL (0x6f7ad8a8), BIL_VAL (0xe05ba47a)), + BIL_PAIR (BIL_VAL (0x54e5f27a), BIL_VAL (0x84b5da0f)), + BIL_PAIR (BIL_VAL (0xcd9c0d85), BIL_VAL (0x97087a7b)), + BIL_PAIR (BIL_VAL (0x78d63072), BIL_VAL (0xb9e80000)) + /* And implicit 128 0 bits. */), + /* 148 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0xc83), BIL_VAL (0x553c5c89)), + BIL_PAIR (BIL_VAL (0x65d3d6f9), BIL_VAL (0x2829494e)), + BIL_PAIR (BIL_VAL (0x5acc7698), BIL_VAL (0xc3946cc7)), + BIL_PAIR (BIL_VAL (0x50fb78c9), BIL_VAL (0x2f1a849e)), + BIL_PAIR (BIL_VAL (0x08188737), BIL_VAL (0xe654c8d2)), + BIL_PAIR (BIL_VAL (0xb85de47b), BIL_VAL (0x43100000)) + /* And implicit 128 0 bits. */), + /* 149 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x7d21), BIL_VAL (0x545b9d5d)), + BIL_PAIR (BIL_VAL (0xfa4665bb), BIL_VAL (0x919cdd0f)), + BIL_PAIR (BIL_VAL (0x8bfca1f7), BIL_VAL (0xa3cc3fc9)), + BIL_PAIR (BIL_VAL (0x29d2b7db), BIL_VAL (0xd7092e2c)), + BIL_PAIR (BIL_VAL (0x50f5482e), BIL_VAL (0xff4fd83b)), + BIL_PAIR (BIL_VAL (0x33aaecd0), BIL_VAL (0x9ea00000)) + /* And implicit 128 0 bits. */), + /* 150 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x4e34d), BIL_VAL (0x4b9425ab)), + BIL_PAIR (BIL_VAL (0xc6bff953), BIL_VAL (0xb020a29b)), + BIL_PAIR (BIL_VAL (0x77de53ac), BIL_VAL (0x65fa7ddb)), + BIL_PAIR (BIL_VAL (0xa23b2e96), BIL_VAL (0x665bcdbb)), + BIL_PAIR (BIL_VAL (0x2994d1d5), BIL_VAL (0xf91e7250)), + BIL_PAIR (BIL_VAL (0x04ad4026), BIL_VAL (0x32400000)) + /* And implicit 128 0 bits. */), + /* 151 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x30e104), BIL_VAL (0xf3c978b5)), + BIL_PAIR (BIL_VAL (0xc37fbd44), BIL_VAL (0xe1465a12)), + BIL_PAIR (BIL_VAL (0xaeaf44bb), BIL_VAL (0xfbc8ea94)), + BIL_PAIR (BIL_VAL (0x564fd1df), BIL_VAL (0xff96094f)), + BIL_PAIR (BIL_VAL (0x9fd0325b), BIL_VAL (0xbb307720)), + BIL_PAIR (BIL_VAL (0x2ec4817d), BIL_VAL (0xf6800000)) + /* And implicit 128 0 bits. */), + /* 152 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x1e8ca31), BIL_VAL (0x85deb719)), + BIL_PAIR (BIL_VAL (0xa2fd64b0), BIL_VAL (0xccbf84ba)), + BIL_PAIR (BIL_VAL (0xd2d8af57), BIL_VAL (0xd5d929cb)), + BIL_PAIR (BIL_VAL (0x5f1e32bf), BIL_VAL (0xfbdc5d1c)), + BIL_PAIR (BIL_VAL (0x3e21f795), BIL_VAL (0x4fe4a741)), + BIL_PAIR (BIL_VAL (0xd3ad0eeb), BIL_VAL (0xa1000000)) + /* And implicit 128 0 bits. */), + /* 153 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0x1317e5ef), BIL_VAL (0x3ab32700)), + BIL_PAIR (BIL_VAL (0x5de5eee7), BIL_VAL (0xff7b2f4c)), + BIL_PAIR (BIL_VAL (0x3c76d96e), BIL_VAL (0x5a7ba1f1)), + BIL_PAIR (BIL_VAL (0xb72dfb7f), BIL_VAL (0xd69ba31a)), + BIL_PAIR (BIL_VAL (0x6d53abd5), BIL_VAL (0x1eee8892)), + BIL_PAIR (BIL_VAL (0x44c29534), BIL_VAL (0x4a000000)) + /* And implicit 128 0 bits. */), + /* 154 */ + BIL_SET6 (BIL_PAIR (BIL_VAL (0xbeeefb58), BIL_VAL (0x4aff8603)), + BIL_PAIR (BIL_VAL (0xaafb550f), BIL_VAL (0xfacfd8fa)), + BIL_PAIR (BIL_VAL (0x5ca47e4f), BIL_VAL (0x88d45371)), + BIL_PAIR (BIL_VAL (0x27cbd2fe), BIL_VAL (0x62145f08)), + BIL_PAIR (BIL_VAL (0x4544b653), BIL_VAL (0x355155b6)), + BIL_PAIR (BIL_VAL (0xaf99d40a), BIL_VAL (0xe4000000)) + /* And implicit 128 0 bits. */), + /* 155 */ + BIL_SET7 (BIL_VAL (0x7), + BIL_PAIR (BIL_VAL (0x7555d172), BIL_VAL (0xedfb3c24)), + BIL_PAIR (BIL_VAL (0xadd1529f), BIL_VAL (0xcc1e79c7)), + BIL_PAIR (BIL_VAL (0x9e6cef1b), BIL_VAL (0x584b426b)), + BIL_PAIR (BIL_VAL (0x8df63def), BIL_VAL (0xd4cbb652)), + BIL_PAIR (BIL_VAL (0xb4af1f40), BIL_VAL (0x152d5922)), + BIL_PAIR (BIL_VAL (0xdc02486c), BIL_VAL (0xe8000000)) + /* And implicit 128 0 bits. */), + /* 156 */ + BIL_SET7 (BIL_VAL (0x4a), + BIL_PAIR (BIL_VAL (0x955a2e7d), BIL_VAL (0x4bd0596e)), + BIL_PAIR (BIL_VAL (0xca2d3a3d), BIL_VAL (0xf930c1cc)), + BIL_PAIR (BIL_VAL (0x30415711), BIL_VAL (0x72f09833)), + BIL_PAIR (BIL_VAL (0x8b9e6b5e), BIL_VAL (0x4ff51f3b)), + BIL_PAIR (BIL_VAL (0x0ed73880), BIL_VAL (0xd3c57b5c)), + BIL_PAIR (BIL_VAL (0x9816d441), BIL_VAL (0x10000000)) + /* And implicit 128 0 bits. */), + /* 157 */ + BIL_SET7 (BIL_VAL (0x2e9), + BIL_PAIR (BIL_VAL (0xd585d0e4), BIL_VAL (0xf6237e53)), + BIL_PAIR (BIL_VAL (0xe5c4466b), BIL_VAL (0xbbe791f9)), + BIL_PAIR (BIL_VAL (0xe28d66ae), BIL_VAL (0x7d65f203)), + BIL_PAIR (BIL_VAL (0x743031af), BIL_VAL (0x1f93384e)), + BIL_PAIR (BIL_VAL (0x94683508), BIL_VAL (0x45b6d19d)), + BIL_PAIR (BIL_VAL (0xf0e44a8a), BIL_VAL (0xa0000000)) + /* And implicit 128 0 bits. */), + /* 158 */ + BIL_SET7 (BIL_VAL (0x1d22), + BIL_PAIR (BIL_VAL (0x573a28f1), BIL_VAL (0x9d62ef46)), + BIL_PAIR (BIL_VAL (0xf9aac035), BIL_VAL (0x570bb3c2)), + BIL_PAIR (BIL_VAL (0xd98602d0), BIL_VAL (0xe5fb7422)), + BIL_PAIR (BIL_VAL (0x89e1f0d7), BIL_VAL (0x3bc03311)), + BIL_PAIR (BIL_VAL (0xcc121252), BIL_VAL (0xb924302b)), + BIL_PAIR (BIL_VAL (0x68eae96a), BIL_VAL (0x40000000)) + /* And implicit 128 0 bits. */), + /* 159 */ + BIL_SET7 (BIL_VAL (0x12357), + BIL_PAIR (BIL_VAL (0x68459970), BIL_VAL (0x25dd58c5)), + BIL_PAIR (BIL_VAL (0xc0ab8215), BIL_VAL (0x6675059c)), + BIL_PAIR (BIL_VAL (0x7f3c1c28), BIL_VAL (0xfbd28959)), + BIL_PAIR (BIL_VAL (0x62d36868), BIL_VAL (0x5581feb1)), + BIL_PAIR (BIL_VAL (0xf8b4b73b), BIL_VAL (0x3b69e1b2)), + BIL_PAIR (BIL_VAL (0x192d1e26), BIL_VAL (0x80000000)) + /* And implicit 128 0 bits. */), + /* 160 */ + BIL_SET7 (BIL_VAL (0xb616a), + BIL_PAIR (BIL_VAL (0x12b7fe61), BIL_VAL (0x7aa577b9)), + BIL_PAIR (BIL_VAL (0x86b314d6), BIL_VAL (0x0092381c)), + BIL_PAIR (BIL_VAL (0xf8591999), BIL_VAL (0xd6395d7d)), + BIL_PAIR (BIL_VAL (0xdc421413), BIL_VAL (0x5713f2f3)), + BIL_PAIR (BIL_VAL (0xb70f2850), BIL_VAL (0x5222d0f4)), + BIL_PAIR (BIL_VAL (0xfbc32d81), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 161 */ + BIL_SET7 (BIL_VAL (0x71ce24), + BIL_PAIR (BIL_VAL (0xbb2fefce), BIL_VAL (0xca76ad3f)), + BIL_PAIR (BIL_VAL (0x42fed05c), BIL_VAL (0x05b63121)), + BIL_PAIR (BIL_VAL (0xb37b0002), BIL_VAL (0x5e3da6ea)), + BIL_PAIR (BIL_VAL (0x9a94c8c1), BIL_VAL (0x66c77d85)), + BIL_PAIR (BIL_VAL (0x26979323), BIL_VAL (0x355c2991)), + BIL_PAIR (BIL_VAL (0xd59fc70a), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 162 */ + BIL_SET7 (BIL_VAL (0x4720d6f), + BIL_PAIR (BIL_VAL (0x4fdf5e13), BIL_VAL (0xe8a2c478)), + BIL_PAIR (BIL_VAL (0x9df42398), BIL_VAL (0x391deb51)), + BIL_PAIR (BIL_VAL (0x02ce0017), BIL_VAL (0xae68852a)), + BIL_PAIR (BIL_VAL (0x09cfd78e), BIL_VAL (0x03cae733)), + BIL_PAIR (BIL_VAL (0x81ebbf60), BIL_VAL (0x15999fb2)), + BIL_PAIR (BIL_VAL (0x583dc664), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 163 */ + BIL_SET7 (BIL_VAL (0x2c748659), + BIL_PAIR (BIL_VAL (0x1eb9acc7), BIL_VAL (0x165bacb6)), + BIL_PAIR (BIL_VAL (0x2b8963f2), BIL_VAL (0x3b2b312a)), + BIL_PAIR (BIL_VAL (0x1c0c00ec), BIL_VAL (0xd01533a4)), + BIL_PAIR (BIL_VAL (0x621e6b8c), BIL_VAL (0x25ed0803)), + BIL_PAIR (BIL_VAL (0x133579c0), BIL_VAL (0xd8003cf7)), + BIL_PAIR (BIL_VAL (0x7269bfe8), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 164 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x1), BIL_VAL (0xbc8d3f7b)), + BIL_PAIR (BIL_VAL (0x3340bfc6), BIL_VAL (0xdf94bf1d)), + BIL_PAIR (BIL_VAL (0xb35de776), BIL_VAL (0x4fafeba5)), + BIL_PAIR (BIL_VAL (0x18780940), BIL_VAL (0x20d4046b)), + BIL_PAIR (BIL_VAL (0xd5303379), BIL_VAL (0x7b42501e)), + BIL_PAIR (BIL_VAL (0xc016c188), BIL_VAL (0x700261aa)), + BIL_PAIR (BIL_VAL (0x78217f10), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 165 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x11), BIL_VAL (0x5d847ad0)), + BIL_PAIR (BIL_VAL (0x00877dc4), BIL_VAL (0xbbcf7729)), + BIL_PAIR (BIL_VAL (0x01ab0a9f), BIL_VAL (0x1cdf3472)), + BIL_PAIR (BIL_VAL (0xf4b05c81), BIL_VAL (0x48482c36)), + BIL_PAIR (BIL_VAL (0x53e202be), BIL_VAL (0xd0972133)), + BIL_PAIR (BIL_VAL (0x80e38f54), BIL_VAL (0x6017d0a8)), + BIL_PAIR (BIL_VAL (0xb14ef6a0), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 166 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0xad), BIL_VAL (0xa72ccc20)), + BIL_PAIR (BIL_VAL (0x054ae9af), BIL_VAL (0x561aa79a)), + BIL_PAIR (BIL_VAL (0x10ae6a37), BIL_VAL (0x20b80c7d)), + BIL_PAIR (BIL_VAL (0x8ee39d0c), BIL_VAL (0xd2d1ba1f)), + BIL_PAIR (BIL_VAL (0x46d41b74), BIL_VAL (0x25e74c03)), + BIL_PAIR (BIL_VAL (0x08e3994b), BIL_VAL (0xc0ee2696)), + BIL_PAIR (BIL_VAL (0xed15a240), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 167 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x6c8), BIL_VAL (0x87bff940)), + BIL_PAIR (BIL_VAL (0x34ed20d9), BIL_VAL (0x5d0a8c04)), + BIL_PAIR (BIL_VAL (0xa6d02627), BIL_VAL (0x47307ce7)), + BIL_PAIR (BIL_VAL (0x94e42280), BIL_VAL (0x3c314538)), + BIL_PAIR (BIL_VAL (0xc4491289), BIL_VAL (0x7b08f81e)), + BIL_PAIR (BIL_VAL (0x58e3fcf5), BIL_VAL (0x894d81e5)), + BIL_PAIR (BIL_VAL (0x42d85680), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 168 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x43d5), BIL_VAL (0x4d7fbc82)), + BIL_PAIR (BIL_VAL (0x1143487d), BIL_VAL (0xa269782e)), + BIL_PAIR (BIL_VAL (0x84217d88), BIL_VAL (0xc7e4e10b)), + BIL_PAIR (BIL_VAL (0xd0e95902), BIL_VAL (0x59ecb437)), + BIL_PAIR (BIL_VAL (0xaadab95e), BIL_VAL (0xce59b12f)), + BIL_PAIR (BIL_VAL (0x78e7e197), BIL_VAL (0x5d0712f4)), + BIL_PAIR (BIL_VAL (0x9c736100), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 169 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x2a655), BIL_VAL (0x06fd5d14)), + BIL_PAIR (BIL_VAL (0xaca0d4e8), BIL_VAL (0x581eb1d1)), + BIL_PAIR (BIL_VAL (0x294ee757), BIL_VAL (0xcef0ca76)), + BIL_PAIR (BIL_VAL (0x291d7a17), BIL_VAL (0x833f0a2c)), + BIL_PAIR (BIL_VAL (0xac8b3db4), BIL_VAL (0x0f80ebda)), + BIL_PAIR (BIL_VAL (0xb90ecfe9), BIL_VAL (0xa246bd8e)), + BIL_PAIR (BIL_VAL (0x1c81ca00), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 170 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x1a7f52), BIL_VAL (0x45e5a2ce)), + BIL_PAIR (BIL_VAL (0xbe485113), BIL_VAL (0x7132f22b)), + BIL_PAIR (BIL_VAL (0x9d15096e), BIL_VAL (0x1567e89d)), + BIL_PAIR (BIL_VAL (0x9b26c4eb), BIL_VAL (0x207665be)), + BIL_PAIR (BIL_VAL (0xbd706908), BIL_VAL (0x9b09368b)), + BIL_PAIR (BIL_VAL (0x3a941f20), BIL_VAL (0x56c3678d)), + BIL_PAIR (BIL_VAL (0x1d11e400), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 171 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x108f936), BIL_VAL (0xbaf85c13)), + BIL_PAIR (BIL_VAL (0x6ed32ac2), BIL_VAL (0x6bfd75b4)), + BIL_PAIR (BIL_VAL (0x22d25e4c), BIL_VAL (0xd60f1628)), + BIL_PAIR (BIL_VAL (0x0f83b12f), BIL_VAL (0x449ff973)), + BIL_PAIR (BIL_VAL (0x66641a56), BIL_VAL (0x0e5c2170)), + BIL_PAIR (BIL_VAL (0x49c93743), BIL_VAL (0x63a20b83)), + BIL_PAIR (BIL_VAL (0x22b2e800), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 172 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0xa59bc23), BIL_VAL (0x4db398c2)), + BIL_PAIR (BIL_VAL (0x543fab98), BIL_VAL (0x37e69909)), + BIL_PAIR (BIL_VAL (0x5c37af00), BIL_VAL (0x5c96dd90)), + BIL_PAIR (BIL_VAL (0x9b24ebd8), BIL_VAL (0xae3fbe81)), + BIL_PAIR (BIL_VAL (0xffe9075c), BIL_VAL (0x8f994e62)), + BIL_PAIR (BIL_VAL (0xe1dc28a1), BIL_VAL (0xe454731f)), + BIL_PAIR (BIL_VAL (0x5afd1000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 173 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x67815961), BIL_VAL (0x0903f797)), + BIL_PAIR (BIL_VAL (0x4a7cb3f2), BIL_VAL (0x2f01fa5d)), + BIL_PAIR (BIL_VAL (0x9a2cd603), BIL_VAL (0x9de4a7a6)), + BIL_PAIR (BIL_VAL (0x0f713676), BIL_VAL (0xce7d7113)), + BIL_PAIR (BIL_VAL (0xff1a499d), BIL_VAL (0x9bfd0fdc)), + BIL_PAIR (BIL_VAL (0xd2999652), BIL_VAL (0xeb4c7f39)), + BIL_PAIR (BIL_VAL (0x8de2a000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 174 */ + BIL_SET8 (BIL_VAL (0x4), + BIL_PAIR (BIL_VAL (0x0b0d7dca), BIL_VAL (0x5a27abe8)), + BIL_PAIR (BIL_VAL (0xe8df0775), BIL_VAL (0xd613c7a8)), + BIL_PAIR (BIL_VAL (0x05c05c24), BIL_VAL (0x2aee8c7c)), + BIL_PAIR (BIL_VAL (0x9a6c20a4), BIL_VAL (0x10e66ac7)), + BIL_PAIR (BIL_VAL (0xf706e028), BIL_VAL (0x17e29ea0)), + BIL_PAIR (BIL_VAL (0x39ffdf3d), BIL_VAL (0x30fcf83f)), + BIL_PAIR (BIL_VAL (0x8ada4000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 175 */ + BIL_SET8 (BIL_VAL (0x28), + BIL_PAIR (BIL_VAL (0x6e86e9e7), BIL_VAL (0x858cb719)), + BIL_PAIR (BIL_VAL (0x18b64a9a), BIL_VAL (0x5cc5cc90)), + BIL_PAIR (BIL_VAL (0x39839969), BIL_VAL (0xad517cde)), + BIL_PAIR (BIL_VAL (0x08394668), BIL_VAL (0xa9002bcf)), + BIL_PAIR (BIL_VAL (0xa644c190), BIL_VAL (0xeeda3242)), + BIL_PAIR (BIL_VAL (0x43feb863), BIL_VAL (0xe9e1b27b)), + BIL_PAIR (BIL_VAL (0x6c868000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 176 */ + BIL_SET8 (BIL_VAL (0x194), + BIL_PAIR (BIL_VAL (0x5145230b), BIL_VAL (0x377f26fa)), + BIL_PAIR (BIL_VAL (0xf71eea07), BIL_VAL (0x9fb9fda2)), + BIL_PAIR (BIL_VAL (0x3f23fe20), BIL_VAL (0xc52ee0ac)), + BIL_PAIR (BIL_VAL (0x523cc016), BIL_VAL (0x9a01b61c)), + BIL_PAIR (BIL_VAL (0x7eaf8fa9), BIL_VAL (0x5485f696)), + BIL_PAIR (BIL_VAL (0xa7f333e7), BIL_VAL (0x22d0f8d2)), + BIL_PAIR (BIL_VAL (0x3d410000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 177 */ + BIL_SET8 (BIL_VAL (0xfcb), + BIL_PAIR (BIL_VAL (0x2cb35e70), BIL_VAL (0x2af785cd)), + BIL_PAIR (BIL_VAL (0xa735244c), BIL_VAL (0x3d43e856)), + BIL_PAIR (BIL_VAL (0x7767ed47), BIL_VAL (0xb3d4c6bb)), + BIL_PAIR (BIL_VAL (0x365f80e2), BIL_VAL (0x04111d1c)), + BIL_PAIR (BIL_VAL (0xf2db9c9d), BIL_VAL (0x4d3ba1e2)), + BIL_PAIR (BIL_VAL (0x8f800707), BIL_VAL (0x5c29b836)), + BIL_PAIR (BIL_VAL (0x648a0000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 178 */ + BIL_SET8 (BIL_VAL (0x9def), + BIL_PAIR (BIL_VAL (0xbf01b061), BIL_VAL (0xadab3a08)), + BIL_PAIR (BIL_VAL (0x88136afa), BIL_VAL (0x64a71360)), + BIL_PAIR (BIL_VAL (0xaa0f44cd), BIL_VAL (0x064fc350)), + BIL_PAIR (BIL_VAL (0x1fbb08d4), BIL_VAL (0x28ab2321)), + BIL_PAIR (BIL_VAL (0x7c941e25), BIL_VAL (0x045452d9)), + BIL_PAIR (BIL_VAL (0x9b004649), BIL_VAL (0x99a1321f)), + BIL_PAIR (BIL_VAL (0xed640000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 179 */ + BIL_SET8 (BIL_VAL (0x62b5d), + BIL_PAIR (BIL_VAL (0x7610e3d0), BIL_VAL (0xc8b04455)), + BIL_PAIR (BIL_VAL (0x50c22dc7), BIL_VAL (0xee86c1c6)), + BIL_PAIR (BIL_VAL (0xa498b002), BIL_VAL (0x3f1da121)), + BIL_PAIR (BIL_VAL (0x3d4e5849), BIL_VAL (0x96af5f4e)), + BIL_PAIR (BIL_VAL (0xddc92d72), BIL_VAL (0x2b4b3c80)), + BIL_PAIR (BIL_VAL (0x0e02bee0), BIL_VAL (0x004bf53f)), + BIL_PAIR (BIL_VAL (0x45e80000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 180 */ + BIL_SET8 (BIL_VAL (0x3db1a6), + BIL_PAIR (BIL_VAL (0x9ca8e627), BIL_VAL (0xd6e2ab55)), + BIL_PAIR (BIL_VAL (0x2795c9cf), BIL_VAL (0x514391c2)), + BIL_PAIR (BIL_VAL (0x6df6e016), BIL_VAL (0x77284b4c)), + BIL_PAIR (BIL_VAL (0x650f72df), BIL_VAL (0xe2d9b914)), + BIL_PAIR (BIL_VAL (0xa9dbc675), BIL_VAL (0xb0f05d00)), + BIL_PAIR (BIL_VAL (0x8c1b74c0), BIL_VAL (0x02f79478)), + BIL_PAIR (BIL_VAL (0xbb100000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 181 */ + BIL_SET8 (BIL_VAL (0x268f082), + BIL_PAIR (BIL_VAL (0x1e98fd8e), BIL_VAL (0x64dab153)), + BIL_PAIR (BIL_VAL (0x8bd9e219), BIL_VAL (0x2ca3b198)), + BIL_PAIR (BIL_VAL (0x4ba4c0e0), BIL_VAL (0xa792f0fb)), + BIL_PAIR (BIL_VAL (0xf29a7cbe), BIL_VAL (0xdc813ace)), + BIL_PAIR (BIL_VAL (0xa295c098), BIL_VAL (0xe963a205)), + BIL_PAIR (BIL_VAL (0x79128f80), BIL_VAL (0x1dabccb7)), + BIL_PAIR (BIL_VAL (0x4ea00000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 182 */ + BIL_SET8 (BIL_VAL (0x18196515), + BIL_PAIR (BIL_VAL (0x31f9e78f), BIL_VAL (0xf08aed43)), + BIL_PAIR (BIL_VAL (0x7682d4fb), BIL_VAL (0xbe64eff2)), + BIL_PAIR (BIL_VAL (0xf46f88c6), BIL_VAL (0x8bbd69d7)), + BIL_PAIR (BIL_VAL (0x7a08df74), BIL_VAL (0x9d0c4c12)), + BIL_PAIR (BIL_VAL (0x59d985f9), BIL_VAL (0x1de45436)), + BIL_PAIR (BIL_VAL (0xbab99b01), BIL_VAL (0x28b5ff29)), + BIL_PAIR (BIL_VAL (0x12400000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 183 */ + BIL_SET8 (BIL_VAL (0xf0fdf2d3), + BIL_PAIR (BIL_VAL (0xf3c30b9f), BIL_VAL (0x656d44a2)), + BIL_PAIR (BIL_VAL (0xa11c51d5), BIL_VAL (0x6ff15f7d)), + BIL_PAIR (BIL_VAL (0x8c5b57c1), BIL_VAL (0x7566226a)), + BIL_PAIR (BIL_VAL (0xc458ba8e), BIL_VAL (0x227af8b7)), + BIL_PAIR (BIL_VAL (0x827f3bbb), BIL_VAL (0x2aeb4a23)), + BIL_PAIR (BIL_VAL (0x4b400e0b), BIL_VAL (0x971bf79a)), + BIL_PAIR (BIL_VAL (0xb6800000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 184 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x9), BIL_VAL (0x69eb7c47)), + BIL_PAIR (BIL_VAL (0x859e7439), BIL_VAL (0xf644ae5a)), + BIL_PAIR (BIL_VAL (0x4b1b3256), BIL_VAL (0x5f6dbae7)), + BIL_PAIR (BIL_VAL (0x7b916d8e), BIL_VAL (0x95fd582b)), + BIL_PAIR (BIL_VAL (0xab77498d), BIL_VAL (0x58cdb72b)), + BIL_PAIR (BIL_VAL (0x18f8554f), BIL_VAL (0xad30e560)), + BIL_PAIR (BIL_VAL (0xf0808c73), BIL_VAL (0xe717ac0b)), + BIL_PAIR (BIL_VAL (0x21000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 185 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x5e), BIL_VAL (0x2332dacb)), + BIL_PAIR (BIL_VAL (0x38308a43), BIL_VAL (0x9eaecf86)), + BIL_PAIR (BIL_VAL (0xef0ff75f), BIL_VAL (0xba494d0a)), + BIL_PAIR (BIL_VAL (0xd3ae4791), BIL_VAL (0xdbe571b4)), + BIL_PAIR (BIL_VAL (0xb2a8df85), BIL_VAL (0x780927ae)), + BIL_PAIR (BIL_VAL (0xf9b3551c), BIL_VAL (0xc3e8f5c9)), + BIL_PAIR (BIL_VAL (0x65057c87), BIL_VAL (0x06ecb86f)), + BIL_PAIR (BIL_VAL (0x4a000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 186 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x3ad), BIL_VAL (0x5ffc8bf0)), + BIL_PAIR (BIL_VAL (0x31e566a4), BIL_VAL (0x32d41b45)), + BIL_PAIR (BIL_VAL (0x569fa9bd), BIL_VAL (0x46dd026c)), + BIL_PAIR (BIL_VAL (0x44cecbb2), BIL_VAL (0x96f6710e)), + BIL_PAIR (BIL_VAL (0xfa98bb36), BIL_VAL (0xb05b8cd5)), + BIL_PAIR (BIL_VAL (0xc101531f), BIL_VAL (0xa71999dd)), + BIL_PAIR (BIL_VAL (0xf236dd46), BIL_VAL (0x453f3458)), + BIL_PAIR (BIL_VAL (0xe4000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 187 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x24c5), BIL_VAL (0xbfdd7761)), + BIL_PAIR (BIL_VAL (0xf2f60269), BIL_VAL (0xfc4910b5)), + BIL_PAIR (BIL_VAL (0x623ca164), BIL_VAL (0xc4a2183a)), + BIL_PAIR (BIL_VAL (0xb013f4f9), BIL_VAL (0xe5a06a95)), + BIL_PAIR (BIL_VAL (0xc9f75022), BIL_VAL (0xe3938059)), + BIL_PAIR (BIL_VAL (0x8a0d3f3c), BIL_VAL (0x870002ab)), + BIL_PAIR (BIL_VAL (0x7624a4be), BIL_VAL (0xb4780b78)), + BIL_PAIR (BIL_VAL (0xe8000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 188 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x16fb9), BIL_VAL (0x7ea6a9d3)), + BIL_PAIR (BIL_VAL (0x7d9c1823), BIL_VAL (0xdadaa715)), + BIL_PAIR (BIL_VAL (0xd65e4def), BIL_VAL (0xae54f24a)), + BIL_PAIR (BIL_VAL (0xe0c791c2), BIL_VAL (0xf84429d9)), + BIL_PAIR (BIL_VAL (0xe3a9215c), BIL_VAL (0xe3c3037f)), + BIL_PAIR (BIL_VAL (0x6484785d), BIL_VAL (0x46001ab2)), + BIL_PAIR (BIL_VAL (0x9d6e6f73), BIL_VAL (0x0cb072b9)), + BIL_PAIR (BIL_VAL (0x10000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 189 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0xe5d3e), BIL_VAL (0xf282a242)), + BIL_PAIR (BIL_VAL (0xe818f166), BIL_VAL (0x8c8a86da)), + BIL_PAIR (BIL_VAL (0x5faf0b5c), BIL_VAL (0xcf5176ec)), + BIL_PAIR (BIL_VAL (0xc7cbb19d), BIL_VAL (0xb2a9a282)), + BIL_PAIR (BIL_VAL (0xe49b4da0), BIL_VAL (0xe59e22f9)), + BIL_PAIR (BIL_VAL (0xed2cb3a4), BIL_VAL (0xbc010afa)), + BIL_PAIR (BIL_VAL (0x26505a7e), BIL_VAL (0x7ee47b3a)), + BIL_PAIR (BIL_VAL (0xa0000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 190 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x8fa475), BIL_VAL (0x791a569d)), + BIL_PAIR (BIL_VAL (0x10f96e01), BIL_VAL (0x7d694487)), + BIL_PAIR (BIL_VAL (0xbcd671a0), BIL_VAL (0x192ea53f)), + BIL_PAIR (BIL_VAL (0xcdf4f028), BIL_VAL (0xfaa0591c)), + BIL_PAIR (BIL_VAL (0xee110848), BIL_VAL (0xf82d5dc3)), + BIL_PAIR (BIL_VAL (0x43bf046f), BIL_VAL (0x580a6dc5)), + BIL_PAIR (BIL_VAL (0x7f2388f0), BIL_VAL (0xf4ecd04a)), + BIL_PAIR (BIL_VAL (0x40000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 191 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x59c6c96), BIL_VAL (0xbb076222)), + BIL_PAIR (BIL_VAL (0xa9be4c0e), BIL_VAL (0xe61cad4d)), + BIL_PAIR (BIL_VAL (0x60607040), BIL_VAL (0xfbd2747e)), + BIL_PAIR (BIL_VAL (0x0b916199), BIL_VAL (0xca437b21)), + BIL_PAIR (BIL_VAL (0x4caa52d9), BIL_VAL (0xb1c5a9a0)), + BIL_PAIR (BIL_VAL (0xa5762c59), BIL_VAL (0x706849b6)), + BIL_PAIR (BIL_VAL (0xf7635969), BIL_VAL (0x914022e6)), + BIL_PAIR (BIL_VAL (0x80000000), BIL_VAL (0x00000000)) + /* And implicit 128 0 bits. */), + /* 192 */ + BIL_SET7 (BIL_PAIR (BIL_VAL (0x381c3de3), BIL_VAL (0x4e49d55a)), + BIL_PAIR (BIL_VAL (0xa16ef894), BIL_VAL (0xfd1ec505)), + BIL_PAIR (BIL_VAL (0xc3c46289), BIL_VAL (0xd6388cec)), + BIL_PAIR (BIL_VAL (0x73add001), BIL_VAL (0xe6a2cf4c)), + BIL_PAIR (BIL_VAL (0xfea73c80), BIL_VAL (0xf1b8a046)), + BIL_PAIR (BIL_VAL (0x769dbb7e), BIL_VAL (0x6412e125)), + BIL_PAIR (BIL_VAL (0xa9e17e1f), BIL_VAL (0xac815d01)) + /* And implicit 192 0 bits. */), + /* 193 */ + BIL_SET8 (BIL_VAL (0x2), + BIL_PAIR (BIL_VAL (0x311a6ae1), BIL_VAL (0x0ee2558a)), + BIL_PAIR (BIL_VAL (0x4e55b5d1), BIL_VAL (0xe333b239)), + BIL_PAIR (BIL_VAL (0xa5abd962), BIL_VAL (0x5e35813c)), + BIL_PAIR (BIL_VAL (0x84ca2013), BIL_VAL (0x025c1901)), + BIL_PAIR (BIL_VAL (0xf2885d09), BIL_VAL (0x713642c0)), + BIL_PAIR (BIL_VAL (0xa22952ef), BIL_VAL (0xe8bccb78)), + BIL_PAIR (BIL_VAL (0xa2ceed3c), BIL_VAL (0xbd0da20a)) + /* And implicit 192 0 bits. */), + /* 194 */ + BIL_SET8 (BIL_VAL (0x15), + BIL_PAIR (BIL_VAL (0xeb082cca), BIL_VAL (0x94d75767)), + BIL_PAIR (BIL_VAL (0x0f591a32), BIL_VAL (0xe004f640)), + BIL_PAIR (BIL_VAL (0x78b67dd7), BIL_VAL (0xae170c5d)), + BIL_PAIR (BIL_VAL (0x2fe540be), BIL_VAL (0x1798fa13)), + BIL_PAIR (BIL_VAL (0x7953a25e), BIL_VAL (0x6c1e9b86)), + BIL_PAIR (BIL_VAL (0x559d3d5f), BIL_VAL (0x175ff2b6)), + BIL_PAIR (BIL_VAL (0x5c15445f), BIL_VAL (0x62885464)) + /* And implicit 192 0 bits. */), + /* 195 */ + BIL_SET8 (BIL_VAL (0xdb), + BIL_PAIR (BIL_VAL (0x2e51bfe9), BIL_VAL (0xd0696a06)), + BIL_PAIR (BIL_VAL (0x997b05fc), BIL_VAL (0xc0319e84)), + BIL_PAIR (BIL_VAL (0xb720ea6c), BIL_VAL (0xcce67ba3)), + BIL_PAIR (BIL_VAL (0xdef4876c), BIL_VAL (0xebf9c4c2)), + BIL_PAIR (BIL_VAL (0xbd4457b0), BIL_VAL (0x3932133f)), + BIL_PAIR (BIL_VAL (0x582465b6), BIL_VAL (0xe9bf7b1f)), + BIL_PAIR (BIL_VAL (0x98d4abb9), BIL_VAL (0xd9534be8)) + /* And implicit 192 0 bits. */), + /* 196 */ + BIL_SET8 (BIL_VAL (0x88f), + BIL_PAIR (BIL_VAL (0xcf317f22), BIL_VAL (0x241e2441)), + BIL_PAIR (BIL_VAL (0xfece3bdf), BIL_VAL (0x81f0312f)), + BIL_PAIR (BIL_VAL (0x27492840), BIL_VAL (0x0100d466)), + BIL_PAIR (BIL_VAL (0xb58d4a41), BIL_VAL (0x37c1af9b)), + BIL_PAIR (BIL_VAL (0x64ab6ce2), BIL_VAL (0x3bf4c079)), + BIL_PAIR (BIL_VAL (0x716bf925), BIL_VAL (0x217acf3b)), + BIL_PAIR (BIL_VAL (0xf84eb542), BIL_VAL (0x7d40f710)) + /* And implicit 192 0 bits. */), + /* 197 */ + BIL_SET8 (BIL_VAL (0x559e), + BIL_PAIR (BIL_VAL (0x17eef755), BIL_VAL (0x692d6a93)), + BIL_PAIR (BIL_VAL (0xf40e56bb), BIL_VAL (0x1361ebd7)), + BIL_PAIR (BIL_VAL (0x88db9280), BIL_VAL (0x0a084c03)), + BIL_PAIR (BIL_VAL (0x1784e68c), BIL_VAL (0x2d90dc11)), + BIL_PAIR (BIL_VAL (0xeeb240d6), BIL_VAL (0x578f84be)), + BIL_PAIR (BIL_VAL (0x6e37bb73), BIL_VAL (0x4ecc1857)), + BIL_PAIR (BIL_VAL (0xb3131498), BIL_VAL (0xe489a6a0)) + /* And implicit 192 0 bits. */), + /* 198 */ + BIL_SET8 (BIL_VAL (0x3582c), + BIL_PAIR (BIL_VAL (0xef55a956), BIL_VAL (0x1bc629c7)), + BIL_PAIR (BIL_VAL (0x888f634e), BIL_VAL (0xc1d3366b)), + BIL_PAIR (BIL_VAL (0x5893b900), BIL_VAL (0x6452f81e)), + BIL_PAIR (BIL_VAL (0xeb310179), BIL_VAL (0xc7a898b3)), + BIL_PAIR (BIL_VAL (0x52f6885f), BIL_VAL (0x6b9b2f70)), + BIL_PAIR (BIL_VAL (0x4e2d5281), BIL_VAL (0x13f8f36c)), + BIL_PAIR (BIL_VAL (0xfebecdf8), BIL_VAL (0xed608240)) + /* And implicit 192 0 bits. */), + /* 199 */ + BIL_SET8 (BIL_VAL (0x2171c1), + BIL_PAIR (BIL_VAL (0x59589d5d), BIL_VAL (0x15bda1cb)), + BIL_PAIR (BIL_VAL (0x5599e113), BIL_VAL (0x92402031)), + BIL_PAIR (BIL_VAL (0x75c53a03), BIL_VAL (0xeb3db135)), + BIL_PAIR (BIL_VAL (0x2fea0ec1), BIL_VAL (0xcc95f701)), + BIL_PAIR (BIL_VAL (0x3da153ba), BIL_VAL (0x340fda63)), + BIL_PAIR (BIL_VAL (0x0dc5390a), BIL_VAL (0xc7b98241)), + BIL_PAIR (BIL_VAL (0xf3740bb9), BIL_VAL (0x45c51680)) + /* And implicit 192 0 bits. */), + /* 200 */ + BIL_SET8 (BIL_VAL (0x14e718d), + BIL_PAIR (BIL_VAL (0x7d7625a2), BIL_VAL (0xd96851f1)), + BIL_PAIR (BIL_VAL (0x5802cac3), BIL_VAL (0xb68141ee)), + BIL_PAIR (BIL_VAL (0x99b44427), BIL_VAL (0x3068ec13)), + BIL_PAIR (BIL_VAL (0xdf249391), BIL_VAL (0xfddba60c)), + BIL_PAIR (BIL_VAL (0x684d4546), BIL_VAL (0x089e87de)), + BIL_PAIR (BIL_VAL (0x89b43a6b), BIL_VAL (0xcd3f1693)), + BIL_PAIR (BIL_VAL (0x8288753c), BIL_VAL (0xb9b2e100)) + /* And implicit 192 0 bits. */), + /* 201 */ + BIL_SET8 (BIL_VAL (0xd106f86), + BIL_PAIR (BIL_VAL (0xe69d785c), BIL_VAL (0x7e13336d)), + BIL_PAIR (BIL_VAL (0x701beba5), BIL_VAL (0x210c9352)), + BIL_PAIR (BIL_VAL (0x010aa987), BIL_VAL (0xe41938c6)), + BIL_PAIR (BIL_VAL (0xb76dc3b3), BIL_VAL (0xea947c7c)), + BIL_PAIR (BIL_VAL (0x1304b4bc), BIL_VAL (0x56314eb1)), + BIL_PAIR (BIL_VAL (0x610a4836), BIL_VAL (0x0476e1c3)), + BIL_PAIR (BIL_VAL (0x1954945f), BIL_VAL (0x40fcca00)) + /* And implicit 192 0 bits. */), + /* 202 */ + BIL_SET8 (BIL_VAL (0x82a45b45), + BIL_PAIR (BIL_VAL (0x0226b39c), BIL_VAL (0xecc00246)), + BIL_PAIR (BIL_VAL (0x61173473), BIL_VAL (0x4a7dc134)), + BIL_PAIR (BIL_VAL (0x0a6a9f4e), BIL_VAL (0xe8fc37c3)), + BIL_PAIR (BIL_VAL (0x2a49a507), BIL_VAL (0x29ccdcd8)), + BIL_PAIR (BIL_VAL (0xbe2f0f5b), BIL_VAL (0x5ded12ed)), + BIL_PAIR (BIL_VAL (0xca66d21c), BIL_VAL (0x2ca4d19e)), + BIL_PAIR (BIL_VAL (0xfd4dcbb8), BIL_VAL (0x89dfe400)) + /* And implicit 192 0 bits. */), + /* 203 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x5), BIL_VAL (0x1a6b90b2)), + BIL_PAIR (BIL_VAL (0x15830421), BIL_VAL (0x3f8016bf)), + BIL_PAIR (BIL_VAL (0xcae80c80), BIL_VAL (0xe8e98c08)), + BIL_PAIR (BIL_VAL (0x682a3915), BIL_VAL (0x19da2d9f)), + BIL_PAIR (BIL_VAL (0xa6e07247), BIL_VAL (0xa200a077)), + BIL_PAIR (BIL_VAL (0x6dd69991), BIL_VAL (0xab42bd49)), + BIL_PAIR (BIL_VAL (0xe8043519), BIL_VAL (0xbe703035)), + BIL_PAIR (BIL_VAL (0xe509f535), BIL_VAL (0x62bee800)) + /* And implicit 192 0 bits. */), + /* 204 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x33), BIL_VAL (0x0833a6f4)), + BIL_PAIR (BIL_VAL (0xd71e294c), BIL_VAL (0x7b00e37d)), + BIL_PAIR (BIL_VAL (0xed107d09), BIL_VAL (0x191f7854)), + BIL_PAIR (BIL_VAL (0x11a63ad3), BIL_VAL (0x0285c83c)), + BIL_PAIR (BIL_VAL (0x84c476cc), BIL_VAL (0x540644aa)), + BIL_PAIR (BIL_VAL (0x4a61ffb0), BIL_VAL (0xb09b64e3)), + BIL_PAIR (BIL_VAL (0x102a1301), BIL_VAL (0x7061e21a)), + BIL_PAIR (BIL_VAL (0xf2639415), BIL_VAL (0xdb751000)) + /* And implicit 192 0 bits. */), + /* 205 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x1fe), BIL_VAL (0x52048590)), + BIL_PAIR (BIL_VAL (0x672d9cfc), BIL_VAL (0xce08e2eb)), + BIL_PAIR (BIL_VAL (0x42a4e25a), BIL_VAL (0xfb3ab348)), + BIL_PAIR (BIL_VAL (0xb07e4c3e), BIL_VAL (0x1939d25d)), + BIL_PAIR (BIL_VAL (0x2faca3fb), BIL_VAL (0x483eaea6)), + BIL_PAIR (BIL_VAL (0xe7d3fce6), BIL_VAL (0xe611f0de)), + BIL_PAIR (BIL_VAL (0xa1a4be0e), BIL_VAL (0x63d2d50d)), + BIL_PAIR (BIL_VAL (0x77e3c8da), BIL_VAL (0x9292a000)) + /* And implicit 192 0 bits. */), + /* 206 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x13ef), BIL_VAL (0x342d37a4)), + BIL_PAIR (BIL_VAL (0x07c821e0), BIL_VAL (0x0c58dd30)), + BIL_PAIR (BIL_VAL (0x9a70d78d), BIL_VAL (0xd04b00d6)), + BIL_PAIR (BIL_VAL (0xe4eefa6c), BIL_VAL (0xfc4237a3)), + BIL_PAIR (BIL_VAL (0xdcbe67d0), BIL_VAL (0xd272d285)), + BIL_PAIR (BIL_VAL (0x0e47e104), BIL_VAL (0xfcb368b2)), + BIL_PAIR (BIL_VAL (0x506f6c8f), BIL_VAL (0xe63c5286)), + BIL_PAIR (BIL_VAL (0xaee5d889), BIL_VAL (0xb9ba4000)) + /* And implicit 192 0 bits. */), + /* 207 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0xc758), BIL_VAL (0x09c42c68)), + BIL_PAIR (BIL_VAL (0x4dd152c0), BIL_VAL (0x7b78a3e6)), + BIL_PAIR (BIL_VAL (0x08686b8a), BIL_VAL (0x22ee0864)), + BIL_PAIR (BIL_VAL (0xf155c841), BIL_VAL (0xda962c66)), + BIL_PAIR (BIL_VAL (0x9f700e28), BIL_VAL (0x387c3932)), + BIL_PAIR (BIL_VAL (0x8ececa31), BIL_VAL (0xdf0216f7)), + BIL_PAIR (BIL_VAL (0x245a3d9e), BIL_VAL (0xfe5b3942)), + BIL_PAIR (BIL_VAL (0xd4fa7561), BIL_VAL (0x41468000)) + /* And implicit 192 0 bits. */), + /* 208 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x7c970), BIL_VAL (0x61a9bc13)), + BIL_PAIR (BIL_VAL (0x0a2d3b84), BIL_VAL (0xd2b666fc)), + BIL_PAIR (BIL_VAL (0x54143365), BIL_VAL (0x5d4c53f1)), + BIL_PAIR (BIL_VAL (0x6d59d292), BIL_VAL (0x89ddbc02)), + BIL_PAIR (BIL_VAL (0x3a608d92), BIL_VAL (0x34da3bf9)), + BIL_PAIR (BIL_VAL (0x9413e5f2), BIL_VAL (0xb614e5a7)), + BIL_PAIR (BIL_VAL (0x6b866835), BIL_VAL (0xef903c9c)), + BIL_PAIR (BIL_VAL (0x51c895cc), BIL_VAL (0x8cc10000)) + /* And implicit 192 0 bits. */), + /* 209 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x4dde63), BIL_VAL (0xd0a158be)), + BIL_PAIR (BIL_VAL (0x65c45330), BIL_VAL (0x3b2005db)), + BIL_PAIR (BIL_VAL (0x48ca01f5), BIL_VAL (0xa4fb476e)), + BIL_PAIR (BIL_VAL (0x458239b9), BIL_VAL (0x62a95816)), + BIL_PAIR (BIL_VAL (0x47c587b6), BIL_VAL (0x108657bf)), + BIL_PAIR (BIL_VAL (0xc8c6fb7b), BIL_VAL (0x1cd0f88a)), + BIL_PAIR (BIL_VAL (0x3340121b), BIL_VAL (0x5ba25e1b)), + BIL_PAIR (BIL_VAL (0x31d5d9fd), BIL_VAL (0x7f8a0000)) + /* And implicit 192 0 bits. */), + /* 210 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x30aafe6), BIL_VAL (0x264d776f)), + BIL_PAIR (BIL_VAL (0xf9ab3fe2), BIL_VAL (0x4f403a90)), + BIL_PAIR (BIL_VAL (0xd7e41398), BIL_VAL (0x71d0ca4e)), + BIL_PAIR (BIL_VAL (0xb716413d), BIL_VAL (0xda9d70de)), + BIL_PAIR (BIL_VAL (0xcdb74d1c), BIL_VAL (0xa53f6d7d)), + BIL_PAIR (BIL_VAL (0xd7c5d2cf), BIL_VAL (0x2029b566)), + BIL_PAIR (BIL_VAL (0x0080b511), BIL_VAL (0x9457ad0f)), + BIL_PAIR (BIL_VAL (0xf25a83e6), BIL_VAL (0xfb640000)) + /* And implicit 192 0 bits. */), + /* 211 */ + BIL_SET8 (BIL_PAIR (BIL_VAL (0x1e6adefd), BIL_VAL (0x7f06aa5f)), + BIL_PAIR (BIL_VAL (0xc0b07ed7), BIL_VAL (0x188249a8)), + BIL_PAIR (BIL_VAL (0x6ee8c3f4), BIL_VAL (0x7227e713)), + BIL_PAIR (BIL_VAL (0x26de8c6a), BIL_VAL (0x8a2668b4)), + BIL_PAIR (BIL_VAL (0x0929031e), BIL_VAL (0x747a46ea)), + BIL_PAIR (BIL_VAL (0x6dba3c17), BIL_VAL (0x41a115fc)), + BIL_PAIR (BIL_VAL (0x050712af), BIL_VAL (0xcb6cc29f)), + BIL_PAIR (BIL_VAL (0x77892705), BIL_VAL (0xd1e80000)) + /* And implicit 192 0 bits. */), + /* 212 */ + BIL_SET9 (BIL_VAL (0x1), + BIL_PAIR (BIL_VAL (0x302cb5e6), BIL_VAL (0xf642a7bd)), + BIL_PAIR (BIL_VAL (0x86e4f466), BIL_VAL (0xf516e094)), + BIL_PAIR (BIL_VAL (0x5517a78c), BIL_VAL (0x758f06bf)), + BIL_PAIR (BIL_VAL (0x84b17c29), BIL_VAL (0x65801708)), + BIL_PAIR (BIL_VAL (0x5b9a1f30), BIL_VAL (0x8cc6c528)), + BIL_PAIR (BIL_VAL (0x494658e8), BIL_VAL (0x904adbd8)), + BIL_PAIR (BIL_VAL (0x3246badd), BIL_VAL (0xf23f9a3a)), + BIL_PAIR (BIL_VAL (0xab5b863a), BIL_VAL (0x33100000)) + /* And implicit 192 0 bits. */), + /* 213 */ + BIL_SET9 (BIL_VAL (0xb), + BIL_PAIR (BIL_VAL (0xe1bf1b05), BIL_VAL (0x9e9a8d67)), + BIL_PAIR (BIL_VAL (0x44f18c05), BIL_VAL (0x92e4c5cb)), + BIL_PAIR (BIL_VAL (0x52ec8b7c), BIL_VAL (0x9796437b)), + BIL_PAIR (BIL_VAL (0x2eeed99d), BIL_VAL (0xf700e653)), + BIL_PAIR (BIL_VAL (0x940537e5), BIL_VAL (0x7fc3b392)), + BIL_PAIR (BIL_VAL (0xdcbf7915), BIL_VAL (0xa2ec9671)), + BIL_PAIR (BIL_VAL (0xf6c34cab), BIL_VAL (0x767c064a)), + BIL_PAIR (BIL_VAL (0xb1933e45), BIL_VAL (0xfea00000)) + /* And implicit 192 0 bits. */), + /* 214 */ + BIL_SET9 (BIL_VAL (0x76), + BIL_PAIR (BIL_VAL (0xd1770e38), BIL_VAL (0x32098608)), + BIL_PAIR (BIL_VAL (0xb16f7837), BIL_VAL (0xbcefb9f1)), + BIL_PAIR (BIL_VAL (0x3d3d72dd), BIL_VAL (0xebdea2cf)), + BIL_PAIR (BIL_VAL (0xd554802b), BIL_VAL (0xa608ff43)), + BIL_PAIR (BIL_VAL (0xc8342ef6), BIL_VAL (0xfda503bc)), + BIL_PAIR (BIL_VAL (0x9f7abad8), BIL_VAL (0x5d3de073)), + BIL_PAIR (BIL_VAL (0xa3a0feb2), BIL_VAL (0xa0d83eea)), + BIL_PAIR (BIL_VAL (0xefc06ebb), BIL_VAL (0xf2400000)) + /* And implicit 192 0 bits. */), + /* 215 */ + BIL_SET9 (BIL_VAL (0x4a4), + BIL_PAIR (BIL_VAL (0x2ea68e31), BIL_VAL (0xf45f3c56)), + BIL_PAIR (BIL_VAL (0xee5ab22d), BIL_VAL (0x615d436c)), + BIL_PAIR (BIL_VAL (0x64667cab), BIL_VAL (0x36b25c1e)), + BIL_PAIR (BIL_VAL (0x554d01b4), BIL_VAL (0x7c59f8a5)), + BIL_PAIR (BIL_VAL (0xd209d5a5), BIL_VAL (0xe872255e)), + BIL_PAIR (BIL_VAL (0x3acb4c73), BIL_VAL (0xa46ac484)), + BIL_PAIR (BIL_VAL (0x6449f2fa), BIL_VAL (0x4872752d)), + BIL_PAIR (BIL_VAL (0x5d845357), BIL_VAL (0x76800000)) + /* And implicit 192 0 bits. */), + /* 216 */ + BIL_SET9 (BIL_VAL (0x2e69), + BIL_PAIR (BIL_VAL (0xd2818df3), BIL_VAL (0x8bb85b65)), + BIL_PAIR (BIL_VAL (0x4f8af5c5), BIL_VAL (0xcda4a23b)), + BIL_PAIR (BIL_VAL (0xec00deb0), BIL_VAL (0x22f7992f)), + BIL_PAIR (BIL_VAL (0x5502110c), BIL_VAL (0xdb83b67a)), + BIL_PAIR (BIL_VAL (0x3462587b), BIL_VAL (0x147575ae)), + BIL_PAIR (BIL_VAL (0x4bf0fc84), BIL_VAL (0x6c2bad2b)), + BIL_PAIR (BIL_VAL (0xeae37dc6), BIL_VAL (0xd47893c5)), + BIL_PAIR (BIL_VAL (0xa72b416a), BIL_VAL (0xa1000000)) + /* And implicit 192 0 bits. */), + /* 217 */ + BIL_SET9 (BIL_VAL (0x1d022), + BIL_PAIR (BIL_VAL (0x390f8b83), BIL_VAL (0x753391f5)), + BIL_PAIR (BIL_VAL (0x1b6d99ba), BIL_VAL (0x086e5657)), + BIL_PAIR (BIL_VAL (0x3808b2e1), BIL_VAL (0x5dabfbd9)), + BIL_PAIR (BIL_VAL (0x5214aa80), BIL_VAL (0x932520c6)), + BIL_PAIR (BIL_VAL (0x0bd774ce), BIL_VAL (0xcc9698ce)), + BIL_PAIR (BIL_VAL (0xf769dd2c), BIL_VAL (0x39b4c3b7)), + BIL_PAIR (BIL_VAL (0x2ce2e9c4), BIL_VAL (0x4cb5c5b8)), + BIL_PAIR (BIL_VAL (0x87b08e2a), BIL_VAL (0x4a000000)) + /* And implicit 192 0 bits. */), + /* 218 */ + BIL_SET9 (BIL_VAL (0x122156), + BIL_PAIR (BIL_VAL (0x3a9b7322), BIL_VAL (0x9403b393)), + BIL_PAIR (BIL_VAL (0x12480144), BIL_VAL (0x544f5f68)), + BIL_PAIR (BIL_VAL (0x3056fccd), BIL_VAL (0xa8b7d67d)), + BIL_PAIR (BIL_VAL (0x34cea905), BIL_VAL (0xbf7347bc)), + BIL_PAIR (BIL_VAL (0x766a9013), BIL_VAL (0xfde1f815)), + BIL_PAIR (BIL_VAL (0xaa22a3ba), BIL_VAL (0x410fa527)), + BIL_PAIR (BIL_VAL (0xc0dd21aa), BIL_VAL (0xff19b935)), + BIL_PAIR (BIL_VAL (0x4ce58da6), BIL_VAL (0xe4000000)) + /* And implicit 192 0 bits. */), + /* 219 */ + BIL_SET9 (BIL_VAL (0xb54d5e), + BIL_PAIR (BIL_VAL (0x4a127f59), BIL_VAL (0xc82503be)), + BIL_PAIR (BIL_VAL (0xb6d00cab), BIL_VAL (0x4b19ba11)), + BIL_PAIR (BIL_VAL (0xe365e008), BIL_VAL (0x972e60e4)), + BIL_PAIR (BIL_VAL (0x10129a39), BIL_VAL (0x7a80cd5c)), + BIL_PAIR (BIL_VAL (0xa029a0c7), BIL_VAL (0xead3b0d8)), + BIL_PAIR (BIL_VAL (0xa55a6546), BIL_VAL (0x8a9c738d)), + BIL_PAIR (BIL_VAL (0x88a350ad), BIL_VAL (0xf7013c15)), + BIL_PAIR (BIL_VAL (0x00f78884), BIL_VAL (0xe8000000)) + /* And implicit 192 0 bits. */), + /* 220 */ + BIL_SET9 (BIL_VAL (0x71505ae), + BIL_PAIR (BIL_VAL (0xe4b8f981), BIL_VAL (0xd1722573)), + BIL_PAIR (BIL_VAL (0x24207eb0), BIL_VAL (0xef0144b2)), + BIL_PAIR (BIL_VAL (0xe1fac055), BIL_VAL (0xe7cfc8e8)), + BIL_PAIR (BIL_VAL (0xa0ba063e), BIL_VAL (0xc908059e)), + BIL_PAIR (BIL_VAL (0x41a047cf), BIL_VAL (0x2c44e876)), + BIL_PAIR (BIL_VAL (0x7587f4c1), BIL_VAL (0x6a1c8387)), + BIL_PAIR (BIL_VAL (0x566126cb), BIL_VAL (0xa60c58d2)), + BIL_PAIR (BIL_VAL (0x09ab5531), BIL_VAL (0x10000000)) + /* And implicit 192 0 bits. */), + /* 221 */ + BIL_SET9 (BIL_VAL (0x46d238d4), + BIL_PAIR (BIL_VAL (0xef39bf12), BIL_VAL (0x2e75767f)), + BIL_PAIR (BIL_VAL (0x6944f2e9), BIL_VAL (0x560caefc)), + BIL_PAIR (BIL_VAL (0xd3cb835b), BIL_VAL (0x0e1dd916)), + BIL_PAIR (BIL_VAL (0x47443e73), BIL_VAL (0xda50382e)), + BIL_PAIR (BIL_VAL (0x9042ce17), BIL_VAL (0xbab114a0)), + BIL_PAIR (BIL_VAL (0x974f8f8e), BIL_VAL (0x251d2349)), + BIL_PAIR (BIL_VAL (0x5fcb83f4), BIL_VAL (0x7c7b7834)), + BIL_PAIR (BIL_VAL (0x60b153ea), BIL_VAL (0xa0000000)) + /* And implicit 192 0 bits. */), + /* 222 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x2), BIL_VAL (0xc4363851)), + BIL_PAIR (BIL_VAL (0x584176b5), BIL_VAL (0xd096a0fa)), + BIL_PAIR (BIL_VAL (0x1cb17d1d), BIL_VAL (0x5c7ed5e0)), + BIL_PAIR (BIL_VAL (0x45f3218e), BIL_VAL (0x8d2a7ade)), + BIL_PAIR (BIL_VAL (0xc8aa7086), BIL_VAL (0x872231d1)), + BIL_PAIR (BIL_VAL (0xa29c0ced), BIL_VAL (0x4aeace45)), + BIL_PAIR (BIL_VAL (0xe91b9b8d), BIL_VAL (0x732360dd)), + BIL_PAIR (BIL_VAL (0xbdf3278c), BIL_VAL (0xdcd2b20b)), + BIL_PAIR (BIL_VAL (0xc6ed472a), BIL_VAL (0x40000000)) + /* And implicit 192 0 bits. */), + /* 223 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x1b), BIL_VAL (0xaa1e332d)), + BIL_PAIR (BIL_VAL (0x728ea31a), BIL_VAL (0x25e249c5)), + BIL_PAIR (BIL_VAL (0x1eeee325), BIL_VAL (0x9cf45ac2)), + BIL_PAIR (BIL_VAL (0xbb7f4f91), BIL_VAL (0x83a8ccb3)), + BIL_PAIR (BIL_VAL (0xd6a86541), BIL_VAL (0x4755f230)), + BIL_PAIR (BIL_VAL (0x5a188144), BIL_VAL (0xed2c0ebb)), + BIL_PAIR (BIL_VAL (0x1b141386), BIL_VAL (0x7f61c8a9)), + BIL_PAIR (BIL_VAL (0x6b7f8b80), BIL_VAL (0xa03af475)), + BIL_PAIR (BIL_VAL (0xc544c7a6), BIL_VAL (0x80000000)) + /* And implicit 192 0 bits. */), + /* 224 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x114), BIL_VAL (0xa52dffc6)), + BIL_PAIR (BIL_VAL (0x79925f05), BIL_VAL (0x7ad6e1b3)), + BIL_PAIR (BIL_VAL (0x3554df78), BIL_VAL (0x218b8b9b)), + BIL_PAIR (BIL_VAL (0x52f91baf), BIL_VAL (0x2497ff06)), + BIL_PAIR (BIL_VAL (0x6293f48c), BIL_VAL (0xc95b75e3)), + BIL_PAIR (BIL_VAL (0x84f50cb1), BIL_VAL (0x43b8934f)), + BIL_PAIR (BIL_VAL (0x0ec8c340), BIL_VAL (0xf9d1d69e)), + BIL_PAIR (BIL_VAL (0x32fb7306), BIL_VAL (0x424d8c99)), + BIL_PAIR (BIL_VAL (0xb4afcc81), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 225 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0xace), BIL_VAL (0x73cbfdc0)), + BIL_PAIR (BIL_VAL (0xbfb7b636), BIL_VAL (0xcc64d100)), + BIL_PAIR (BIL_VAL (0x1550bab1), BIL_VAL (0x4f737411)), + BIL_PAIR (BIL_VAL (0x3dbb14d7), BIL_VAL (0x6deff63f)), + BIL_PAIR (BIL_VAL (0xd9c78d7f), BIL_VAL (0xdd929ae3)), + BIL_PAIR (BIL_VAL (0x31927eec), BIL_VAL (0xa535c116)), + BIL_PAIR (BIL_VAL (0x93d7a089), BIL_VAL (0xc232622d)), + BIL_PAIR (BIL_VAL (0xfdd27e3e), BIL_VAL (0x97077e01)), + BIL_PAIR (BIL_VAL (0x0eddfd0a), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 226 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x6c10), BIL_VAL (0x85f7e987)), + BIL_PAIR (BIL_VAL (0x7d2d1e23), BIL_VAL (0xfbf02a00)), + BIL_PAIR (BIL_VAL (0xd5274aed), BIL_VAL (0x1a8288ac)), + BIL_PAIR (BIL_VAL (0x694ed06a), BIL_VAL (0x4b5f9e7e)), + BIL_PAIR (BIL_VAL (0x81cb86fe), BIL_VAL (0xa7ba0cdf)), + BIL_PAIR (BIL_VAL (0xefb8f53e), BIL_VAL (0x74198ae1)), + BIL_PAIR (BIL_VAL (0xc66c4561), BIL_VAL (0x95f7d5cb)), + BIL_PAIR (BIL_VAL (0xea38ee71), BIL_VAL (0xe64aec0a)), + BIL_PAIR (BIL_VAL (0x94abe264), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 227 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x438a5), BIL_VAL (0x3baf1f4a)), + BIL_PAIR (BIL_VAL (0xe3c32d67), BIL_VAL (0xd761a408)), + BIL_PAIR (BIL_VAL (0x5388ed43), BIL_VAL (0x091956bc)), + BIL_PAIR (BIL_VAL (0x1d142426), BIL_VAL (0xf1bc30f1)), + BIL_PAIR (BIL_VAL (0x11f345f2), BIL_VAL (0x8d4480bf)), + BIL_PAIR (BIL_VAL (0x5d399470), BIL_VAL (0x88ff6cd1)), + BIL_PAIR (BIL_VAL (0xc03ab5cf), BIL_VAL (0xdbae59f7)), + BIL_PAIR (BIL_VAL (0x26395072), BIL_VAL (0xfeed3869)), + BIL_PAIR (BIL_VAL (0xceb6d7e8), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 228 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x2a3674), BIL_VAL (0x54d738ec)), + BIL_PAIR (BIL_VAL (0xe59fc60e), BIL_VAL (0x69d06853)), + BIL_PAIR (BIL_VAL (0x4359449e), BIL_VAL (0x5afd6359)), + BIL_PAIR (BIL_VAL (0x22c96985), BIL_VAL (0x7159e96a)), + BIL_PAIR (BIL_VAL (0xb380bb79), BIL_VAL (0x84ad0779)), + BIL_PAIR (BIL_VAL (0xa43fcc65), BIL_VAL (0x59fa4031)), + BIL_PAIR (BIL_VAL (0x824b1a1e), BIL_VAL (0x94cf83a7)), + BIL_PAIR (BIL_VAL (0x7e3d247d), BIL_VAL (0xf5443422)), + BIL_PAIR (BIL_VAL (0x13246f10), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 229 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x1a6208b), BIL_VAL (0x50683940)), + BIL_PAIR (BIL_VAL (0xf83dbc90), BIL_VAL (0x22241340)), + BIL_PAIR (BIL_VAL (0xa17cae2f), BIL_VAL (0x8de5e17b)), + BIL_PAIR (BIL_VAL (0x5bde1f36), BIL_VAL (0x6d831e2b)), + BIL_PAIR (BIL_VAL (0x030752bf), BIL_VAL (0x2ec24ac0)), + BIL_PAIR (BIL_VAL (0x6a7dfbf5), BIL_VAL (0x83c681ef)), + BIL_PAIR (BIL_VAL (0x16ef0531), BIL_VAL (0xd01b248a)), + BIL_PAIR (BIL_VAL (0xee636ceb), BIL_VAL (0x94aa0954)), + BIL_PAIR (BIL_VAL (0xbf6c56a0), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 230 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0x107d4571), BIL_VAL (0x24123c89)), + BIL_PAIR (BIL_VAL (0xb2695da1), BIL_VAL (0x5568c086)), + BIL_PAIR (BIL_VAL (0x4edecddb), BIL_VAL (0x8afaced1)), + BIL_PAIR (BIL_VAL (0x96ad3820), BIL_VAL (0x471f2dae)), + BIL_PAIR (BIL_VAL (0x1e493b77), BIL_VAL (0xd396eb84)), + BIL_PAIR (BIL_VAL (0x28ebd797), BIL_VAL (0x25c11356)), + BIL_PAIR (BIL_VAL (0xe55633f2), BIL_VAL (0x210f6d6d)), + BIL_PAIR (BIL_VAL (0x4fe24133), BIL_VAL (0xcea45d4f)), + BIL_PAIR (BIL_VAL (0x7a3b6240), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 231 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0xa4e4b66b), BIL_VAL (0x68b65d60)), + BIL_PAIR (BIL_VAL (0xf81da84d), BIL_VAL (0x5617853f)), + BIL_PAIR (BIL_VAL (0x14b40a93), BIL_VAL (0x6dcc142f)), + BIL_PAIR (BIL_VAL (0xe2c43142), BIL_VAL (0xc737c8cd)), + BIL_PAIR (BIL_VAL (0x2edc52ae), BIL_VAL (0x43e53329)), + BIL_PAIR (BIL_VAL (0x99366be7), BIL_VAL (0x798ac164)), + BIL_PAIR (BIL_VAL (0xf55e0775), BIL_VAL (0x4a9a4645)), + BIL_PAIR (BIL_VAL (0x1ed68c06), BIL_VAL (0x126ba51a)), + BIL_PAIR (BIL_VAL (0xc651d680), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 232 */ + BIL_SET10 (BIL_VAL (0x6), + BIL_PAIR (BIL_VAL (0x70ef2032), BIL_VAL (0x171fa5c9)), + BIL_PAIR (BIL_VAL (0xb1289305), BIL_VAL (0x5ceb3476)), + BIL_PAIR (BIL_VAL (0xcf0869c2), BIL_VAL (0x49f8c9de)), + BIL_PAIR (BIL_VAL (0xdba9ec9b), BIL_VAL (0xc82dd803)), + BIL_PAIR (BIL_VAL (0xd49b3ace), BIL_VAL (0xa6f3ff9f)), + BIL_PAIR (BIL_VAL (0xfc20370a), BIL_VAL (0xbf6b8df1)), + BIL_PAIR (BIL_VAL (0x95ac4a94), BIL_VAL (0xea06beb3)), + BIL_PAIR (BIL_VAL (0x3461783c), BIL_VAL (0xb834730b)), + BIL_PAIR (BIL_VAL (0xbf326100), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 233 */ + BIL_SET10 (BIL_VAL (0x40), + BIL_PAIR (BIL_VAL (0x695741f4), BIL_VAL (0xe73c79e0)), + BIL_PAIR (BIL_VAL (0xeb95be35), BIL_VAL (0xa1300ca4)), + BIL_PAIR (BIL_VAL (0x16542196), BIL_VAL (0xe3b7e2b4)), + BIL_PAIR (BIL_VAL (0x94a33e15), BIL_VAL (0xd1ca7026)), + BIL_PAIR (BIL_VAL (0x4e104c12), BIL_VAL (0x8587fc3f)), + BIL_PAIR (BIL_VAL (0xd942266b), BIL_VAL (0x7a338b6f)), + BIL_PAIR (BIL_VAL (0xd8bae9d1), BIL_VAL (0x24437300)), + BIL_PAIR (BIL_VAL (0x0bceb25f), BIL_VAL (0x320c7e75)), + BIL_PAIR (BIL_VAL (0x77f7ca00), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 234 */ + BIL_SET10 (BIL_VAL (0x284), + BIL_PAIR (BIL_VAL (0x1d689391), BIL_VAL (0x085cc2c9)), + BIL_PAIR (BIL_VAL (0x33d96e18), BIL_VAL (0x4be07e68)), + BIL_PAIR (BIL_VAL (0xdf494fe4), BIL_VAL (0xe52edb0d)), + BIL_PAIR (BIL_VAL (0xce606cda), BIL_VAL (0x31e8617f)), + BIL_PAIR (BIL_VAL (0x0ca2f8b9), BIL_VAL (0x374fda7e)), + BIL_PAIR (BIL_VAL (0x7c958032), BIL_VAL (0xc603725e)), + BIL_PAIR (BIL_VAL (0x774d222b), BIL_VAL (0x6aa27e00)), + BIL_PAIR (BIL_VAL (0x7612f7b7), BIL_VAL (0xf47cf096)), + BIL_PAIR (BIL_VAL (0xafade400), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 235 */ + BIL_SET10 (BIL_VAL (0x1929), + BIL_PAIR (BIL_VAL (0x2615c3aa), BIL_VAL (0x539f9bdc)), + BIL_PAIR (BIL_VAL (0x067e4cf2), BIL_VAL (0xf6c4f018)), + BIL_PAIR (BIL_VAL (0xb8dd1ef0), BIL_VAL (0xf3d48e8a)), + BIL_PAIR (BIL_VAL (0x0fc44085), BIL_VAL (0xf313cef6)), + BIL_PAIR (BIL_VAL (0x7e5db73c), BIL_VAL (0x291e88f0)), + BIL_PAIR (BIL_VAL (0xddd701fb), BIL_VAL (0xbc2277b0)), + BIL_PAIR (BIL_VAL (0xa90355b2), BIL_VAL (0x2a58ec04)), + BIL_PAIR (BIL_VAL (0x9cbdad2f), BIL_VAL (0x8ce165e2)), + BIL_PAIR (BIL_VAL (0xdccae800), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 236 */ + BIL_SET10 (BIL_VAL (0xfb9b), + BIL_PAIR (BIL_VAL (0x7cd9a4a7), BIL_VAL (0x443c1698)), + BIL_PAIR (BIL_VAL (0x40ef017d), BIL_VAL (0xa3b160f7)), + BIL_PAIR (BIL_VAL (0x38a33569), BIL_VAL (0x864d9164)), + BIL_PAIR (BIL_VAL (0x9daa853b), BIL_VAL (0x7ec615a0)), + BIL_PAIR (BIL_VAL (0xefa92859), BIL_VAL (0x9b315968)), + BIL_PAIR (BIL_VAL (0xaa6613d5), BIL_VAL (0x5958ace6)), + BIL_PAIR (BIL_VAL (0x9a2158f5), BIL_VAL (0xa779382e)), + BIL_PAIR (BIL_VAL (0x1f68c3db), BIL_VAL (0x80cdfadc)), + BIL_PAIR (BIL_VAL (0x9fed1000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 237 */ + BIL_SET10 (BIL_VAL (0x9d412), + BIL_PAIR (BIL_VAL (0xe0806e88), BIL_VAL (0xaa58e1f2)), + BIL_PAIR (BIL_VAL (0x89560ee8), BIL_VAL (0x64edc9a8)), + BIL_PAIR (BIL_VAL (0x3660161f), BIL_VAL (0x3f07adee)), + BIL_PAIR (BIL_VAL (0x28a93452), BIL_VAL (0xf3bcd849)), + BIL_PAIR (BIL_VAL (0x5c9b9380), BIL_VAL (0x0fed7e16)), + BIL_PAIR (BIL_VAL (0xa7fcc655), BIL_VAL (0x7d76c102)), + BIL_PAIR (BIL_VAL (0x054d7998), BIL_VAL (0x8abc31cd)), + BIL_PAIR (BIL_VAL (0x3a17a693), BIL_VAL (0x080bcc9e)), + BIL_PAIR (BIL_VAL (0x3f42a000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 238 */ + BIL_SET10 (BIL_VAL (0x6248bc), + BIL_PAIR (BIL_VAL (0xc5045156), BIL_VAL (0xa778d379)), + BIL_PAIR (BIL_VAL (0x5d5c9513), BIL_VAL (0xf149e092)), + BIL_PAIR (BIL_VAL (0x1fc0dd38), BIL_VAL (0x764ccb4d)), + BIL_PAIR (BIL_VAL (0x969c0b3d), BIL_VAL (0x856072dd)), + BIL_PAIR (BIL_VAL (0x9e13c300), BIL_VAL (0x9f46ece2)), + BIL_PAIR (BIL_VAL (0x8fdfbf56), BIL_VAL (0xe6a38a14)), + BIL_PAIR (BIL_VAL (0x3506bff5), BIL_VAL (0x6b59f204)), + BIL_PAIR (BIL_VAL (0x44ec81be), BIL_VAL (0x5075fe2e)), + BIL_PAIR (BIL_VAL (0x789a4000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 239 */ + BIL_SET10 (BIL_VAL (0x3d6d75f), + BIL_PAIR (BIL_VAL (0xb22b2d62), BIL_VAL (0x8ab842bd)), + BIL_PAIR (BIL_VAL (0xa59dd2c7), BIL_VAL (0x6ce2c5b5)), + BIL_PAIR (BIL_VAL (0x3d88a434), BIL_VAL (0x9efff107)), + BIL_PAIR (BIL_VAL (0xe2187067), BIL_VAL (0x35c47ca8)), + BIL_PAIR (BIL_VAL (0x2cc59e06), BIL_VAL (0x38c540d9)), + BIL_PAIR (BIL_VAL (0x9ebd7965), BIL_VAL (0x026364ca)), + BIL_PAIR (BIL_VAL (0x12437f96), BIL_VAL (0x3183742a)), + BIL_PAIR (BIL_VAL (0xb13d116f), BIL_VAL (0x249bedd0)), + BIL_PAIR (BIL_VAL (0xb6068000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 240 */ + BIL_SET10 (BIL_VAL (0x266469bc), + BIL_PAIR (BIL_VAL (0xf5afc5d9), BIL_VAL (0x6b329b68)), + BIL_PAIR (BIL_VAL (0x782a3bca), BIL_VAL (0x40dbb914)), + BIL_PAIR (BIL_VAL (0x67566a0e), BIL_VAL (0x35ff6a4e)), + BIL_PAIR (BIL_VAL (0xd4f46408), BIL_VAL (0x19acde91)), + BIL_PAIR (BIL_VAL (0xbfb82c3e), BIL_VAL (0x37b48880)), + BIL_PAIR (BIL_VAL (0x3366bdf2), BIL_VAL (0x17e1efe4)), + BIL_PAIR (BIL_VAL (0xb6a2fbdd), BIL_VAL (0xef2289aa)), + BIL_PAIR (BIL_VAL (0xec62ae57), BIL_VAL (0x6e174a27)), + BIL_PAIR (BIL_VAL (0x1c410000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 241 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x1), BIL_VAL (0x7fec2161)), + BIL_PAIR (BIL_VAL (0x98ddba7e), BIL_VAL (0x2ffa1214)), + BIL_PAIR (BIL_VAL (0xb1a655e6), BIL_VAL (0x88953acc)), + BIL_PAIR (BIL_VAL (0x0960248e), BIL_VAL (0x1bfa2714)), + BIL_PAIR (BIL_VAL (0x518be851), BIL_VAL (0x00c0b1b1)), + BIL_PAIR (BIL_VAL (0x7d31ba6e), BIL_VAL (0x2d0d5502)), + BIL_PAIR (BIL_VAL (0x02036b74), BIL_VAL (0xeed35eef)), + BIL_PAIR (BIL_VAL (0x225dd6ab), BIL_VAL (0x575960ad)), + BIL_PAIR (BIL_VAL (0x3bdacf6a), BIL_VAL (0x4ce8e587)), + BIL_PAIR (BIL_VAL (0x1a8a0000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 242 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0xe), BIL_VAL (0xff394dcf)), + BIL_PAIR (BIL_VAL (0xf8a948ed), BIL_VAL (0xdfc4b4ce)), + BIL_PAIR (BIL_VAL (0xf07f5b01), BIL_VAL (0x55d44bf8)), + BIL_PAIR (BIL_VAL (0x5dc16d8d), BIL_VAL (0x17c586cb)), + BIL_PAIR (BIL_VAL (0x2f77132a), BIL_VAL (0x0786f0ee)), + BIL_PAIR (BIL_VAL (0xe3f1484d), BIL_VAL (0xc2855214)), + BIL_PAIR (BIL_VAL (0x14223291), BIL_VAL (0x5441b557)), + BIL_PAIR (BIL_VAL (0x57aa62b1), BIL_VAL (0x697dc6c4)), + BIL_PAIR (BIL_VAL (0x568c1a27), BIL_VAL (0x0118f747)), + BIL_PAIR (BIL_VAL (0x09640000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 243 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x95), BIL_VAL (0xf83d0a1f)), + BIL_PAIR (BIL_VAL (0xb69cd94a), BIL_VAL (0xbdaf1015)), + BIL_PAIR (BIL_VAL (0x64f98e0d), BIL_VAL (0x5a4af7b3)), + BIL_PAIR (BIL_VAL (0xa98e4782), BIL_VAL (0xedb743ef)), + BIL_PAIR (BIL_VAL (0xdaa6bfa4), BIL_VAL (0x4b456954)), + BIL_PAIR (BIL_VAL (0xe76cd309), BIL_VAL (0x993534c8)), + BIL_PAIR (BIL_VAL (0xc955f9ad), BIL_VAL (0x4a911569)), + BIL_PAIR (BIL_VAL (0x6ca7daee), BIL_VAL (0x1ee9c3ab)), + BIL_PAIR (BIL_VAL (0x61790586), BIL_VAL (0x0af9a8c6)), + BIL_PAIR (BIL_VAL (0x5de80000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 244 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x5db), BIL_VAL (0xb262653d)), + BIL_PAIR (BIL_VAL (0x22207ceb), BIL_VAL (0x68d6a0d5)), + BIL_PAIR (BIL_VAL (0xf1bf8c85), BIL_VAL (0x86edad04)), + BIL_PAIR (BIL_VAL (0x9f8ecb1d), BIL_VAL (0x4928a75e)), + BIL_PAIR (BIL_VAL (0x8a837c6a), BIL_VAL (0xf0b61d51)), + BIL_PAIR (BIL_VAL (0x0a403e5f), BIL_VAL (0xfc140fd7)), + BIL_PAIR (BIL_VAL (0xdd5bc0c4), BIL_VAL (0xe9aad61e)), + BIL_PAIR (BIL_VAL (0x3e8e8d4d), BIL_VAL (0x3521a4b1)), + BIL_PAIR (BIL_VAL (0xceba373c), BIL_VAL (0x6dc097bf)), + BIL_PAIR (BIL_VAL (0xab100000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 245 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x3a94), BIL_VAL (0xf7d7f463)), + BIL_PAIR (BIL_VAL (0x5544e132), BIL_VAL (0x1862485b)), + BIL_PAIR (BIL_VAL (0x717b7d37), BIL_VAL (0x4548c22e)), + BIL_PAIR (BIL_VAL (0x3b93ef24), BIL_VAL (0xdb9689b1)), + BIL_PAIR (BIL_VAL (0x6922dc2d), BIL_VAL (0x671d252a)), + BIL_PAIR (BIL_VAL (0x66826fbf), BIL_VAL (0xd8c89e6e)), + BIL_PAIR (BIL_VAL (0xa59587b1), BIL_VAL (0x20ac5d2e)), + BIL_PAIR (BIL_VAL (0x71918504), BIL_VAL (0x13506ef2)), + BIL_PAIR (BIL_VAL (0x1346285c), BIL_VAL (0x4985ed7c)), + BIL_PAIR (BIL_VAL (0xaea00000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 246 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x249d1), BIL_VAL (0xae6f8be1)), + BIL_PAIR (BIL_VAL (0x54b0cbf4), BIL_VAL (0xf3d6d392)), + BIL_PAIR (BIL_VAL (0x6ed2e428), BIL_VAL (0xb4d795ce)), + BIL_PAIR (BIL_VAL (0x53c75770), BIL_VAL (0x93e160ee)), + BIL_PAIR (BIL_VAL (0x1b5c99c6), BIL_VAL (0x072373a8)), + BIL_PAIR (BIL_VAL (0x01185d7e), BIL_VAL (0x77d63052)), + BIL_PAIR (BIL_VAL (0x77d74ceb), BIL_VAL (0x46bba3d0)), + BIL_PAIR (BIL_VAL (0x6faf3228), BIL_VAL (0xc1245574)), + BIL_PAIR (BIL_VAL (0xc0bd939a), BIL_VAL (0xdf3b46de)), + BIL_PAIR (BIL_VAL (0xd2400000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 247 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x16e230), BIL_VAL (0xd05b76cd)), + BIL_PAIR (BIL_VAL (0x4ee7f791), BIL_VAL (0x866443b8)), + BIL_PAIR (BIL_VAL (0x543ce997), BIL_VAL (0x106bda0f)), + BIL_PAIR (BIL_VAL (0x45c96a65), BIL_VAL (0xc6cdc94d)), + BIL_PAIR (BIL_VAL (0x119e01bc), BIL_VAL (0x47628490)), + BIL_PAIR (BIL_VAL (0x0af3a6f0), BIL_VAL (0xae5de338)), + BIL_PAIR (BIL_VAL (0xae690130), BIL_VAL (0xc3546624)), + BIL_PAIR (BIL_VAL (0x5cd7f597), BIL_VAL (0x8b6b568f)), + BIL_PAIR (BIL_VAL (0x8767c40c), BIL_VAL (0xb850c4b4)), + BIL_PAIR (BIL_VAL (0x36800000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 248 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0xe4d5e8), BIL_VAL (0x2392a405)), + BIL_PAIR (BIL_VAL (0x150fabaf), BIL_VAL (0x3feaa533)), + BIL_PAIR (BIL_VAL (0x4a611fe6), BIL_VAL (0xa4368498)), + BIL_PAIR (BIL_VAL (0xb9de27f9), BIL_VAL (0xc409dd02)), + BIL_PAIR (BIL_VAL (0xb02c115a), BIL_VAL (0xc9d92da0)), + BIL_PAIR (BIL_VAL (0x6d848566), BIL_VAL (0xcfaae036)), + BIL_PAIR (BIL_VAL (0xd01a0be7), BIL_VAL (0xa14bfd6b)), + BIL_PAIR (BIL_VAL (0xa06f97eb), BIL_VAL (0x7231619b)), + BIL_PAIR (BIL_VAL (0x4a0da87f), BIL_VAL (0x3327af0a)), + BIL_PAIR (BIL_VAL (0x21000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 249 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x8f05b11), BIL_VAL (0x63ba6832)), + BIL_PAIR (BIL_VAL (0xd29cb4d8), BIL_VAL (0x7f2a7400)), + BIL_PAIR (BIL_VAL (0xe7cb3f02), BIL_VAL (0x6a212df7)), + BIL_PAIR (BIL_VAL (0x42ad8fc1), BIL_VAL (0xa862a21a)), + BIL_PAIR (BIL_VAL (0xe1b8ad8b), BIL_VAL (0xe27bc844)), + BIL_PAIR (BIL_VAL (0x472d3604), BIL_VAL (0x1cacc224)), + BIL_PAIR (BIL_VAL (0x2104770c), BIL_VAL (0x4cf7e634)), + BIL_PAIR (BIL_VAL (0x445bef32), BIL_VAL (0x75edd010)), + BIL_PAIR (BIL_VAL (0xe48894f7), BIL_VAL (0xff8cd665)), + BIL_PAIR (BIL_VAL (0x4a000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 250 */ + BIL_SET10 (BIL_PAIR (BIL_VAL (0x59638ead), BIL_VAL (0xe54811fc)), + BIL_PAIR (BIL_VAL (0x3a1f1074), BIL_VAL (0xf7a88809)), + BIL_PAIR (BIL_VAL (0x0df07618), BIL_VAL (0x254bcba8)), + BIL_PAIR (BIL_VAL (0x9ac79d90), BIL_VAL (0x93da550c)), + BIL_PAIR (BIL_VAL (0xd136c776), BIL_VAL (0xd8d5d2aa)), + BIL_PAIR (BIL_VAL (0xc7c41c29), BIL_VAL (0x1ebf9569)), + BIL_PAIR (BIL_VAL (0x4a2ca67b), BIL_VAL (0x01aefe0a)), + BIL_PAIR (BIL_VAL (0xab9757f8), BIL_VAL (0x9b4a20a8)), + BIL_PAIR (BIL_VAL (0xed55d1af), BIL_VAL (0xfb805ff4)), + BIL_PAIR (BIL_VAL (0xe4000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 251 */ + BIL_SET11 (BIL_VAL (0x3), + BIL_PAIR (BIL_VAL (0x7de392ca), BIL_VAL (0xf4d0b3da)), + BIL_PAIR (BIL_VAL (0x4536a491), BIL_VAL (0xac95505a)), + BIL_PAIR (BIL_VAL (0x8b649cf1), BIL_VAL (0x74f5f496)), + BIL_PAIR (BIL_VAL (0x0bcc27a5), BIL_VAL (0xc6875280)), + BIL_PAIR (BIL_VAL (0x2c23caa4), BIL_VAL (0x785a3aab)), + BIL_PAIR (BIL_VAL (0xcda9199b), BIL_VAL (0x337bd61c)), + BIL_PAIR (BIL_VAL (0xe5be80ce), BIL_VAL (0x10d5ec6a)), + BIL_PAIR (BIL_VAL (0xb3e96fb6), BIL_VAL (0x10e54699)), + BIL_PAIR (BIL_VAL (0x455a30df), BIL_VAL (0xd303bf90)), + BIL_PAIR (BIL_VAL (0xe8000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 252 */ + BIL_SET11 (BIL_VAL (0x22), + BIL_PAIR (BIL_VAL (0xeae3bbed), BIL_VAL (0x90270686)), + BIL_PAIR (BIL_VAL (0xb4226db0), BIL_VAL (0xbdd52389)), + BIL_PAIR (BIL_VAL (0x71ee216e), BIL_VAL (0x919b8ddc)), + BIL_PAIR (BIL_VAL (0x75f98c79), BIL_VAL (0xc1493901)), + BIL_PAIR (BIL_VAL (0xb965ea6c), BIL_VAL (0xb3864ab6)), + BIL_PAIR (BIL_VAL (0x089b0010), BIL_VAL (0x02d65d20)), + BIL_PAIR (BIL_VAL (0xf971080c), BIL_VAL (0xa85b3c2b)), + BIL_PAIR (BIL_VAL (0x071e5d1c), BIL_VAL (0xa8f4c1fc)), + BIL_PAIR (BIL_VAL (0xb585e8be), BIL_VAL (0x3e257ba9)), + BIL_PAIR (BIL_VAL (0x10000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 253 */ + BIL_SET11 (BIL_VAL (0x15d), + BIL_PAIR (BIL_VAL (0x2ce55747), BIL_VAL (0xa1864143)), + BIL_PAIR (BIL_VAL (0x095848e7), BIL_VAL (0x6a53635e)), + BIL_PAIR (BIL_VAL (0x734d4e51), BIL_VAL (0xb0138a9c)), + BIL_PAIR (BIL_VAL (0x9bbf7cc1), BIL_VAL (0x8cdc3a11)), + BIL_PAIR (BIL_VAL (0x3dfb283f), BIL_VAL (0x033eeb1c)), + BIL_PAIR (BIL_VAL (0x560e00a0), BIL_VAL (0x1c5fa349)), + BIL_PAIR (BIL_VAL (0xbe6a507e), BIL_VAL (0x939059ae)), + BIL_PAIR (BIL_VAL (0x472fa31e), BIL_VAL (0x998f93df)), + BIL_PAIR (BIL_VAL (0x173b176e), BIL_VAL (0x6d76d49a)), + BIL_PAIR (BIL_VAL (0xa0000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 254 */ + BIL_SET11 (BIL_VAL (0xda3), + BIL_PAIR (BIL_VAL (0xc0f568cc), BIL_VAL (0x4f3e8c9e)), + BIL_PAIR (BIL_VAL (0x5d72d90a), BIL_VAL (0x2741e1b0)), + BIL_PAIR (BIL_VAL (0x81050f30), BIL_VAL (0xe0c36a1e)), + BIL_PAIR (BIL_VAL (0x157adf8f), BIL_VAL (0x809a44ac)), + BIL_PAIR (BIL_VAL (0x6bcf9276), BIL_VAL (0x20752f1b)), + BIL_PAIR (BIL_VAL (0x5c8c0641), BIL_VAL (0x1bbc60e1)), + BIL_PAIR (BIL_VAL (0x702724f1), BIL_VAL (0xc3a380ce)), + BIL_PAIR (BIL_VAL (0xc7dc5f31), BIL_VAL (0xff9bc6b6)), + BIL_PAIR (BIL_VAL (0xe84eea50), BIL_VAL (0x46a44e0a)), + BIL_PAIR (BIL_VAL (0x40000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 255 */ + BIL_SET11 (BIL_VAL (0x8865), + BIL_PAIR (BIL_VAL (0x899617fb), BIL_VAL (0x18717e2f)), + BIL_PAIR (BIL_VAL (0xa67c7a65), BIL_VAL (0x8892d0e5)), + BIL_PAIR (BIL_VAL (0x0a3297e8), BIL_VAL (0xc7a2252c)), + BIL_PAIR (BIL_VAL (0xd6ccbb9b), BIL_VAL (0x0606aebc)), + BIL_PAIR (BIL_VAL (0x361bb89d), BIL_VAL (0x4493d711)), + BIL_PAIR (BIL_VAL (0x9d783e8b), BIL_VAL (0x155bc8ce)), + BIL_PAIR (BIL_VAL (0x61877171), BIL_VAL (0xa4630813)), + BIL_PAIR (BIL_VAL (0xce9bb7f3), BIL_VAL (0xfc15c325)), + BIL_PAIR (BIL_VAL (0x13152722), BIL_VAL (0xc26b0c66)), + BIL_PAIR (BIL_VAL (0x80000000), BIL_VAL (0x00000000)) + /* And implicit 192 0 bits. */), + /* 256 */ + BIL_SET10 (BIL_VAL (0x553f7), + BIL_PAIR (BIL_VAL (0x5fdcefce), BIL_VAL (0xf46eeddc)), + BIL_PAIR (BIL_VAL (0x80dcc7f7), BIL_VAL (0x55bc28f2)), + BIL_PAIR (BIL_VAL (0x65f9ef17), BIL_VAL (0xcc5573c0)), + BIL_PAIR (BIL_VAL (0x63ff540e), BIL_VAL (0x3c42d35a)), + BIL_PAIR (BIL_VAL (0x1d153624), BIL_VAL (0xadc666b0)), + BIL_PAIR (BIL_VAL (0x26b2716e), BIL_VAL (0xd595d80f)), + BIL_PAIR (BIL_VAL (0xcf4a6e70), BIL_VAL (0x6bde50c6)), + BIL_PAIR (BIL_VAL (0x12152f87), BIL_VAL (0xd8d99f72)), + BIL_PAIR (BIL_VAL (0xbed3875b), BIL_VAL (0x982e7c01)) + /* And implicit 256 0 bits. */), + /* 512 */ + BIL_SET2 (BIL_SET4 (BIL_PAIR (BIL_VAL (0x1c), BIL_VAL (0x633415d4)), + BIL_PAIR (BIL_VAL (0xc1d238d9), BIL_VAL (0x8cab8a97)), + BIL_PAIR (BIL_VAL (0x8a0b1f13), BIL_VAL (0x8cb07303)), + BIL_PAIR (BIL_VAL (0xa2699748), BIL_VAL (0x45a71d46))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xb099bc81), BIL_VAL (0x7343afac)), + BIL_PAIR (BIL_VAL (0x69be5b0e), BIL_VAL (0x9449775c)), + BIL_PAIR (BIL_VAL (0x1366732a), BIL_VAL (0x93abade4)), + BIL_PAIR (BIL_VAL (0xb2908ee0), BIL_VAL (0xf95f635e)), + BIL_PAIR (BIL_VAL (0x85a91924), BIL_VAL (0xc3fc0695)), + BIL_PAIR (BIL_VAL (0xe7fc7153), BIL_VAL (0x329c57ae)), + BIL_PAIR (BIL_VAL (0xbfa3edac), BIL_VAL (0x96e14f5d)), + BIL_PAIR (BIL_VAL (0xbc51fb2e), BIL_VAL (0xb21a2f22)), + BIL_PAIR (BIL_VAL (0x1e25cfea), BIL_VAL (0x703ed321)), + BIL_PAIR (BIL_VAL (0xaa1da1bf), BIL_VAL (0x28f8733b)), + BIL_PAIR (BIL_VAL (0x4475b579), BIL_VAL (0xc88976c1)), + BIL_PAIR (BIL_VAL (0x94e65747), BIL_VAL (0x46c40513)), + BIL_PAIR (BIL_VAL (0xc31e1ad9), BIL_VAL (0xb83a8a97)), + BIL_PAIR (BIL_VAL (0x5d96976f), BIL_VAL (0x8f9546dc)), + BIL_PAIR (BIL_VAL (0x77f27267), BIL_VAL (0xfc6cf801)) + /* And implicit 512 0 bits. */)), + /* 768 */ + BIL_SET2 (BIL_SET13 (BIL_PAIR (BIL_VAL (0x973f9c), BIL_VAL (0xa8cd00a6)), + BIL_PAIR (BIL_VAL (0x8c6c8d3f), BIL_VAL (0xca02ca6d)), + BIL_PAIR (BIL_VAL (0xe6b0d7ba), BIL_VAL (0x42677734)), + BIL_PAIR (BIL_VAL (0x4d7ced4b), BIL_VAL (0xde6b3671)), + BIL_PAIR (BIL_VAL (0x55790955), BIL_VAL (0xdebadbbb)), + BIL_PAIR (BIL_VAL (0x834d963d), BIL_VAL (0x164f3474)), + BIL_PAIR (BIL_VAL (0x76fef8bc), BIL_VAL (0xb0c43b21)), + BIL_PAIR (BIL_VAL (0x6f8a2c7d), BIL_VAL (0xc42b346b)), + BIL_PAIR (BIL_VAL (0x54ccec04), BIL_VAL (0x0ff24f6f)), + BIL_PAIR (BIL_VAL (0xa522c4f7), BIL_VAL (0xef1410dd)), + BIL_PAIR (BIL_VAL (0x3f150b6e), BIL_VAL (0x3177669a)), + BIL_PAIR (BIL_VAL (0x57104362), BIL_VAL (0x749594d7)), + BIL_PAIR (BIL_VAL (0x6c1e29ba), BIL_VAL (0xd03661bb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x93909c54), BIL_VAL (0x1485f9df)), + BIL_PAIR (BIL_VAL (0x5edf1c46), BIL_VAL (0xe9de83ee)), + BIL_PAIR (BIL_VAL (0x7fed8a55), BIL_VAL (0xfcd28d3a)), + BIL_PAIR (BIL_VAL (0x4451c6ee), BIL_VAL (0xe349bfe2)), + BIL_PAIR (BIL_VAL (0x1c032744), BIL_VAL (0x8f28e71a)), + BIL_PAIR (BIL_VAL (0xcc270307), BIL_VAL (0x64597e3b)), + BIL_PAIR (BIL_VAL (0xe35d8a93), BIL_VAL (0xd1493ca6)), + BIL_PAIR (BIL_VAL (0x32b304b8), BIL_VAL (0x9e54d463)), + BIL_PAIR (BIL_VAL (0x1b59b9a3), BIL_VAL (0x1371f8ae)), + BIL_PAIR (BIL_VAL (0x86d95826), BIL_VAL (0x69e1b7e9)), + BIL_PAIR (BIL_VAL (0xcd00c670), BIL_VAL (0xf4bf365f)), + BIL_PAIR (BIL_VAL (0x74269c7a), BIL_VAL (0xb3172816)), + BIL_PAIR (BIL_VAL (0x7a4ce4de), BIL_VAL (0x1f6387f2)), + BIL_PAIR (BIL_VAL (0xcca2ba7a), BIL_VAL (0x9eb710db)), + BIL_PAIR (BIL_VAL (0x8c448edc), BIL_VAL (0xecbb7401)) + /* And implicit 768 0 bits. */)), + /* 1024 */ + BIL_SET3 (BIL_SET8 (BIL_VAL (0x325), + BIL_PAIR (BIL_VAL (0xd9d61a05), BIL_VAL (0xd4305d94)), + BIL_PAIR (BIL_VAL (0x34f4a3c6), BIL_VAL (0x2d433949)), + BIL_PAIR (BIL_VAL (0xae6209d4), BIL_VAL (0x926c3f5b)), + BIL_PAIR (BIL_VAL (0xd2db49ef), BIL_VAL (0x47187094)), + BIL_PAIR (BIL_VAL (0xc1a6970c), BIL_VAL (0xa7e6bd2a)), + BIL_PAIR (BIL_VAL (0x73c55349), BIL_VAL (0x36a8de06)), + BIL_PAIR (BIL_VAL (0x1e8d4649), BIL_VAL (0xf4f3235e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x005b8041), BIL_VAL (0x1640114a)), + BIL_PAIR (BIL_VAL (0x88bc491b), BIL_VAL (0x9fc4ed52)), + BIL_PAIR (BIL_VAL (0x0190fba0), BIL_VAL (0x35faaba6)), + BIL_PAIR (BIL_VAL (0xc356e38a), BIL_VAL (0x31b5653f)), + BIL_PAIR (BIL_VAL (0x44597583), BIL_VAL (0x6cb0b6c9)), + BIL_PAIR (BIL_VAL (0x75a351a2), BIL_VAL (0x8e4262ce)), + BIL_PAIR (BIL_VAL (0x3ce3a0b8), BIL_VAL (0xdf68368a)), + BIL_PAIR (BIL_VAL (0xe26a7b7e), BIL_VAL (0x976a3310)), + BIL_PAIR (BIL_VAL (0xfc8f1f90), BIL_VAL (0x31eb0f66)), + BIL_PAIR (BIL_VAL (0x9a202882), BIL_VAL (0x80bda5a5)), + BIL_PAIR (BIL_VAL (0x80d98089), BIL_VAL (0xdc1a47fe)), + BIL_PAIR (BIL_VAL (0x6b7595fb), BIL_VAL (0x101a3616)), + BIL_PAIR (BIL_VAL (0xb6f4654b), BIL_VAL (0x31fb6bfd)), + BIL_PAIR (BIL_VAL (0xf56deeec), BIL_VAL (0xb1b896bc)), + BIL_PAIR (BIL_VAL (0x8fc51a16), BIL_VAL (0xbf3fdeb3))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd814b505), BIL_VAL (0xba34c411)), + BIL_PAIR (BIL_VAL (0x8ad822a5), BIL_VAL (0x1abe1de3)), + BIL_PAIR (BIL_VAL (0x045b7a74), BIL_VAL (0x8e1042c4)), + BIL_PAIR (BIL_VAL (0x62be695a), BIL_VAL (0x9f9f2a07)), + BIL_PAIR (BIL_VAL (0xa7e89431), BIL_VAL (0x922bbb9f)), + BIL_PAIR (BIL_VAL (0xc9635986), BIL_VAL (0x1c5cd134)), + BIL_PAIR (BIL_VAL (0xf451218b), BIL_VAL (0x65dc60d7)), + BIL_PAIR (BIL_VAL (0x233e55c7), BIL_VAL (0x231d2b9c)), + BIL_PAIR (BIL_VAL (0x9fce837d), BIL_VAL (0x1e43f61f)), + BIL_PAIR (BIL_VAL (0x7de16cfb), BIL_VAL (0x896634ee)), + BIL_PAIR (BIL_VAL (0x0ed1440e), BIL_VAL (0xcc2cd819)), + BIL_PAIR (BIL_VAL (0x4c7d1e1a), BIL_VAL (0x140ac535)), + BIL_PAIR (BIL_VAL (0x15c51a88), BIL_VAL (0x991c4e87)), + BIL_PAIR (BIL_VAL (0x1ec29f86), BIL_VAL (0x6e7c215b)), + BIL_PAIR (BIL_VAL (0xf55b2b72), BIL_VAL (0x2919f001)) + /* And implicit 1024 0 bits. */)), + /* 1280 */ + BIL_SET4 (BIL_SET2 (BIL_VAL (0x10c59181), + BIL_PAIR (BIL_VAL (0xdd70add9), BIL_VAL (0x610b799a))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xb80bdd3f), BIL_VAL (0x3d9fe5c5)), + BIL_PAIR (BIL_VAL (0x83d5d3b7), BIL_VAL (0x371513e4)), + BIL_PAIR (BIL_VAL (0x883c0107), BIL_VAL (0xf8f65567)), + BIL_PAIR (BIL_VAL (0xc8a367c1), BIL_VAL (0x0d64aee5)), + BIL_PAIR (BIL_VAL (0xd5bcbdc5), BIL_VAL (0xe396703b)), + BIL_PAIR (BIL_VAL (0xf1cfc4c4), BIL_VAL (0x4b1dfee7)), + BIL_PAIR (BIL_VAL (0x0dc9dd4f), BIL_VAL (0x50d66022)), + BIL_PAIR (BIL_VAL (0x134517fd), BIL_VAL (0x22930096)), + BIL_PAIR (BIL_VAL (0xc3b7fcb6), BIL_VAL (0x89db4eb6)), + BIL_PAIR (BIL_VAL (0x32d109db), BIL_VAL (0xad462aab)), + BIL_PAIR (BIL_VAL (0x64d409c4), BIL_VAL (0xf3ef8c70)), + BIL_PAIR (BIL_VAL (0xd1855279), BIL_VAL (0xc9d4d249)), + BIL_PAIR (BIL_VAL (0x63cc5cd4), BIL_VAL (0xa8d14110)), + BIL_PAIR (BIL_VAL (0x267fb1db), BIL_VAL (0xdbcc5054)), + BIL_PAIR (BIL_VAL (0x973e4aae), BIL_VAL (0xcfb84a2d))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x18b37933), BIL_VAL (0xe8fa4935)), + BIL_PAIR (BIL_VAL (0xef3e6880), BIL_VAL (0x80107131)), + BIL_PAIR (BIL_VAL (0x3d2fdd8e), BIL_VAL (0xaeeeab7e)), + BIL_PAIR (BIL_VAL (0x37265f3b), BIL_VAL (0x409864d6)), + BIL_PAIR (BIL_VAL (0x11356488), BIL_VAL (0xb53d435a)), + BIL_PAIR (BIL_VAL (0xb98d07ca), BIL_VAL (0x42051e0d)), + BIL_PAIR (BIL_VAL (0x816a6e36), BIL_VAL (0xb6819682)), + BIL_PAIR (BIL_VAL (0x599f657d), BIL_VAL (0xc22e435e)), + BIL_PAIR (BIL_VAL (0x251d8be5), BIL_VAL (0x8e3ab5b6)), + BIL_PAIR (BIL_VAL (0xd63e3cf0), BIL_VAL (0x654f6df8)), + BIL_PAIR (BIL_VAL (0x72eee183), BIL_VAL (0xeb14fec0)), + BIL_PAIR (BIL_VAL (0xb53c65a4), BIL_VAL (0x9875999e)), + BIL_PAIR (BIL_VAL (0x965d81a8), BIL_VAL (0xca32cea9)), + BIL_PAIR (BIL_VAL (0xfa3b5ac5), BIL_VAL (0xbca7743a)), + BIL_PAIR (BIL_VAL (0x2d69db2b), BIL_VAL (0x2c27a900))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf9920410), BIL_VAL (0x7c9312a2)), + BIL_PAIR (BIL_VAL (0xee4b6b02), BIL_VAL (0x6b5f999a)), + BIL_PAIR (BIL_VAL (0x77d26ff1), BIL_VAL (0xb7bed96d)), + BIL_PAIR (BIL_VAL (0x29aa58aa), BIL_VAL (0xc47cf9ed)), + BIL_PAIR (BIL_VAL (0x7e324c4b), BIL_VAL (0x41bc7aaa)), + BIL_PAIR (BIL_VAL (0xd934ee1a), BIL_VAL (0xbc41c255)), + BIL_PAIR (BIL_VAL (0x2ed7093b), BIL_VAL (0xf3ba0de1)), + BIL_PAIR (BIL_VAL (0xeca83ce4), BIL_VAL (0xb18bfc3b)), + BIL_PAIR (BIL_VAL (0xb6edeb73), BIL_VAL (0xddf99bf5)), + BIL_PAIR (BIL_VAL (0x659e6c34), BIL_VAL (0x6eb076d4)), + BIL_PAIR (BIL_VAL (0x93a66b2f), BIL_VAL (0x51763512)), + BIL_PAIR (BIL_VAL (0xcd629969), BIL_VAL (0xd1041ba2)), + BIL_PAIR (BIL_VAL (0x3c14aec7), BIL_VAL (0xcb008209)), + BIL_PAIR (BIL_VAL (0x954042ff), BIL_VAL (0xae3a2996)), + BIL_PAIR (BIL_VAL (0x8ded17df), BIL_VAL (0x71886c01)) + /* And implicit 1280 0 bits. */)), + /* 1536 */ + BIL_SET4 (BIL_SET11 (BIL_PAIR (BIL_VAL (0x595c), BIL_VAL (0x1a9d9cc9)), + BIL_PAIR (BIL_VAL (0xd3f2212b), BIL_VAL (0xd61da60e)), + BIL_PAIR (BIL_VAL (0xbbca3b82), BIL_VAL (0x5e8ddad2)), + BIL_PAIR (BIL_VAL (0xc01785d6), BIL_VAL (0xda8272b9)), + BIL_PAIR (BIL_VAL (0x465a2786), BIL_VAL (0x5adc10ed)), + BIL_PAIR (BIL_VAL (0x6bc748ca), BIL_VAL (0xfafccbd2)), + BIL_PAIR (BIL_VAL (0x1d2c6a5a), BIL_VAL (0xa16609a8)), + BIL_PAIR (BIL_VAL (0x21555039), BIL_VAL (0xbce02c3d)), + BIL_PAIR (BIL_VAL (0x660eedff), BIL_VAL (0x45c9c9c4)), + BIL_PAIR (BIL_VAL (0x331400ab), BIL_VAL (0xcab57dcc)), + BIL_PAIR (BIL_VAL (0x4b089367), BIL_VAL (0x523d5057))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x4ff1285a), BIL_VAL (0x2f67aff0)), + BIL_PAIR (BIL_VAL (0xd4195511), BIL_VAL (0x59b823bb)), + BIL_PAIR (BIL_VAL (0x19d73342), BIL_VAL (0x1bf420c7)), + BIL_PAIR (BIL_VAL (0xf6b23243), BIL_VAL (0x8443b49d)), + BIL_PAIR (BIL_VAL (0x71c5be22), BIL_VAL (0x50d79fbb)), + BIL_PAIR (BIL_VAL (0xdb51ff85), BIL_VAL (0xdaa93dbb)), + BIL_PAIR (BIL_VAL (0x034016f5), BIL_VAL (0xf8923717)), + BIL_PAIR (BIL_VAL (0xf1326909), BIL_VAL (0x8529e182)), + BIL_PAIR (BIL_VAL (0xf7f9a141), BIL_VAL (0x63123520)), + BIL_PAIR (BIL_VAL (0xec51ca9a), BIL_VAL (0x4261532c)), + BIL_PAIR (BIL_VAL (0xe6fd4da4), BIL_VAL (0x781cb057)), + BIL_PAIR (BIL_VAL (0x4a77c2f7), BIL_VAL (0xb5fe8bbe)), + BIL_PAIR (BIL_VAL (0xbe6ed841), BIL_VAL (0x6cb40380)), + BIL_PAIR (BIL_VAL (0xc178d552), BIL_VAL (0xd88ac34a)), + BIL_PAIR (BIL_VAL (0x23130207), BIL_VAL (0xb0d2deff))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2f5c7bc8), BIL_VAL (0xb26d13e5)), + BIL_PAIR (BIL_VAL (0x658be27c), BIL_VAL (0xe4d851fc)), + BIL_PAIR (BIL_VAL (0x37b3020f), BIL_VAL (0xf82954ec)), + BIL_PAIR (BIL_VAL (0xa20352b7), BIL_VAL (0x55ccc3ad)), + BIL_PAIR (BIL_VAL (0xd931feaa), BIL_VAL (0x0759d813)), + BIL_PAIR (BIL_VAL (0xe3ced57f), BIL_VAL (0x0275cd92)), + BIL_PAIR (BIL_VAL (0x84d08c94), BIL_VAL (0x26b4841c)), + BIL_PAIR (BIL_VAL (0x5347cf73), BIL_VAL (0xadbc560e)), + BIL_PAIR (BIL_VAL (0x1f850ea2), BIL_VAL (0xb01ea870)), + BIL_PAIR (BIL_VAL (0xa87cc14e), BIL_VAL (0xd98ef8c5)), + BIL_PAIR (BIL_VAL (0x0bf83be8), BIL_VAL (0x58aed8ce)), + BIL_PAIR (BIL_VAL (0x9a25e7f4), BIL_VAL (0xcfa2c80c)), + BIL_PAIR (BIL_VAL (0xe555a98e), BIL_VAL (0x41167a97)), + BIL_PAIR (BIL_VAL (0x2cf7521b), BIL_VAL (0x6c58353f)), + BIL_PAIR (BIL_VAL (0x5b28e888), BIL_VAL (0xf9f22db2))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe25776c4), BIL_VAL (0x1881c757)), + BIL_PAIR (BIL_VAL (0x7adf29d7), BIL_VAL (0xa759c1b1)), + BIL_PAIR (BIL_VAL (0x94e3bc1d), BIL_VAL (0x830a1c52)), + BIL_PAIR (BIL_VAL (0x8c50a295), BIL_VAL (0x8814f90e)), + BIL_PAIR (BIL_VAL (0x6f253848), BIL_VAL (0x5c011a38)), + BIL_PAIR (BIL_VAL (0x2bbc1158), BIL_VAL (0x5763837f)), + BIL_PAIR (BIL_VAL (0x7c9db37b), BIL_VAL (0x2b16dfcd)), + BIL_PAIR (BIL_VAL (0x639deb34), BIL_VAL (0x48beb84e)), + BIL_PAIR (BIL_VAL (0xb887f267), BIL_VAL (0x8254b63d)), + BIL_PAIR (BIL_VAL (0x6b9db411), BIL_VAL (0xaf5660cf)), + BIL_PAIR (BIL_VAL (0x4cf14e53), BIL_VAL (0xcd80e78d)), + BIL_PAIR (BIL_VAL (0x4c4bb9d9), BIL_VAL (0xa07c5774)), + BIL_PAIR (BIL_VAL (0xbba2f36f), BIL_VAL (0x938148c5)), + BIL_PAIR (BIL_VAL (0x4094f657), BIL_VAL (0x64ab3974)), + BIL_PAIR (BIL_VAL (0x6a52a4dc), BIL_VAL (0x8606e801)) + /* And implicit 1536 0 bits. */)), + /* 1792 */ + BIL_SET5 (BIL_SET6 (BIL_VAL (0x1), + BIL_PAIR (BIL_VAL (0xdc1bbb09), BIL_VAL (0x24957118)), + BIL_PAIR (BIL_VAL (0x5a80e1e6), BIL_VAL (0x764356f7)), + BIL_PAIR (BIL_VAL (0x840af1f4), BIL_VAL (0x70a29117)), + BIL_PAIR (BIL_VAL (0x7e69fef2), BIL_VAL (0xc60519b3)), + BIL_PAIR (BIL_VAL (0x41e2e9c6), BIL_VAL (0x4f243a06))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x77291135), BIL_VAL (0xf0896552)), + BIL_PAIR (BIL_VAL (0x0681fded), BIL_VAL (0x9b535585)), + BIL_PAIR (BIL_VAL (0xfc7f722c), BIL_VAL (0xca5c1d4e)), + BIL_PAIR (BIL_VAL (0xc2f32e86), BIL_VAL (0x2421497a)), + BIL_PAIR (BIL_VAL (0x9f8a5a96), BIL_VAL (0xb699c6e3)), + BIL_PAIR (BIL_VAL (0xa69870dd), BIL_VAL (0xacf128fb)), + BIL_PAIR (BIL_VAL (0x13a7d8a4), BIL_VAL (0x15f7b3cb)), + BIL_PAIR (BIL_VAL (0xcaab90fd), BIL_VAL (0x799ae3ea)), + BIL_PAIR (BIL_VAL (0x966e83ee), BIL_VAL (0xde72a194)), + BIL_PAIR (BIL_VAL (0xa590a43e), BIL_VAL (0x3dd3ea15)), + BIL_PAIR (BIL_VAL (0x77d5b4c5), BIL_VAL (0x4740a6da)), + BIL_PAIR (BIL_VAL (0x06af50c7), BIL_VAL (0x8d39bb66)), + BIL_PAIR (BIL_VAL (0x882a24cb), BIL_VAL (0xb77504aa)), + BIL_PAIR (BIL_VAL (0xcd53a736), BIL_VAL (0x4dd80d9e)), + BIL_PAIR (BIL_VAL (0x9800bd51), BIL_VAL (0x5abae213))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xba04b294), BIL_VAL (0x54f225eb)), + BIL_PAIR (BIL_VAL (0xdedb5441), BIL_VAL (0x890e8e9c)), + BIL_PAIR (BIL_VAL (0x887d03eb), BIL_VAL (0x04af9d30)), + BIL_PAIR (BIL_VAL (0x393a13ab), BIL_VAL (0xc9d6c043)), + BIL_PAIR (BIL_VAL (0xf14385f0), BIL_VAL (0x98507ef1)), + BIL_PAIR (BIL_VAL (0x3e7db987), BIL_VAL (0xcc59b9d7)), + BIL_PAIR (BIL_VAL (0x2076657b), BIL_VAL (0x41e617ad)), + BIL_PAIR (BIL_VAL (0x8886d66d), BIL_VAL (0x6d0cccc9)), + BIL_PAIR (BIL_VAL (0xbb99d446), BIL_VAL (0xdc4f3d43)), + BIL_PAIR (BIL_VAL (0x507a6039), BIL_VAL (0xbde76912)), + BIL_PAIR (BIL_VAL (0xc81f2d12), BIL_VAL (0xafe967d0)), + BIL_PAIR (BIL_VAL (0x5741f945), BIL_VAL (0x47392392)), + BIL_PAIR (BIL_VAL (0x48b686e8), BIL_VAL (0xec840f90)), + BIL_PAIR (BIL_VAL (0xc484b647), BIL_VAL (0x65bcc8b0)), + BIL_PAIR (BIL_VAL (0xefe49809), BIL_VAL (0x50480fcb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x8a91e2f6), BIL_VAL (0xb3aabd03)), + BIL_PAIR (BIL_VAL (0x5e7b98a8), BIL_VAL (0x4a39f2cd)), + BIL_PAIR (BIL_VAL (0xa7cf610f), BIL_VAL (0x1a860260)), + BIL_PAIR (BIL_VAL (0x645b7335), BIL_VAL (0xf07624f3)), + BIL_PAIR (BIL_VAL (0xa7f0074c), BIL_VAL (0xf8654078)), + BIL_PAIR (BIL_VAL (0xfed255ef), BIL_VAL (0x4b05d940)), + BIL_PAIR (BIL_VAL (0xf96239d8), BIL_VAL (0x6e65540f)), + BIL_PAIR (BIL_VAL (0x9c3687c7), BIL_VAL (0xc400ae50)), + BIL_PAIR (BIL_VAL (0x3b2966b1), BIL_VAL (0x2beeef97)), + BIL_PAIR (BIL_VAL (0x432c1bcf), BIL_VAL (0x0fff4f16)), + BIL_PAIR (BIL_VAL (0x6c8e53b4), BIL_VAL (0x4f44dd2b)), + BIL_PAIR (BIL_VAL (0xdc23ee61), BIL_VAL (0xdcd06a8b)), + BIL_PAIR (BIL_VAL (0xeaaa6c26), BIL_VAL (0xf2cb5ad8)), + BIL_PAIR (BIL_VAL (0x7a2cbe56), BIL_VAL (0x66c5622b)), + BIL_PAIR (BIL_VAL (0x1d080031), BIL_VAL (0x69703559))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd9079398), BIL_VAL (0x52e8b4ea)), + BIL_PAIR (BIL_VAL (0x260a6a2a), BIL_VAL (0x705fe634)), + BIL_PAIR (BIL_VAL (0x78d28936), BIL_VAL (0x1d79ed44)), + BIL_PAIR (BIL_VAL (0xe5201baf), BIL_VAL (0xd9771c73)), + BIL_PAIR (BIL_VAL (0x3a9f308d), BIL_VAL (0xf96573a8)), + BIL_PAIR (BIL_VAL (0xa4508e52), BIL_VAL (0x5a041b4d)), + BIL_PAIR (BIL_VAL (0xf4af167d), BIL_VAL (0x173fb3a9)), + BIL_PAIR (BIL_VAL (0xde656fab), BIL_VAL (0x826ee460)), + BIL_PAIR (BIL_VAL (0xd116c951), BIL_VAL (0xa4926c87)), + BIL_PAIR (BIL_VAL (0x1f6cb347), BIL_VAL (0xae03bff9)), + BIL_PAIR (BIL_VAL (0xd07c3b80), BIL_VAL (0xe2880b83)), + BIL_PAIR (BIL_VAL (0x0db842d7), BIL_VAL (0x37180f76)), + BIL_PAIR (BIL_VAL (0x90f06449), BIL_VAL (0x9b8afd96)), + BIL_PAIR (BIL_VAL (0xeeef2d7d), BIL_VAL (0x2e1d3616)), + BIL_PAIR (BIL_VAL (0x4101a421), BIL_VAL (0x26956401)) + /* And implicit 1792 0 bits. */)), + /* 2048 */ + BIL_SET5 (BIL_SET15 (BIL_VAL (0x9e8b3), + BIL_PAIR (BIL_VAL (0xb5dc53d5), BIL_VAL (0xde4a74d2)), + BIL_PAIR (BIL_VAL (0x8ce329ac), BIL_VAL (0xe526a319)), + BIL_PAIR (BIL_VAL (0x7bbebe30), BIL_VAL (0x34f77154)), + BIL_PAIR (BIL_VAL (0xce2bcba1), BIL_VAL (0x9648b21c)), + BIL_PAIR (BIL_VAL (0x11eb962b), BIL_VAL (0x1b61b93c)), + BIL_PAIR (BIL_VAL (0xf2ee5ca6), BIL_VAL (0xf7e928e6)), + BIL_PAIR (BIL_VAL (0x1d08e2d6), BIL_VAL (0x94222771)), + BIL_PAIR (BIL_VAL (0xe50f3027), BIL_VAL (0x8c983623)), + BIL_PAIR (BIL_VAL (0x0af908b4), BIL_VAL (0x0a753b7d)), + BIL_PAIR (BIL_VAL (0x77cd8c6b), BIL_VAL (0xe7151aab)), + BIL_PAIR (BIL_VAL (0x4efac5dc), BIL_VAL (0xd83e49d6)), + BIL_PAIR (BIL_VAL (0x907855ee), BIL_VAL (0xb028af62)), + BIL_PAIR (BIL_VAL (0x3f6f7024), BIL_VAL (0xd2c36fa9)), + BIL_PAIR (BIL_VAL (0xce9d04a4), BIL_VAL (0x87fa1fb9))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x92be221e), BIL_VAL (0xf1bd0ad5)), + BIL_PAIR (BIL_VAL (0xf775677c), BIL_VAL (0xe0de0840)), + BIL_PAIR (BIL_VAL (0x2ad3fa14), BIL_VAL (0x0eac7d56)), + BIL_PAIR (BIL_VAL (0xc7c9dee0), BIL_VAL (0xbedd8a6c)), + BIL_PAIR (BIL_VAL (0x038f9245), BIL_VAL (0xb2e87c34)), + BIL_PAIR (BIL_VAL (0x8ad803ec), BIL_VAL (0xca8f0070)), + BIL_PAIR (BIL_VAL (0xf8dbb57a), BIL_VAL (0x6a445f27)), + BIL_PAIR (BIL_VAL (0x8b3d5cf4), BIL_VAL (0x2915e818)), + BIL_PAIR (BIL_VAL (0x415c7f3e), BIL_VAL (0xf82df846)), + BIL_PAIR (BIL_VAL (0x58ccf45c), BIL_VAL (0xfad37943)), + BIL_PAIR (BIL_VAL (0x3f3389a4), BIL_VAL (0x408f43c5)), + BIL_PAIR (BIL_VAL (0x13ef5a83), BIL_VAL (0xfb8886fb)), + BIL_PAIR (BIL_VAL (0xf56d9d4b), BIL_VAL (0xd5f86079)), + BIL_PAIR (BIL_VAL (0x2e55ecee), BIL_VAL (0x70beb181)), + BIL_PAIR (BIL_VAL (0x0d76ce39), BIL_VAL (0xde9ec24b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xcf99d019), BIL_VAL (0x53761abd)), + BIL_PAIR (BIL_VAL (0x9d7389c0), BIL_VAL (0xa244de3c)), + BIL_PAIR (BIL_VAL (0x195355d8), BIL_VAL (0x4eeebeee)), + BIL_PAIR (BIL_VAL (0x6f46eadb), BIL_VAL (0x56c6815b)), + BIL_PAIR (BIL_VAL (0x785ce6b7), BIL_VAL (0xb125ac8e)), + BIL_PAIR (BIL_VAL (0xdb0708fd), BIL_VAL (0x8f6cae5f)), + BIL_PAIR (BIL_VAL (0x5715f791), BIL_VAL (0x5b33eb41)), + BIL_PAIR (BIL_VAL (0x7bf03c19), BIL_VAL (0xd7917c7b)), + BIL_PAIR (BIL_VAL (0xa1fc6b96), BIL_VAL (0x81428c85)), + BIL_PAIR (BIL_VAL (0x744695f0), BIL_VAL (0xe866d7ef)), + BIL_PAIR (BIL_VAL (0xc9ac375d), BIL_VAL (0x77c1a42f)), + BIL_PAIR (BIL_VAL (0x40660460), BIL_VAL (0x944545ff)), + BIL_PAIR (BIL_VAL (0x87a7dc62), BIL_VAL (0xd752f7a6)), + BIL_PAIR (BIL_VAL (0x6a57b1ab), BIL_VAL (0x730f203c)), + BIL_PAIR (BIL_VAL (0x1aa9f444), BIL_VAL (0x84d80e2e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x5fc5a047), BIL_VAL (0x79c56b8a)), + BIL_PAIR (BIL_VAL (0x9e110c7b), BIL_VAL (0xcbea4ca7)), + BIL_PAIR (BIL_VAL (0x982da466), BIL_VAL (0x3cfe491d)), + BIL_PAIR (BIL_VAL (0x0dbd21fe), BIL_VAL (0xab498697)), + BIL_PAIR (BIL_VAL (0x33554c36), BIL_VAL (0x685e5510)), + BIL_PAIR (BIL_VAL (0xc4a65665), BIL_VAL (0x4419bd43)), + BIL_PAIR (BIL_VAL (0x8e48ff35), BIL_VAL (0xd6c7d6ab)), + BIL_PAIR (BIL_VAL (0x91bac974), BIL_VAL (0xfb1264b4)), + BIL_PAIR (BIL_VAL (0xf111821f), BIL_VAL (0xa2bca416)), + BIL_PAIR (BIL_VAL (0xafe609c3), BIL_VAL (0x13b41e44)), + BIL_PAIR (BIL_VAL (0x9952fbed), BIL_VAL (0x5a151440)), + BIL_PAIR (BIL_VAL (0x967abbb3), BIL_VAL (0xa8281ed6)), + BIL_PAIR (BIL_VAL (0xa8f16f92), BIL_VAL (0x10c17f94)), + BIL_PAIR (BIL_VAL (0xe3892ee9), BIL_VAL (0x8074ff01)), + BIL_PAIR (BIL_VAL (0xe3cb64f3), BIL_VAL (0x2dbb6643))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xa7a8289c), BIL_VAL (0x8c6c54de)), + BIL_PAIR (BIL_VAL (0x34c10134), BIL_VAL (0x9713b449)), + BIL_PAIR (BIL_VAL (0x38209ce1), BIL_VAL (0xf3861ce0)), + BIL_PAIR (BIL_VAL (0xfb7fedcc), BIL_VAL (0x235552eb)), + BIL_PAIR (BIL_VAL (0x57a7842d), BIL_VAL (0x71c7fd8f)), + BIL_PAIR (BIL_VAL (0x66912e4a), BIL_VAL (0xd2f869c2)), + BIL_PAIR (BIL_VAL (0x92794987), BIL_VAL (0x19342c12)), + BIL_PAIR (BIL_VAL (0x866ed6f1), BIL_VAL (0xc850dabc)), + BIL_PAIR (BIL_VAL (0x98342c9e), BIL_VAL (0x51b78db2)), + BIL_PAIR (BIL_VAL (0xea50d142), BIL_VAL (0xfd827773)), + BIL_PAIR (BIL_VAL (0x2ed56d55), BIL_VAL (0xa5e5a191)), + BIL_PAIR (BIL_VAL (0x368b8abb), BIL_VAL (0xb6067584)), + BIL_PAIR (BIL_VAL (0xee87e354), BIL_VAL (0xec2e4721)), + BIL_PAIR (BIL_VAL (0x49e28dcf), BIL_VAL (0xb27d4d3f)), + BIL_PAIR (BIL_VAL (0xe3096865), BIL_VAL (0x1333e001)) + /* And implicit 2048 0 bits. */)), + /* 2304 */ + BIL_SET6 (BIL_SET9 (BIL_PAIR (BIL_VAL (0x34), BIL_VAL (0xcb880c90)), + BIL_PAIR (BIL_VAL (0x7d201bcf), BIL_VAL (0xd4320081)), + BIL_PAIR (BIL_VAL (0x03d33300), BIL_VAL (0xeea8bce3)), + BIL_PAIR (BIL_VAL (0x8d5193f9), BIL_VAL (0xc07def23)), + BIL_PAIR (BIL_VAL (0x4680e0c6), BIL_VAL (0xffb7ce9c)), + BIL_PAIR (BIL_VAL (0xb1bf30a5), BIL_VAL (0xc73dfef3)), + BIL_PAIR (BIL_VAL (0xbcb0518f), BIL_VAL (0x42e286b0)), + BIL_PAIR (BIL_VAL (0x196c42d0), BIL_VAL (0x0f46fe9a)), + BIL_PAIR (BIL_VAL (0x7511fe3a), BIL_VAL (0x1e7a832c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9d81f57a), BIL_VAL (0x0a906d25)), + BIL_PAIR (BIL_VAL (0xe52bf109), BIL_VAL (0x72eabf2d)), + BIL_PAIR (BIL_VAL (0xfb95cf56), BIL_VAL (0x0355657a)), + BIL_PAIR (BIL_VAL (0x8b6cc09b), BIL_VAL (0x2a3ac9be)), + BIL_PAIR (BIL_VAL (0x4ab4b7c8), BIL_VAL (0x651b3553)), + BIL_PAIR (BIL_VAL (0xe11d6e90), BIL_VAL (0x20fab5f6)), + BIL_PAIR (BIL_VAL (0x95e17161), BIL_VAL (0x641e3900)), + BIL_PAIR (BIL_VAL (0xf11e1869), BIL_VAL (0x9b291853)), + BIL_PAIR (BIL_VAL (0xfe620e37), BIL_VAL (0xe3f47190)), + BIL_PAIR (BIL_VAL (0xd65b3246), BIL_VAL (0x88fa6386)), + BIL_PAIR (BIL_VAL (0x284f1227), BIL_VAL (0x104dc99a)), + BIL_PAIR (BIL_VAL (0x7df567b5), BIL_VAL (0x976aeef5)), + BIL_PAIR (BIL_VAL (0xcd089594), BIL_VAL (0xb00846b1)), + BIL_PAIR (BIL_VAL (0xa9629db1), BIL_VAL (0xd2a55f01)), + BIL_PAIR (BIL_VAL (0x6cbf7fc8), BIL_VAL (0xc06f489a))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x56ea406c), BIL_VAL (0x53ec72c5)), + BIL_PAIR (BIL_VAL (0x926864ed), BIL_VAL (0x10d73eaa)), + BIL_PAIR (BIL_VAL (0x51928250), BIL_VAL (0x1857fd85)), + BIL_PAIR (BIL_VAL (0x27c0a81e), BIL_VAL (0xa1cba808)), + BIL_PAIR (BIL_VAL (0x193b9bbf), BIL_VAL (0x5dbc75f3)), + BIL_PAIR (BIL_VAL (0x060b28bb), BIL_VAL (0x7d0fd457)), + BIL_PAIR (BIL_VAL (0xc0425477), BIL_VAL (0x761a721d)), + BIL_PAIR (BIL_VAL (0x935076fb), BIL_VAL (0x3c9db62d)), + BIL_PAIR (BIL_VAL (0xea214b51), BIL_VAL (0x836a999c)), + BIL_PAIR (BIL_VAL (0xe06b37f1), BIL_VAL (0xc521f1e9)), + BIL_PAIR (BIL_VAL (0x93e93786), BIL_VAL (0x6d73ef51)), + BIL_PAIR (BIL_VAL (0xacdfb22e), BIL_VAL (0x9a927af6)), + BIL_PAIR (BIL_VAL (0x72b0f83f), BIL_VAL (0x6966eadd)), + BIL_PAIR (BIL_VAL (0x43ba932e), BIL_VAL (0x61fef6de)), + BIL_PAIR (BIL_VAL (0xdfcb8ce6), BIL_VAL (0xc518c82b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xdcdefba6), BIL_VAL (0xba97bf9c)), + BIL_PAIR (BIL_VAL (0xe43b0263), BIL_VAL (0x83837162)), + BIL_PAIR (BIL_VAL (0xebe9ce8a), BIL_VAL (0x22c02a53)), + BIL_PAIR (BIL_VAL (0x2c8bcee5), BIL_VAL (0x50c43d01)), + BIL_PAIR (BIL_VAL (0x53214d25), BIL_VAL (0xffbefa1a)), + BIL_PAIR (BIL_VAL (0x895aae1e), BIL_VAL (0xadb76207)), + BIL_PAIR (BIL_VAL (0xfc64aac9), BIL_VAL (0xb4e1e81c)), + BIL_PAIR (BIL_VAL (0x5ea03038), BIL_VAL (0x81170563)), + BIL_PAIR (BIL_VAL (0xeab79988), BIL_VAL (0x05f0da63)), + BIL_PAIR (BIL_VAL (0x7d614f38), BIL_VAL (0x83bc098c)), + BIL_PAIR (BIL_VAL (0x52063782), BIL_VAL (0x61264494)), + BIL_PAIR (BIL_VAL (0x0afc7236), BIL_VAL (0x88e9d2c8)), + BIL_PAIR (BIL_VAL (0x32174a13), BIL_VAL (0x00da1e96)), + BIL_PAIR (BIL_VAL (0xd4ccb5f2), BIL_VAL (0x97194a26)), + BIL_PAIR (BIL_VAL (0x65766540), BIL_VAL (0xfe45700d))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x97315cd9), BIL_VAL (0xd8dfa795)), + BIL_PAIR (BIL_VAL (0x84514014), BIL_VAL (0x4163e663)), + BIL_PAIR (BIL_VAL (0x50412afc), BIL_VAL (0x0e0fb34f)), + BIL_PAIR (BIL_VAL (0x93faf6ec), BIL_VAL (0x899eaf24)), + BIL_PAIR (BIL_VAL (0x48c18d6e), BIL_VAL (0x38455e4b)), + BIL_PAIR (BIL_VAL (0xf43fb722), BIL_VAL (0x7383fd8c)), + BIL_PAIR (BIL_VAL (0x136432b1), BIL_VAL (0x67a6164b)), + BIL_PAIR (BIL_VAL (0x69484be1), BIL_VAL (0xe7460fbe)), + BIL_PAIR (BIL_VAL (0x66f7ae23), BIL_VAL (0xe3d7f4e6)), + BIL_PAIR (BIL_VAL (0xe52dd8e1), BIL_VAL (0x44935bda)), + BIL_PAIR (BIL_VAL (0xbeabb2e1), BIL_VAL (0xe6dbe8f4)), + BIL_PAIR (BIL_VAL (0x10c605e2), BIL_VAL (0xb07d70a6)), + BIL_PAIR (BIL_VAL (0x0954b160), BIL_VAL (0xc0a9bae8)), + BIL_PAIR (BIL_VAL (0x0718077a), BIL_VAL (0x2e1c5d82)), + BIL_PAIR (BIL_VAL (0xecd6dcef), BIL_VAL (0x70d0afd0))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x77366ed3), BIL_VAL (0x7e65e399)), + BIL_PAIR (BIL_VAL (0xec024bed), BIL_VAL (0xa51c7308)), + BIL_PAIR (BIL_VAL (0x9463c691), BIL_VAL (0xbc6e47c5)), + BIL_PAIR (BIL_VAL (0x63eaf238), BIL_VAL (0xd41f02cf)), + BIL_PAIR (BIL_VAL (0x92bd2286), BIL_VAL (0x08fbc01f)), + BIL_PAIR (BIL_VAL (0x25071f78), BIL_VAL (0x300b8383)), + BIL_PAIR (BIL_VAL (0xb278290a), BIL_VAL (0xfccbb4a9)), + BIL_PAIR (BIL_VAL (0x5978c187), BIL_VAL (0xc8090e6e)), + BIL_PAIR (BIL_VAL (0x1b82af61), BIL_VAL (0x24f8ddff)), + BIL_PAIR (BIL_VAL (0x12d6ac40), BIL_VAL (0x66910f8e)), + BIL_PAIR (BIL_VAL (0x7f3fb5d2), BIL_VAL (0xb3b84d5a)), + BIL_PAIR (BIL_VAL (0xcf65d529), BIL_VAL (0x1b109858)), + BIL_PAIR (BIL_VAL (0x4e44d682), BIL_VAL (0x34b71b84)), + BIL_PAIR (BIL_VAL (0x40c882c2), BIL_VAL (0x6c38bd67)), + BIL_PAIR (BIL_VAL (0xc48ec560), BIL_VAL (0x0be25c01)) + /* And implicit 2304 0 bits. */)), + /* 2560 */ + BIL_SET7 (BIL_SET3 (BIL_PAIR (BIL_VAL (0x1194aa9), BIL_VAL (0x804143e1)), + BIL_PAIR (BIL_VAL (0x4cbbfda1), BIL_VAL (0x3244d014)), + BIL_PAIR (BIL_VAL (0x0d5df073), BIL_VAL (0x514fed42))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9824da71), BIL_VAL (0x0c4b2c1a)), + BIL_PAIR (BIL_VAL (0xa0747805), BIL_VAL (0x2eebe177)), + BIL_PAIR (BIL_VAL (0x8f97026c), BIL_VAL (0xc079502b)), + BIL_PAIR (BIL_VAL (0xc21c83ce), BIL_VAL (0x6efba8c2)), + BIL_PAIR (BIL_VAL (0xcd14ab73), BIL_VAL (0x39f02dd6)), + BIL_PAIR (BIL_VAL (0xf9bb529b), BIL_VAL (0xe53dbde4)), + BIL_PAIR (BIL_VAL (0x478dbba0), BIL_VAL (0x6622410f)), + BIL_PAIR (BIL_VAL (0x49e9fe94), BIL_VAL (0x8017b8a1)), + BIL_PAIR (BIL_VAL (0xdb198464), BIL_VAL (0xba9c248c)), + BIL_PAIR (BIL_VAL (0x3561bd27), BIL_VAL (0xb4b00664)), + BIL_PAIR (BIL_VAL (0xd2f864a6), BIL_VAL (0x9d48140d)), + BIL_PAIR (BIL_VAL (0xd64f679d), BIL_VAL (0x5350f943)), + BIL_PAIR (BIL_VAL (0xdbdb6eb7), BIL_VAL (0x0788a27a)), + BIL_PAIR (BIL_VAL (0x3cd45fea), BIL_VAL (0xb809ce3c)), + BIL_PAIR (BIL_VAL (0x7d548eac), BIL_VAL (0x013857ab))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x445c1e34), BIL_VAL (0xdb0481fd)), + BIL_PAIR (BIL_VAL (0x6c66f379), BIL_VAL (0xd9274811)), + BIL_PAIR (BIL_VAL (0x8e626c67), BIL_VAL (0x57fdc73a)), + BIL_PAIR (BIL_VAL (0xc220efb9), BIL_VAL (0xa62d0c22)), + BIL_PAIR (BIL_VAL (0xe83c46e5), BIL_VAL (0x1091c0a2)), + BIL_PAIR (BIL_VAL (0x86b93ed5), BIL_VAL (0x552a599a)), + BIL_PAIR (BIL_VAL (0xef3ddb40), BIL_VAL (0xc7245537)), + BIL_PAIR (BIL_VAL (0x9d1639c1), BIL_VAL (0x6b25c2b7)), + BIL_PAIR (BIL_VAL (0xeb342eed), BIL_VAL (0x1b0071c9)), + BIL_PAIR (BIL_VAL (0x855cc822), BIL_VAL (0xfef1ae46)), + BIL_PAIR (BIL_VAL (0xd50dccce), BIL_VAL (0x57eb588d)), + BIL_PAIR (BIL_VAL (0xd5f5a822), BIL_VAL (0xb21e0c8f)), + BIL_PAIR (BIL_VAL (0xaf8f57ef), BIL_VAL (0xa8feb1b5)), + BIL_PAIR (BIL_VAL (0xc96f9043), BIL_VAL (0x3433c4f3)), + BIL_PAIR (BIL_VAL (0x53c3bc12), BIL_VAL (0x207ba5a5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xadd6c8e9), BIL_VAL (0xfb2d3c87)), + BIL_PAIR (BIL_VAL (0xe0be7f40), BIL_VAL (0x74871b0f)), + BIL_PAIR (BIL_VAL (0xd0c177ed), BIL_VAL (0x5812e317)), + BIL_PAIR (BIL_VAL (0xed5eea60), BIL_VAL (0x2ef39839)), + BIL_PAIR (BIL_VAL (0xa09dc0ad), BIL_VAL (0xd9ef6b42)), + BIL_PAIR (BIL_VAL (0x716dfce6), BIL_VAL (0xe40bc1d9)), + BIL_PAIR (BIL_VAL (0x965b4a2a), BIL_VAL (0xfe7c13b6)), + BIL_PAIR (BIL_VAL (0x4e07ac17), BIL_VAL (0x3eb2c323)), + BIL_PAIR (BIL_VAL (0x814f27e2), BIL_VAL (0xb850e477)), + BIL_PAIR (BIL_VAL (0x5f0329c4), BIL_VAL (0x8494e2b6)), + BIL_PAIR (BIL_VAL (0xd78d3921), BIL_VAL (0xdf842580)), + BIL_PAIR (BIL_VAL (0xee91638d), BIL_VAL (0x7bd756f4)), + BIL_PAIR (BIL_VAL (0xca800d31), BIL_VAL (0x360af188)), + BIL_PAIR (BIL_VAL (0xcfbe9b6e), BIL_VAL (0xfb256a72)), + BIL_PAIR (BIL_VAL (0x5449eaa6), BIL_VAL (0xccdb51ad))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9eac6efb), BIL_VAL (0x0b18b34f)), + BIL_PAIR (BIL_VAL (0xa8d7f2fe), BIL_VAL (0x1efdaa39)), + BIL_PAIR (BIL_VAL (0x74c1eb49), BIL_VAL (0xf842ceab)), + BIL_PAIR (BIL_VAL (0x7e75e95c), BIL_VAL (0xc639b5fb)), + BIL_PAIR (BIL_VAL (0xa0d9d371), BIL_VAL (0x59695126)), + BIL_PAIR (BIL_VAL (0x2ee7bd62), BIL_VAL (0xf615c3e7)), + BIL_PAIR (BIL_VAL (0x1b14640e), BIL_VAL (0x3a120eec)), + BIL_PAIR (BIL_VAL (0x671e8068), BIL_VAL (0x44de867a)), + BIL_PAIR (BIL_VAL (0x056f25ef), BIL_VAL (0xb6c8d686)), + BIL_PAIR (BIL_VAL (0xdee0e58c), BIL_VAL (0x0916def7)), + BIL_PAIR (BIL_VAL (0x83d0391c), BIL_VAL (0x21a328b9)), + BIL_PAIR (BIL_VAL (0x610451f1), BIL_VAL (0x177a9ad4)), + BIL_PAIR (BIL_VAL (0xf5b156e6), BIL_VAL (0x98797568)), + BIL_PAIR (BIL_VAL (0x5bd56f76), BIL_VAL (0xb3d9c773)), + BIL_PAIR (BIL_VAL (0x6062b4f0), BIL_VAL (0x579321eb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x1c72d201), BIL_VAL (0x486e8b15)), + BIL_PAIR (BIL_VAL (0xeb29c744), BIL_VAL (0xa512a978)), + BIL_PAIR (BIL_VAL (0x78e27f38), BIL_VAL (0xd6e767e7)), + BIL_PAIR (BIL_VAL (0x7428b3e5), BIL_VAL (0xeb0b552c)), + BIL_PAIR (BIL_VAL (0x3814dcf3), BIL_VAL (0x77427e29)), + BIL_PAIR (BIL_VAL (0x6db0cbe7), BIL_VAL (0xe0430821)), + BIL_PAIR (BIL_VAL (0x5112ed63), BIL_VAL (0xadc7aa37)), + BIL_PAIR (BIL_VAL (0xf37888ae), BIL_VAL (0xe8dfdfd8)), + BIL_PAIR (BIL_VAL (0x7bc7b69e), BIL_VAL (0x6a5daf9f)), + BIL_PAIR (BIL_VAL (0xa5946d37), BIL_VAL (0xad9a0cf9)), + BIL_PAIR (BIL_VAL (0x7e3c3eab), BIL_VAL (0x372eeb4c)), + BIL_PAIR (BIL_VAL (0x633abdf2), BIL_VAL (0x3faa18f3)), + BIL_PAIR (BIL_VAL (0xa8b5ae00), BIL_VAL (0x807e3e35)), + BIL_PAIR (BIL_VAL (0x43e69e9d), BIL_VAL (0x45f5bcac)), + BIL_PAIR (BIL_VAL (0xc634f09e), BIL_VAL (0x53b502ed))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x750db8e3), BIL_VAL (0xe4b5028d)), + BIL_PAIR (BIL_VAL (0x96fe55bf), BIL_VAL (0x195d39aa)), + BIL_PAIR (BIL_VAL (0x9eb366a3), BIL_VAL (0x62104aad)), + BIL_PAIR (BIL_VAL (0xe5fac609), BIL_VAL (0x3550f1bd)), + BIL_PAIR (BIL_VAL (0x3d5b5882), BIL_VAL (0x6eb67749)), + BIL_PAIR (BIL_VAL (0x31996732), BIL_VAL (0x56ded7d7)), + BIL_PAIR (BIL_VAL (0xf40cce4b), BIL_VAL (0xdd1b6017)), + BIL_PAIR (BIL_VAL (0x306cd21a), BIL_VAL (0x11526091)), + BIL_PAIR (BIL_VAL (0x54494373), BIL_VAL (0xe3f5d106)), + BIL_PAIR (BIL_VAL (0x977550c9), BIL_VAL (0x716fcc3e)), + BIL_PAIR (BIL_VAL (0xa4a76759), BIL_VAL (0xaef1808f)), + BIL_PAIR (BIL_VAL (0x5024906a), BIL_VAL (0x2e42f235)), + BIL_PAIR (BIL_VAL (0x0a6acb0e), BIL_VAL (0xafb72192)), + BIL_PAIR (BIL_VAL (0xd1b926b8), BIL_VAL (0x63ed4a2a)), + BIL_PAIR (BIL_VAL (0x95480fc9), BIL_VAL (0xd0a0d801)) + /* And implicit 2560 0 bits. */)), + /* 2816 */ + BIL_SET7 (BIL_SET13 (BIL_VAL (0x5da), + BIL_PAIR (BIL_VAL (0xb854d4de), BIL_VAL (0xcbbe6264)), + BIL_PAIR (BIL_VAL (0x043a9dd9), BIL_VAL (0x17f7c37e)), + BIL_PAIR (BIL_VAL (0x2c0166f0), BIL_VAL (0x59939087)), + BIL_PAIR (BIL_VAL (0x4c050e06), BIL_VAL (0x67ec1921)), + BIL_PAIR (BIL_VAL (0x518f4971), BIL_VAL (0xc4b18c3a)), + BIL_PAIR (BIL_VAL (0x4f89346d), BIL_VAL (0x38653182)), + BIL_PAIR (BIL_VAL (0x314c173c), BIL_VAL (0xdfb1e687)), + BIL_PAIR (BIL_VAL (0x80767379), BIL_VAL (0x1ee83794)), + BIL_PAIR (BIL_VAL (0x7dcac2fa), BIL_VAL (0xc979fb9f)), + BIL_PAIR (BIL_VAL (0xce5764bc), BIL_VAL (0x9b8189bc)), + BIL_PAIR (BIL_VAL (0x768bb7bf), BIL_VAL (0xc9db1f22)), + BIL_PAIR (BIL_VAL (0xd8d3ef7f), BIL_VAL (0x794bf244))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9e928b63), BIL_VAL (0x1232548f)), + BIL_PAIR (BIL_VAL (0xe1ae14be), BIL_VAL (0xd59106e2)), + BIL_PAIR (BIL_VAL (0x7f6ef220), BIL_VAL (0xd5472457)), + BIL_PAIR (BIL_VAL (0x4d85f8d4), BIL_VAL (0xd77eb94c)), + BIL_PAIR (BIL_VAL (0x010e3314), BIL_VAL (0x0f2edff4)), + BIL_PAIR (BIL_VAL (0xa00a849d), BIL_VAL (0xeab2f2ef)), + BIL_PAIR (BIL_VAL (0xf0ed3ebe), BIL_VAL (0x53d9ae49)), + BIL_PAIR (BIL_VAL (0xbead7189), BIL_VAL (0xfd40690c)), + BIL_PAIR (BIL_VAL (0x126878c5), BIL_VAL (0xe57813bc)), + BIL_PAIR (BIL_VAL (0x8a81bb33), BIL_VAL (0x31654271)), + BIL_PAIR (BIL_VAL (0xc6bab6c5), BIL_VAL (0x0a9af342)), + BIL_PAIR (BIL_VAL (0x75017575), BIL_VAL (0x1da01d1a)), + BIL_PAIR (BIL_VAL (0xeb13e3ab), BIL_VAL (0x9b5ef740)), + BIL_PAIR (BIL_VAL (0x7d8bb4a8), BIL_VAL (0x36f49f66)), + BIL_PAIR (BIL_VAL (0xe5d4d344), BIL_VAL (0xdfd4e608))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xad807df4), BIL_VAL (0x12fa4067)), + BIL_PAIR (BIL_VAL (0xacf0adf0), BIL_VAL (0x00a3210b)), + BIL_PAIR (BIL_VAL (0xd83970e5), BIL_VAL (0x3a8cba67)), + BIL_PAIR (BIL_VAL (0x3f19d409), BIL_VAL (0xfda8f179)), + BIL_PAIR (BIL_VAL (0x379b0d11), BIL_VAL (0xa4c6dc56)), + BIL_PAIR (BIL_VAL (0xe5417a4d), BIL_VAL (0xf8cf0081)), + BIL_PAIR (BIL_VAL (0x5ad562eb), BIL_VAL (0xbf436366)), + BIL_PAIR (BIL_VAL (0x4f78b44b), BIL_VAL (0xb3a2d324)), + BIL_PAIR (BIL_VAL (0x91ad7f18), BIL_VAL (0x5dbb2905)), + BIL_PAIR (BIL_VAL (0x176b1a02), BIL_VAL (0xfc1e125c)), + BIL_PAIR (BIL_VAL (0xbe970551), BIL_VAL (0xba210b83)), + BIL_PAIR (BIL_VAL (0x43754408), BIL_VAL (0x799499f4)), + BIL_PAIR (BIL_VAL (0x741c41fd), BIL_VAL (0x0c82a712)), + BIL_PAIR (BIL_VAL (0x1f7a5b55), BIL_VAL (0xcf75a9dd)), + BIL_PAIR (BIL_VAL (0xda83ac65), BIL_VAL (0x42715d75))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe015c646), BIL_VAL (0x36b0b522)), + BIL_PAIR (BIL_VAL (0x6b5f1226), BIL_VAL (0x4cbcd72b)), + BIL_PAIR (BIL_VAL (0x7a047fd0), BIL_VAL (0x87c18cfc)), + BIL_PAIR (BIL_VAL (0xca2166fa), BIL_VAL (0x26dec6a3)), + BIL_PAIR (BIL_VAL (0x0e182d63), BIL_VAL (0xab489d72)), + BIL_PAIR (BIL_VAL (0x41ca5ec0), BIL_VAL (0xdd53460a)), + BIL_PAIR (BIL_VAL (0x15df6c4d), BIL_VAL (0x74f25191)), + BIL_PAIR (BIL_VAL (0x767c69fa), BIL_VAL (0x169ea304)), + BIL_PAIR (BIL_VAL (0xff80f859), BIL_VAL (0x4a18418b)), + BIL_PAIR (BIL_VAL (0x3465a393), BIL_VAL (0x3abebe23)), + BIL_PAIR (BIL_VAL (0x317b6aa3), BIL_VAL (0x8aa4523b)), + BIL_PAIR (BIL_VAL (0xd979261c), BIL_VAL (0xc51cae26)), + BIL_PAIR (BIL_VAL (0xb6a2e5f1), BIL_VAL (0xfa3b1e69)), + BIL_PAIR (BIL_VAL (0x2057c3f3), BIL_VAL (0x9d20b280)), + BIL_PAIR (BIL_VAL (0x560c6a44), BIL_VAL (0x374fa32e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6e73e83c), BIL_VAL (0x98b2f696)), + BIL_PAIR (BIL_VAL (0xe322b6d8), BIL_VAL (0xd5e2b4a3)), + BIL_PAIR (BIL_VAL (0xb4be68b3), BIL_VAL (0x4dbbb2fc)), + BIL_PAIR (BIL_VAL (0x9ec62319), BIL_VAL (0x5da34db5)), + BIL_PAIR (BIL_VAL (0x3e3d8033), BIL_VAL (0xcde168ce)), + BIL_PAIR (BIL_VAL (0xdd9f57c3), BIL_VAL (0x51a5880d)), + BIL_PAIR (BIL_VAL (0xe6c67b64), BIL_VAL (0xf0c4f700)), + BIL_PAIR (BIL_VAL (0xa381a39d), BIL_VAL (0x2f3b9d83)), + BIL_PAIR (BIL_VAL (0x7d2c33cf), BIL_VAL (0xe48493c6)), + BIL_PAIR (BIL_VAL (0x93abd390), BIL_VAL (0x24c61457)), + BIL_PAIR (BIL_VAL (0xe7047cfe), BIL_VAL (0x95aca52b)), + BIL_PAIR (BIL_VAL (0xbbd8c16c), BIL_VAL (0xdaaf5256)), + BIL_PAIR (BIL_VAL (0x43126da5), BIL_VAL (0x2b5f0964)), + BIL_PAIR (BIL_VAL (0xb3114e82), BIL_VAL (0xe648a02d)), + BIL_PAIR (BIL_VAL (0x0184ee43), BIL_VAL (0xf753e8cb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf8c658b0), BIL_VAL (0x17ee8f03)), + BIL_PAIR (BIL_VAL (0xfcc49c84), BIL_VAL (0x34a67665)), + BIL_PAIR (BIL_VAL (0x96a2d53f), BIL_VAL (0xb4ec6fbe)), + BIL_PAIR (BIL_VAL (0x7bf15c9d), BIL_VAL (0x9d6cf77e)), + BIL_PAIR (BIL_VAL (0xdf74251c), BIL_VAL (0x2005a36c)), + BIL_PAIR (BIL_VAL (0x3e0acde4), BIL_VAL (0xb6d2a0b1)), + BIL_PAIR (BIL_VAL (0x20a8b77c), BIL_VAL (0x3d6057e9)), + BIL_PAIR (BIL_VAL (0xbc2cacdb), BIL_VAL (0xc5128afb)), + BIL_PAIR (BIL_VAL (0x5f50e041), BIL_VAL (0x575822e7)), + BIL_PAIR (BIL_VAL (0x041b948c), BIL_VAL (0x7ba033b5)), + BIL_PAIR (BIL_VAL (0x9fc59600), BIL_VAL (0xe3745598)), + BIL_PAIR (BIL_VAL (0x9c26f352), BIL_VAL (0x7cac8f8a)), + BIL_PAIR (BIL_VAL (0xabf7e327), BIL_VAL (0x194d1051)), + BIL_PAIR (BIL_VAL (0xbe604839), BIL_VAL (0x67a3ea6a)), + BIL_PAIR (BIL_VAL (0xbcbf1540), BIL_VAL (0x6dd1714c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x468f0c14), BIL_VAL (0x0229c878)), + BIL_PAIR (BIL_VAL (0x9bb75819), BIL_VAL (0x95573482)), + BIL_PAIR (BIL_VAL (0x3cf4b053), BIL_VAL (0x70c3dafc)), + BIL_PAIR (BIL_VAL (0x444949b7), BIL_VAL (0x562cd40e)), + BIL_PAIR (BIL_VAL (0xc323ff21), BIL_VAL (0xf63eacaa)), + BIL_PAIR (BIL_VAL (0x2b634690), BIL_VAL (0x8b32bdf0)), + BIL_PAIR (BIL_VAL (0x0120f2eb), BIL_VAL (0x8181d13f)), + BIL_PAIR (BIL_VAL (0xcf3372fc), BIL_VAL (0x0a46c705)), + BIL_PAIR (BIL_VAL (0x0acb5048), BIL_VAL (0x8981f7d4)), + BIL_PAIR (BIL_VAL (0x7a5ceaf4), BIL_VAL (0x463813b3)), + BIL_PAIR (BIL_VAL (0xd13d1aa4), BIL_VAL (0x84acd60a)), + BIL_PAIR (BIL_VAL (0x81f0266c), BIL_VAL (0x08329c17)), + BIL_PAIR (BIL_VAL (0x6f6a2168), BIL_VAL (0x05f05640)), + BIL_PAIR (BIL_VAL (0x90d9ae56), BIL_VAL (0x8be4b4e2)), + BIL_PAIR (BIL_VAL (0xe8f91d5a), BIL_VAL (0x216f5401)) + /* And implicit 2816 0 bits. */)), + /* 3072 */ + BIL_SET8 (BIL_SET7 (BIL_VAL (0x1f312ba4), + BIL_PAIR (BIL_VAL (0xbb116b51), BIL_VAL (0x5fba1189)), + BIL_PAIR (BIL_VAL (0xb426cabd), BIL_VAL (0x9e059216)), + BIL_PAIR (BIL_VAL (0xf096844f), BIL_VAL (0x4f926c3c)), + BIL_PAIR (BIL_VAL (0x1f56da12), BIL_VAL (0x2f36ce13)), + BIL_PAIR (BIL_VAL (0x9dd1636c), BIL_VAL (0x6436e398)), + BIL_PAIR (BIL_VAL (0x67abac89), BIL_VAL (0x0a2a19bb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9e01912b), BIL_VAL (0x5d56ee31)), + BIL_PAIR (BIL_VAL (0xb52d3aae), BIL_VAL (0x0b1d8563)), + BIL_PAIR (BIL_VAL (0xd7ef29c1), BIL_VAL (0xc2366cc0)), + BIL_PAIR (BIL_VAL (0x92adeb68), BIL_VAL (0x010c2c35)), + BIL_PAIR (BIL_VAL (0x00d52904), BIL_VAL (0x98e07735)), + BIL_PAIR (BIL_VAL (0x92817c18), BIL_VAL (0x0c000279)), + BIL_PAIR (BIL_VAL (0x6563f3aa), BIL_VAL (0xf8f271f1)), + BIL_PAIR (BIL_VAL (0x7168525d), BIL_VAL (0x1aad1c88)), + BIL_PAIR (BIL_VAL (0x88b72aaf), BIL_VAL (0x57962181)), + BIL_PAIR (BIL_VAL (0x408f4325), BIL_VAL (0xa740aa11)), + BIL_PAIR (BIL_VAL (0x6afcaad3), BIL_VAL (0x4fc5ef91)), + BIL_PAIR (BIL_VAL (0xf5978daa), BIL_VAL (0x10458c1a)), + BIL_PAIR (BIL_VAL (0x5832678b), BIL_VAL (0xc5d04c93)), + BIL_PAIR (BIL_VAL (0x9e0679bc), BIL_VAL (0x0628c43d)), + BIL_PAIR (BIL_VAL (0x1bbe426a), BIL_VAL (0xce9de2de))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x81bf6792), BIL_VAL (0xbaee096e)), + BIL_PAIR (BIL_VAL (0x8b553892), BIL_VAL (0x9823ff64)), + BIL_PAIR (BIL_VAL (0x72b7d504), BIL_VAL (0x07285866)), + BIL_PAIR (BIL_VAL (0x2e37161d), BIL_VAL (0x5422ba12)), + BIL_PAIR (BIL_VAL (0xb561c10a), BIL_VAL (0xff8862fb)), + BIL_PAIR (BIL_VAL (0x70b76956), BIL_VAL (0x89b420bc)), + BIL_PAIR (BIL_VAL (0xc339f567), BIL_VAL (0x97d13e81)), + BIL_PAIR (BIL_VAL (0x27557c46), BIL_VAL (0x3caf5417)), + BIL_PAIR (BIL_VAL (0xc8a5a023), BIL_VAL (0x27478270)), + BIL_PAIR (BIL_VAL (0x2851e273), BIL_VAL (0xb9d6e30f)), + BIL_PAIR (BIL_VAL (0x05e84e72), BIL_VAL (0x2d40ccfe)), + BIL_PAIR (BIL_VAL (0x64820950), BIL_VAL (0xb96c6879)), + BIL_PAIR (BIL_VAL (0xb87d7d8c), BIL_VAL (0xa145b5cf)), + BIL_PAIR (BIL_VAL (0xe7d5aa33), BIL_VAL (0x574f7ea8)), + BIL_PAIR (BIL_VAL (0x487d7162), BIL_VAL (0xd0b1ba17))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc39ff4a3), BIL_VAL (0x329a39c9)), + BIL_PAIR (BIL_VAL (0x61482438), BIL_VAL (0x97e3c7f1)), + BIL_PAIR (BIL_VAL (0x952da6fc), BIL_VAL (0x1c850cd3)), + BIL_PAIR (BIL_VAL (0xcb7f03e8), BIL_VAL (0x07ac6772)), + BIL_PAIR (BIL_VAL (0xcf44893e), BIL_VAL (0xfdcedbdc)), + BIL_PAIR (BIL_VAL (0x9e5f4e48), BIL_VAL (0x1417a90d)), + BIL_PAIR (BIL_VAL (0x28e7dbda), BIL_VAL (0x837e9183)), + BIL_PAIR (BIL_VAL (0x20566be2), BIL_VAL (0x096add15)), + BIL_PAIR (BIL_VAL (0x28940e90), BIL_VAL (0xbfb2a20d)), + BIL_PAIR (BIL_VAL (0x38744abc), BIL_VAL (0x03ba8cec)), + BIL_PAIR (BIL_VAL (0x23b36972), BIL_VAL (0x621e470d)), + BIL_PAIR (BIL_VAL (0xe71a3155), BIL_VAL (0xb7d1c2d4)), + BIL_PAIR (BIL_VAL (0x22b31cdd), BIL_VAL (0x9484f44a)), + BIL_PAIR (BIL_VAL (0x5b8371e4), BIL_VAL (0x28ea4199)), + BIL_PAIR (BIL_VAL (0x4310de34), BIL_VAL (0x97681712))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf5b3ee5e), BIL_VAL (0x9388c6b2)), + BIL_PAIR (BIL_VAL (0xc3dcb52e), BIL_VAL (0x4b74bbbf)), + BIL_PAIR (BIL_VAL (0xfc09aac5), BIL_VAL (0xcfd58e83)), + BIL_PAIR (BIL_VAL (0x561f9695), BIL_VAL (0x0910f9bb)), + BIL_PAIR (BIL_VAL (0xdfd5456f), BIL_VAL (0x83e1c48d)), + BIL_PAIR (BIL_VAL (0x43071fcd), BIL_VAL (0x1a324f0a)), + BIL_PAIR (BIL_VAL (0x8b4598fc), BIL_VAL (0x53873290)), + BIL_PAIR (BIL_VAL (0x4214228a), BIL_VAL (0xee881bb2)), + BIL_PAIR (BIL_VAL (0xf00599d8), BIL_VAL (0x52ebefe7)), + BIL_PAIR (BIL_VAL (0x7f6a8479), BIL_VAL (0x453c762d)), + BIL_PAIR (BIL_VAL (0xb41cdad0), BIL_VAL (0x35aa7127)), + BIL_PAIR (BIL_VAL (0xa514845f), BIL_VAL (0xb7a64acf)), + BIL_PAIR (BIL_VAL (0xa6d09338), BIL_VAL (0x9fe1abd8)), + BIL_PAIR (BIL_VAL (0x42135bb1), BIL_VAL (0xc4da1365)), + BIL_PAIR (BIL_VAL (0x45326c4d), BIL_VAL (0x60aa51b8))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x469784a7), BIL_VAL (0xdd3272fc)), + BIL_PAIR (BIL_VAL (0x0d44d00f), BIL_VAL (0x65dd4ac5)), + BIL_PAIR (BIL_VAL (0xd208e0ee), BIL_VAL (0x8c7dd4f8)), + BIL_PAIR (BIL_VAL (0xe4a077b8), BIL_VAL (0x6a43c685)), + BIL_PAIR (BIL_VAL (0xc03073a1), BIL_VAL (0x1518e68b)), + BIL_PAIR (BIL_VAL (0x6c90b34f), BIL_VAL (0xdc64b813)), + BIL_PAIR (BIL_VAL (0x0ff96316), BIL_VAL (0x13a3411d)), + BIL_PAIR (BIL_VAL (0xe325697c), BIL_VAL (0x6b424bdf)), + BIL_PAIR (BIL_VAL (0xa4847791), BIL_VAL (0xcf490814)), + BIL_PAIR (BIL_VAL (0x1b7ec5e8), BIL_VAL (0x3a635a00)), + BIL_PAIR (BIL_VAL (0xf38ff405), BIL_VAL (0xc2b874c8)), + BIL_PAIR (BIL_VAL (0x919a9dfc), BIL_VAL (0xfd8418f3)), + BIL_PAIR (BIL_VAL (0x962779b5), BIL_VAL (0x94a321e7)), + BIL_PAIR (BIL_VAL (0xf5291578), BIL_VAL (0x8383464a)), + BIL_PAIR (BIL_VAL (0x72250678), BIL_VAL (0xef94eb6b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd27e67d0), BIL_VAL (0x93308672)), + BIL_PAIR (BIL_VAL (0x240c4c90), BIL_VAL (0x0d81df3f)), + BIL_PAIR (BIL_VAL (0x5309e565), BIL_VAL (0xed2f0e51)), + BIL_PAIR (BIL_VAL (0xa58752f6), BIL_VAL (0xa897ab50)), + BIL_PAIR (BIL_VAL (0x7f75b586), BIL_VAL (0x9eaf72cd)), + BIL_PAIR (BIL_VAL (0x2d55f72a), BIL_VAL (0xc6faa92d)), + BIL_PAIR (BIL_VAL (0x0cb939c4), BIL_VAL (0xbdfef796)), + BIL_PAIR (BIL_VAL (0x1bf153e1), BIL_VAL (0x5e72aa64)), + BIL_PAIR (BIL_VAL (0xf84433f3), BIL_VAL (0x5927e3d7)), + BIL_PAIR (BIL_VAL (0xe0dbc043), BIL_VAL (0x7dfa41b5)), + BIL_PAIR (BIL_VAL (0x7627cfe5), BIL_VAL (0x33600e48)), + BIL_PAIR (BIL_VAL (0x3bc1d86c), BIL_VAL (0x0c28a686)), + BIL_PAIR (BIL_VAL (0x8a0c1e60), BIL_VAL (0x34084ef5)), + BIL_PAIR (BIL_VAL (0xb08ee59b), BIL_VAL (0xa1dbc468)), + BIL_PAIR (BIL_VAL (0x4301a047), BIL_VAL (0xe26265f8))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x06b8a3e5), BIL_VAL (0xf1c01547)), + BIL_PAIR (BIL_VAL (0xf5f98c22), BIL_VAL (0xcbdc536a)), + BIL_PAIR (BIL_VAL (0x8e7c4e64), BIL_VAL (0xb0ae5e1e)), + BIL_PAIR (BIL_VAL (0x063c1dbf), BIL_VAL (0x2bb0b405)), + BIL_PAIR (BIL_VAL (0x9440357b), BIL_VAL (0xac3aac5d)), + BIL_PAIR (BIL_VAL (0x301f0c1e), BIL_VAL (0x7b43e24d)), + BIL_PAIR (BIL_VAL (0x47719d3e), BIL_VAL (0x9813356f)), + BIL_PAIR (BIL_VAL (0xcc6d5186), BIL_VAL (0xbdc746bf)), + BIL_PAIR (BIL_VAL (0xab4304f8), BIL_VAL (0xf0bf77a5)), + BIL_PAIR (BIL_VAL (0x9e264e4f), BIL_VAL (0x3fdfaf6c)), + BIL_PAIR (BIL_VAL (0x62519d84), BIL_VAL (0xee8c8543)), + BIL_PAIR (BIL_VAL (0xa7c3df1c), BIL_VAL (0x622c53e1)), + BIL_PAIR (BIL_VAL (0x3ff321eb), BIL_VAL (0xdca1947c)), + BIL_PAIR (BIL_VAL (0xfb8435e5), BIL_VAL (0xe9579124)), + BIL_PAIR (BIL_VAL (0xefef44c8), BIL_VAL (0xbe4dd001)) + /* And implicit 3072 0 bits. */)), + /* 3328 */ + BIL_SET9 (BIL_PAIR (BIL_VAL (0xa630), BIL_VAL (0xef7d5699)), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xfe4550e3), BIL_VAL (0x66023541)), + BIL_PAIR (BIL_VAL (0x0f98fca8), BIL_VAL (0x1f202c5d)), + BIL_PAIR (BIL_VAL (0x111a0c7a), BIL_VAL (0x3cbe3d82)), + BIL_PAIR (BIL_VAL (0xa0426930), BIL_VAL (0x38e326f3)), + BIL_PAIR (BIL_VAL (0x94eeaa96), BIL_VAL (0x27d4a07c)), + BIL_PAIR (BIL_VAL (0x3e08406c), BIL_VAL (0x0514f25a)), + BIL_PAIR (BIL_VAL (0x42c250d2), BIL_VAL (0xbfe0dc5c)), + BIL_PAIR (BIL_VAL (0x3215b6ee), BIL_VAL (0xe50ab59b)), + BIL_PAIR (BIL_VAL (0x6cd18c99), BIL_VAL (0x6111a8aa)), + BIL_PAIR (BIL_VAL (0x51282c56), BIL_VAL (0x157d6581)), + BIL_PAIR (BIL_VAL (0x6df5fc44), BIL_VAL (0x6ac5235e)), + BIL_PAIR (BIL_VAL (0xa6087073), BIL_VAL (0xad897a4c)), + BIL_PAIR (BIL_VAL (0x286e4a6c), BIL_VAL (0x215b9af0)), + BIL_PAIR (BIL_VAL (0x638caeaf), BIL_VAL (0xfe090246)), + BIL_PAIR (BIL_VAL (0x8f2036bd), BIL_VAL (0x115fc336))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xa322a575), BIL_VAL (0x80488756)), + BIL_PAIR (BIL_VAL (0xa6b4b9e5), BIL_VAL (0x703ecac8)), + BIL_PAIR (BIL_VAL (0x8656ef04), BIL_VAL (0xc8f44f49)), + BIL_PAIR (BIL_VAL (0xa2141c8c), BIL_VAL (0x2d660d5a)), + BIL_PAIR (BIL_VAL (0xbc219b1b), BIL_VAL (0x93150e0e)), + BIL_PAIR (BIL_VAL (0x98fc671a), BIL_VAL (0xd7a5bc7f)), + BIL_PAIR (BIL_VAL (0x6557e523), BIL_VAL (0xd13e1b0c)), + BIL_PAIR (BIL_VAL (0xf7e03658), BIL_VAL (0x50f1732a)), + BIL_PAIR (BIL_VAL (0x38225383), BIL_VAL (0x723458ab)), + BIL_PAIR (BIL_VAL (0x6211f2db), BIL_VAL (0x8fc93b09)), + BIL_PAIR (BIL_VAL (0x46182e91), BIL_VAL (0x14504835)), + BIL_PAIR (BIL_VAL (0xce033f9a), BIL_VAL (0x276ed27c)), + BIL_PAIR (BIL_VAL (0x89b14eef), BIL_VAL (0x690b1b93)), + BIL_PAIR (BIL_VAL (0x466cf053), BIL_VAL (0x01b22170)), + BIL_PAIR (BIL_VAL (0x2135a3bf), BIL_VAL (0xad577996))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x1ae29dfa), BIL_VAL (0x90e9c87e)), + BIL_PAIR (BIL_VAL (0x4640c84b), BIL_VAL (0xc18480b6)), + BIL_PAIR (BIL_VAL (0x1eeb3d52), BIL_VAL (0x1fd318a7)), + BIL_PAIR (BIL_VAL (0xe245b414), BIL_VAL (0xb244745b)), + BIL_PAIR (BIL_VAL (0x92285ec4), BIL_VAL (0xa978340a)), + BIL_PAIR (BIL_VAL (0xbb8737e2), BIL_VAL (0xffc37ccc)), + BIL_PAIR (BIL_VAL (0xec4ab099), BIL_VAL (0xb9bb02fa)), + BIL_PAIR (BIL_VAL (0x16783cf3), BIL_VAL (0x419cbf6f)), + BIL_PAIR (BIL_VAL (0x4061562e), BIL_VAL (0xd2d24dbe)), + BIL_PAIR (BIL_VAL (0x70658b57), BIL_VAL (0xdcccf004)), + BIL_PAIR (BIL_VAL (0x6c340613), BIL_VAL (0x73e17c39)), + BIL_PAIR (BIL_VAL (0xcbba8ac3), BIL_VAL (0xcfb02148)), + BIL_PAIR (BIL_VAL (0x2f7f3d81), BIL_VAL (0x880b12b1)), + BIL_PAIR (BIL_VAL (0x85a39af5), BIL_VAL (0x07ab5131)), + BIL_PAIR (BIL_VAL (0xb41b6a54), BIL_VAL (0x04b1fecc))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6d277130), BIL_VAL (0xf47d3349)), + BIL_PAIR (BIL_VAL (0x0a3fbbf2), BIL_VAL (0xad2da23c)), + BIL_PAIR (BIL_VAL (0x316167a0), BIL_VAL (0x9c13aa74)), + BIL_PAIR (BIL_VAL (0x2f6ff9ce), BIL_VAL (0x3ad91b9a)), + BIL_PAIR (BIL_VAL (0x3ddbca61), BIL_VAL (0x1e1cb1e9)), + BIL_PAIR (BIL_VAL (0x112fe28b), BIL_VAL (0xf1fd33eb)), + BIL_PAIR (BIL_VAL (0x29f3c87f), BIL_VAL (0x456272a7)), + BIL_PAIR (BIL_VAL (0x1150d2fc), BIL_VAL (0x91df9bcd)), + BIL_PAIR (BIL_VAL (0xf60e0318), BIL_VAL (0xeca67829)), + BIL_PAIR (BIL_VAL (0xe853e733), BIL_VAL (0xfb9b7f30)), + BIL_PAIR (BIL_VAL (0xdcb45b7f), BIL_VAL (0xd674cba0)), + BIL_PAIR (BIL_VAL (0xe95704aa), BIL_VAL (0xd35afc75)), + BIL_PAIR (BIL_VAL (0x529a5db1), BIL_VAL (0x08694726)), + BIL_PAIR (BIL_VAL (0x38cda302), BIL_VAL (0xcdda33e0)), + BIL_PAIR (BIL_VAL (0xbf8f3f5f), BIL_VAL (0x294ff2ac))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x8ab12e9c), BIL_VAL (0x0152181a)), + BIL_PAIR (BIL_VAL (0x6be284b0), BIL_VAL (0xa0c15074)), + BIL_PAIR (BIL_VAL (0x79e4519b), BIL_VAL (0x3c681575)), + BIL_PAIR (BIL_VAL (0xab8cd14e), BIL_VAL (0x0e5f5a06)), + BIL_PAIR (BIL_VAL (0x76292c16), BIL_VAL (0x1f3d3a91)), + BIL_PAIR (BIL_VAL (0xab4ba9d3), BIL_VAL (0xe5abd7b7)), + BIL_PAIR (BIL_VAL (0x95ab0c77), BIL_VAL (0x5d7c8342)), + BIL_PAIR (BIL_VAL (0x946d9adb), BIL_VAL (0x0e7454d3)), + BIL_PAIR (BIL_VAL (0xf1d31631), BIL_VAL (0x494625f5)), + BIL_PAIR (BIL_VAL (0x6af35cd1), BIL_VAL (0x775eea0a)), + BIL_PAIR (BIL_VAL (0xbd4a7fca), BIL_VAL (0xb43c0520)), + BIL_PAIR (BIL_VAL (0x54f42d53), BIL_VAL (0xb4508b26)), + BIL_PAIR (BIL_VAL (0xe1e4d2a0), BIL_VAL (0x3e6ec89c)), + BIL_PAIR (BIL_VAL (0x6b6dba0e), BIL_VAL (0xc9b1f19c)), + BIL_PAIR (BIL_VAL (0x1f3205a8), BIL_VAL (0xfaa9b476))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xa9e8b22c), BIL_VAL (0x13a9ad27)), + BIL_PAIR (BIL_VAL (0xb443d552), BIL_VAL (0x6931bbdf)), + BIL_PAIR (BIL_VAL (0x4a181460), BIL_VAL (0x07100007)), + BIL_PAIR (BIL_VAL (0x11abf4ad), BIL_VAL (0xfdecbc94)), + BIL_PAIR (BIL_VAL (0xad50f1eb), BIL_VAL (0x540cd19b)), + BIL_PAIR (BIL_VAL (0x9c774a36), BIL_VAL (0xf92acda8)), + BIL_PAIR (BIL_VAL (0x7a926b1e), BIL_VAL (0x93e6952e)), + BIL_PAIR (BIL_VAL (0x5a588409), BIL_VAL (0x64088535)), + BIL_PAIR (BIL_VAL (0x186254f4), BIL_VAL (0xc2b2a8f6)), + BIL_PAIR (BIL_VAL (0x78c36403), BIL_VAL (0x6740d081)), + BIL_PAIR (BIL_VAL (0x89530148), BIL_VAL (0xe7aac967)), + BIL_PAIR (BIL_VAL (0x3e18171a), BIL_VAL (0x0b412fce)), + BIL_PAIR (BIL_VAL (0x269524e1), BIL_VAL (0x9a5cc05f)), + BIL_PAIR (BIL_VAL (0x198e7c0e), BIL_VAL (0x01e4d292)), + BIL_PAIR (BIL_VAL (0x82e1665b), BIL_VAL (0xbe5c4b67))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x62bab888), BIL_VAL (0xc5b534ba)), + BIL_PAIR (BIL_VAL (0xba4734b0), BIL_VAL (0xee033a1d)), + BIL_PAIR (BIL_VAL (0xae31b8d1), BIL_VAL (0xa39db170)), + BIL_PAIR (BIL_VAL (0x7533763c), BIL_VAL (0xec3d7fab)), + BIL_PAIR (BIL_VAL (0x5baea250), BIL_VAL (0x4c74a1be)), + BIL_PAIR (BIL_VAL (0xd9d798c1), BIL_VAL (0x82687a05)), + BIL_PAIR (BIL_VAL (0xf8cc1664), BIL_VAL (0x56e36839)), + BIL_PAIR (BIL_VAL (0xb1000a12), BIL_VAL (0x61962264)), + BIL_PAIR (BIL_VAL (0x4a213da6), BIL_VAL (0xfabd5910)), + BIL_PAIR (BIL_VAL (0x86f2b700), BIL_VAL (0xf5f88608)), + BIL_PAIR (BIL_VAL (0xd21a2dfc), BIL_VAL (0x1135e868)), + BIL_PAIR (BIL_VAL (0x47868030), BIL_VAL (0x77bb9801)), + BIL_PAIR (BIL_VAL (0xa460a689), BIL_VAL (0x92d7ab82)), + BIL_PAIR (BIL_VAL (0xc44335d6), BIL_VAL (0xeab754d6)), + BIL_PAIR (BIL_VAL (0x098b8975), BIL_VAL (0xa0b0789e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x60413ccd), BIL_VAL (0x40e150bd)), + BIL_PAIR (BIL_VAL (0x0dd4abe1), BIL_VAL (0x2d26ef47)), + BIL_PAIR (BIL_VAL (0x57f2da73), BIL_VAL (0x7c815b8f)), + BIL_PAIR (BIL_VAL (0x194f3842), BIL_VAL (0x14d4ae36)), + BIL_PAIR (BIL_VAL (0x41fc090c), BIL_VAL (0x9ad07ef0)), + BIL_PAIR (BIL_VAL (0x6690e793), BIL_VAL (0x28c92841)), + BIL_PAIR (BIL_VAL (0x9ae5590b), BIL_VAL (0xa3c8fee6)), + BIL_PAIR (BIL_VAL (0x5397f52a), BIL_VAL (0xee62ac54)), + BIL_PAIR (BIL_VAL (0x0a29f17d), BIL_VAL (0xaad2e60b)), + BIL_PAIR (BIL_VAL (0xcf5bbfc0), BIL_VAL (0x9c0cbfe5)), + BIL_PAIR (BIL_VAL (0x4f54f415), BIL_VAL (0x1a55d229)), + BIL_PAIR (BIL_VAL (0x67b6e254), BIL_VAL (0xe21f1d45)), + BIL_PAIR (BIL_VAL (0xe3eb4d9b), BIL_VAL (0x370dc5a8)), + BIL_PAIR (BIL_VAL (0x4bfa0f55), BIL_VAL (0xb874ccde)), + BIL_PAIR (BIL_VAL (0x3f7d5dcd), BIL_VAL (0x673c4c01)) + /* And implicit 3328 0 bits. */)), + /* 3584 */ + BIL_SET9 (BIL_SET11 (BIL_VAL (0x3), + BIL_PAIR (BIL_VAL (0x7577228a), BIL_VAL (0xfc9fcfde)), + BIL_PAIR (BIL_VAL (0x56a8463b), BIL_VAL (0x07420c5e)), + BIL_PAIR (BIL_VAL (0x24279092), BIL_VAL (0x844a8f34)), + BIL_PAIR (BIL_VAL (0x4d3299e9), BIL_VAL (0x9e6e12b8)), + BIL_PAIR (BIL_VAL (0xeb15af76), BIL_VAL (0x0d09dcb8)), + BIL_PAIR (BIL_VAL (0xd60d6604), BIL_VAL (0xd517b214)), + BIL_PAIR (BIL_VAL (0x286e22be), BIL_VAL (0x37f4e855)), + BIL_PAIR (BIL_VAL (0x8c7b5235), BIL_VAL (0xc36007bb)), + BIL_PAIR (BIL_VAL (0xeefd9149), BIL_VAL (0xc624c6e7)), + BIL_PAIR (BIL_VAL (0xbb42659d), BIL_VAL (0xf2325f0f))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x15fd926b), BIL_VAL (0x74374096)), + BIL_PAIR (BIL_VAL (0xd34aeccd), BIL_VAL (0x0aebc4a2)), + BIL_PAIR (BIL_VAL (0xb43d99a0), BIL_VAL (0x36ffcff4)), + BIL_PAIR (BIL_VAL (0xda17b567), BIL_VAL (0x6b6c22a4)), + BIL_PAIR (BIL_VAL (0x5a0cef26), BIL_VAL (0x10aa47cc)), + BIL_PAIR (BIL_VAL (0x434ef84e), BIL_VAL (0x912dcebd)), + BIL_PAIR (BIL_VAL (0xcf0bcaf8), BIL_VAL (0x86753e24)), + BIL_PAIR (BIL_VAL (0xa697adcf), BIL_VAL (0x9a8400a3)), + BIL_PAIR (BIL_VAL (0x5cecb230), BIL_VAL (0x3de00675)), + BIL_PAIR (BIL_VAL (0xa7c2fef8), BIL_VAL (0x2dae2e8d)), + BIL_PAIR (BIL_VAL (0x62044793), BIL_VAL (0xe1675056)), + BIL_PAIR (BIL_VAL (0xfaef6598), BIL_VAL (0xb29348d5)), + BIL_PAIR (BIL_VAL (0x270baba0), BIL_VAL (0xc2848bd9)), + BIL_PAIR (BIL_VAL (0x9f5b9bc3), BIL_VAL (0xbf98377b)), + BIL_PAIR (BIL_VAL (0xbd76548c), BIL_VAL (0x31972aa1))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x520e2ff6), BIL_VAL (0xe346aa61)), + BIL_PAIR (BIL_VAL (0x173a0844), BIL_VAL (0xbf00c2e6)), + BIL_PAIR (BIL_VAL (0x9ceab83e), BIL_VAL (0x9e07ffab)), + BIL_PAIR (BIL_VAL (0x960806b7), BIL_VAL (0x479d0624)), + BIL_PAIR (BIL_VAL (0x4a2390ac), BIL_VAL (0xd5840752)), + BIL_PAIR (BIL_VAL (0x360d3d59), BIL_VAL (0x3d473472)), + BIL_PAIR (BIL_VAL (0x3230366b), BIL_VAL (0x204b83b6)), + BIL_PAIR (BIL_VAL (0xdf79b7cb), BIL_VAL (0x8f73819b)), + BIL_PAIR (BIL_VAL (0xb4733f62), BIL_VAL (0xc103a4ce)), + BIL_PAIR (BIL_VAL (0xbb5de214), BIL_VAL (0x99b73a32)), + BIL_PAIR (BIL_VAL (0x4cee16fe), BIL_VAL (0xa5ed2eaf)), + BIL_PAIR (BIL_VAL (0x33fd04c1), BIL_VAL (0x7dbdf9c9)), + BIL_PAIR (BIL_VAL (0x19d6934c), BIL_VAL (0x4fc856b8)), + BIL_PAIR (BIL_VAL (0x65e88de3), BIL_VAL (0x1496cb81)), + BIL_PAIR (BIL_VAL (0x09ac3c25), BIL_VAL (0x79654b7e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xfbf00801), BIL_VAL (0x95bc9266)), + BIL_PAIR (BIL_VAL (0xe4ac3223), BIL_VAL (0xf030a158)), + BIL_PAIR (BIL_VAL (0x40d581a1), BIL_VAL (0xca94de60)), + BIL_PAIR (BIL_VAL (0xfb6f9d63), BIL_VAL (0xec594938)), + BIL_PAIR (BIL_VAL (0xb2d64b96), BIL_VAL (0x9fbc9ab4)), + BIL_PAIR (BIL_VAL (0x59ad8e0b), BIL_VAL (0x39340040)), + BIL_PAIR (BIL_VAL (0x8b712955), BIL_VAL (0xe4f9836d)), + BIL_PAIR (BIL_VAL (0xafdf6047), BIL_VAL (0xefa658ea)), + BIL_PAIR (BIL_VAL (0x6df0cd55), BIL_VAL (0x99d5d980)), + BIL_PAIR (BIL_VAL (0xa2924dd6), BIL_VAL (0x604fe8af)), + BIL_PAIR (BIL_VAL (0xccd0c4b1), BIL_VAL (0x74d72464)), + BIL_PAIR (BIL_VAL (0x5735d444), BIL_VAL (0x9b58a1e2)), + BIL_PAIR (BIL_VAL (0xfdc2b352), BIL_VAL (0x670fe2db)), + BIL_PAIR (BIL_VAL (0x6d66e0ff), BIL_VAL (0xd8ba18d3)), + BIL_PAIR (BIL_VAL (0x5c31ecb8), BIL_VAL (0xe3707d11))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe99bfd85), BIL_VAL (0xd8779da7)), + BIL_PAIR (BIL_VAL (0xba4e6b5a), BIL_VAL (0x8a33b5a8)), + BIL_PAIR (BIL_VAL (0xbfd431d8), BIL_VAL (0x54693ebb)), + BIL_PAIR (BIL_VAL (0x11c3e810), BIL_VAL (0x1a142886)), + BIL_PAIR (BIL_VAL (0xc3efebd9), BIL_VAL (0xbfc9639d)), + BIL_PAIR (BIL_VAL (0x073bfb59), BIL_VAL (0xa32fcc9c)), + BIL_PAIR (BIL_VAL (0x27ae3c37), BIL_VAL (0x7eb9039a)), + BIL_PAIR (BIL_VAL (0x76e2046a), BIL_VAL (0xaee50b05)), + BIL_PAIR (BIL_VAL (0x4dc404e5), BIL_VAL (0xd438af6d)), + BIL_PAIR (BIL_VAL (0xa3f09927), BIL_VAL (0x8c313e9c)), + BIL_PAIR (BIL_VAL (0xcb625814), BIL_VAL (0x8e764384)), + BIL_PAIR (BIL_VAL (0x3e1ab45f), BIL_VAL (0x0fd840f0)), + BIL_PAIR (BIL_VAL (0xd0ada886), BIL_VAL (0x52f62532)), + BIL_PAIR (BIL_VAL (0x1fc2e381), BIL_VAL (0x285cf537)), + BIL_PAIR (BIL_VAL (0x0aef78cf), BIL_VAL (0x96d750b9))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x26518c2f), BIL_VAL (0x19c34808)), + BIL_PAIR (BIL_VAL (0xb98c2b8d), BIL_VAL (0x1a2e2bca)), + BIL_PAIR (BIL_VAL (0x0df7a13d), BIL_VAL (0x2f0d3a8a)), + BIL_PAIR (BIL_VAL (0x8a7a9e83), BIL_VAL (0xb737d4c6)), + BIL_PAIR (BIL_VAL (0xe42cf246), BIL_VAL (0xa610f1f9)), + BIL_PAIR (BIL_VAL (0xb1195af9), BIL_VAL (0x27afaf39)), + BIL_PAIR (BIL_VAL (0x7054b32c), BIL_VAL (0xaac2349f)), + BIL_PAIR (BIL_VAL (0x1ed8b6f9), BIL_VAL (0x9c78ac9a)), + BIL_PAIR (BIL_VAL (0x4e519bdd), BIL_VAL (0x8811de36)), + BIL_PAIR (BIL_VAL (0x9060a412), BIL_VAL (0x4d5feb69)), + BIL_PAIR (BIL_VAL (0xd1054a07), BIL_VAL (0x5dd4ebb2)), + BIL_PAIR (BIL_VAL (0xd0358b0c), BIL_VAL (0xd7f8f7b2)), + BIL_PAIR (BIL_VAL (0x125cacdf), BIL_VAL (0xb910df15)), + BIL_PAIR (BIL_VAL (0x8b125c2d), BIL_VAL (0x06a5e99f)), + BIL_PAIR (BIL_VAL (0x65e33c70), BIL_VAL (0xef843c1e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd5ff7df3), BIL_VAL (0xa0547daa)), + BIL_PAIR (BIL_VAL (0x2b7db509), BIL_VAL (0x64f2c672)), + BIL_PAIR (BIL_VAL (0x8eb55416), BIL_VAL (0xb44731e9)), + BIL_PAIR (BIL_VAL (0x185dae90), BIL_VAL (0x11b6e3bb)), + BIL_PAIR (BIL_VAL (0x7388b238), BIL_VAL (0x112b1e42)), + BIL_PAIR (BIL_VAL (0x5552604e), BIL_VAL (0x0cf2b418)), + BIL_PAIR (BIL_VAL (0x751dd65d), BIL_VAL (0xb9978e07)), + BIL_PAIR (BIL_VAL (0x5a16628f), BIL_VAL (0x1eddad3c)), + BIL_PAIR (BIL_VAL (0x3cf3089e), BIL_VAL (0xc2ba0237)), + BIL_PAIR (BIL_VAL (0x5e646180), BIL_VAL (0xffda3ea2)), + BIL_PAIR (BIL_VAL (0x59255135), BIL_VAL (0x7e2b4ffc)), + BIL_PAIR (BIL_VAL (0xde8d3f14), BIL_VAL (0x425ba385)), + BIL_PAIR (BIL_VAL (0x459e5859), BIL_VAL (0x8113a59e)), + BIL_PAIR (BIL_VAL (0xbd9bd174), BIL_VAL (0x8bfd9727)), + BIL_PAIR (BIL_VAL (0x327587b6), BIL_VAL (0x919efccd))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x9cd516e8), BIL_VAL (0x45cf5564)), + BIL_PAIR (BIL_VAL (0x3c1de688), BIL_VAL (0x2f551e85)), + BIL_PAIR (BIL_VAL (0x7c7b11c3), BIL_VAL (0x1571a375)), + BIL_PAIR (BIL_VAL (0x59750c30), BIL_VAL (0xadb29f0d)), + BIL_PAIR (BIL_VAL (0x4e3bee76), BIL_VAL (0x45da566c)), + BIL_PAIR (BIL_VAL (0x03c1ee9e), BIL_VAL (0x45d54f3a)), + BIL_PAIR (BIL_VAL (0x7b26d2bb), BIL_VAL (0x473da861)), + BIL_PAIR (BIL_VAL (0xe996c669), BIL_VAL (0xca6a4952)), + BIL_PAIR (BIL_VAL (0xe5efbe51), BIL_VAL (0x0a344834)), + BIL_PAIR (BIL_VAL (0xac968634), BIL_VAL (0x162be174)), + BIL_PAIR (BIL_VAL (0xe5aa9913), BIL_VAL (0xe56214dd)), + BIL_PAIR (BIL_VAL (0xb50da1c3), BIL_VAL (0xfc4662b6)), + BIL_PAIR (BIL_VAL (0x564d8158), BIL_VAL (0xc53b90f0)), + BIL_PAIR (BIL_VAL (0x69c38365), BIL_VAL (0xf3bbb28d)), + BIL_PAIR (BIL_VAL (0x0d6f6b1b), BIL_VAL (0xa70b5c76))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x3efef072), BIL_VAL (0x1d4ed3d1)), + BIL_PAIR (BIL_VAL (0xeb899ac0), BIL_VAL (0x1cec4ddb)), + BIL_PAIR (BIL_VAL (0xdc85aa78), BIL_VAL (0x218058aa)), + BIL_PAIR (BIL_VAL (0x44078a3b), BIL_VAL (0x849c2811)), + BIL_PAIR (BIL_VAL (0x6b272681), BIL_VAL (0x4d918668)), + BIL_PAIR (BIL_VAL (0xcdc87bd6), BIL_VAL (0xf7210f61)), + BIL_PAIR (BIL_VAL (0x836275e3), BIL_VAL (0x912718da)), + BIL_PAIR (BIL_VAL (0xdc363b4f), BIL_VAL (0x16c166d6)), + BIL_PAIR (BIL_VAL (0x2997eef4), BIL_VAL (0x646c52a4)), + BIL_PAIR (BIL_VAL (0xaada4c04), BIL_VAL (0x9fdda7a4)), + BIL_PAIR (BIL_VAL (0x9fef03e9), BIL_VAL (0xb8ad2fb6)), + BIL_PAIR (BIL_VAL (0xa7407dd1), BIL_VAL (0x69c35434)), + BIL_PAIR (BIL_VAL (0x9245c370), BIL_VAL (0xfa95a2b5)), + BIL_PAIR (BIL_VAL (0xd0527818), BIL_VAL (0x332c43d9)), + BIL_PAIR (BIL_VAL (0xaa77c11f), BIL_VAL (0xdc3ac801)) + /* And implicit 3584 0 bits. */)), + /* 3840 */ + BIL_SET10 (BIL_SET5 (BIL_VAL (0x126dc0), + BIL_PAIR (BIL_VAL (0xee6fb8c9), BIL_VAL (0xedb188e9)), + BIL_PAIR (BIL_VAL (0x76c13e80), BIL_VAL (0x50fa5fd4)), + BIL_PAIR (BIL_VAL (0x9fb2afd4), BIL_VAL (0x31cdeeaa)), + BIL_PAIR (BIL_VAL (0x52a8ddd1), BIL_VAL (0x6b2e1191))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x4e5df1b1), BIL_VAL (0xfa897198)), + BIL_PAIR (BIL_VAL (0x20c58542), BIL_VAL (0xe54ae697)), + BIL_PAIR (BIL_VAL (0xedb67dab), BIL_VAL (0x78e597b6)), + BIL_PAIR (BIL_VAL (0xa1ad5f89), BIL_VAL (0x10c1a247)), + BIL_PAIR (BIL_VAL (0x93a8fbae), BIL_VAL (0x322dcf41)), + BIL_PAIR (BIL_VAL (0x615f8991), BIL_VAL (0xccfacd1f)), + BIL_PAIR (BIL_VAL (0x5438f06a), BIL_VAL (0xdc67a5cb)), + BIL_PAIR (BIL_VAL (0x644c7ed3), BIL_VAL (0xf51a1d1a)), + BIL_PAIR (BIL_VAL (0xbcebfe43), BIL_VAL (0x37b867e4)), + BIL_PAIR (BIL_VAL (0x1ef26154), BIL_VAL (0xd87f23b5)), + BIL_PAIR (BIL_VAL (0x5dde9164), BIL_VAL (0xfd83a2df)), + BIL_PAIR (BIL_VAL (0x1c907aeb), BIL_VAL (0xf9e3b1d7)), + BIL_PAIR (BIL_VAL (0xcace62cf), BIL_VAL (0xaeed92df)), + BIL_PAIR (BIL_VAL (0x844056cb), BIL_VAL (0x907126ac)), + BIL_PAIR (BIL_VAL (0x17d45abd), BIL_VAL (0x9838ab76))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xbeec99bb), BIL_VAL (0x26f8c432)), + BIL_PAIR (BIL_VAL (0xfbebe126), BIL_VAL (0xb61f7ec7)), + BIL_PAIR (BIL_VAL (0x272464c6), BIL_VAL (0x8b6a76a1)), + BIL_PAIR (BIL_VAL (0x9fe5278f), BIL_VAL (0x420e4f64)), + BIL_PAIR (BIL_VAL (0x1cb9475d), BIL_VAL (0xb4fb34d5)), + BIL_PAIR (BIL_VAL (0x5e67d045), BIL_VAL (0x8ce1b767)), + BIL_PAIR (BIL_VAL (0xfd2e829d), BIL_VAL (0x99dc6015)), + BIL_PAIR (BIL_VAL (0x82f78258), BIL_VAL (0xdb738694)), + BIL_PAIR (BIL_VAL (0xc84b9931), BIL_VAL (0xb4730937)), + BIL_PAIR (BIL_VAL (0x863de1cc), BIL_VAL (0xe7299661)), + BIL_PAIR (BIL_VAL (0x5e5c6f30), BIL_VAL (0xfc10c110)), + BIL_PAIR (BIL_VAL (0x0ae053a2), BIL_VAL (0xbb6974d2)), + BIL_PAIR (BIL_VAL (0x98f167ec), BIL_VAL (0x3f15f990)), + BIL_PAIR (BIL_VAL (0xeebc88b6), BIL_VAL (0xc01de240)), + BIL_PAIR (BIL_VAL (0xf5fa1a16), BIL_VAL (0x7325503c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe30ab81c), BIL_VAL (0x0c0bd60c)), + BIL_PAIR (BIL_VAL (0x7a8150fd), BIL_VAL (0x1e37a6b4)), + BIL_PAIR (BIL_VAL (0xf3d140d8), BIL_VAL (0x173bf954)), + BIL_PAIR (BIL_VAL (0x54c915a7), BIL_VAL (0x7133d361)), + BIL_PAIR (BIL_VAL (0x8db6affe), BIL_VAL (0xc4350628)), + BIL_PAIR (BIL_VAL (0xebee9026), BIL_VAL (0x4f62b99c)), + BIL_PAIR (BIL_VAL (0x14079b81), BIL_VAL (0xfb3f8868)), + BIL_PAIR (BIL_VAL (0xa2bed873), BIL_VAL (0xdf550a92)), + BIL_PAIR (BIL_VAL (0x85ba3cb4), BIL_VAL (0xf7ee637f)), + BIL_PAIR (BIL_VAL (0x90383ab9), BIL_VAL (0x06385e59)), + BIL_PAIR (BIL_VAL (0xb5aec306), BIL_VAL (0xb1d9779d)), + BIL_PAIR (BIL_VAL (0x6e2571f6), BIL_VAL (0xcad6a76e)), + BIL_PAIR (BIL_VAL (0x7e0e2694), BIL_VAL (0xe4390b4e)), + BIL_PAIR (BIL_VAL (0x18a3c68e), BIL_VAL (0xc0a43e05)), + BIL_PAIR (BIL_VAL (0xee592324), BIL_VAL (0xf713bc8c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x8d120876), BIL_VAL (0x3ab6db01)), + BIL_PAIR (BIL_VAL (0x4398b588), BIL_VAL (0x59909529)), + BIL_PAIR (BIL_VAL (0x4f4f756f), BIL_VAL (0x7509165d)), + BIL_PAIR (BIL_VAL (0xc38299f0), BIL_VAL (0x0de0c7b4)), + BIL_PAIR (BIL_VAL (0x1a4ee5c2), BIL_VAL (0x27216c8a)), + BIL_PAIR (BIL_VAL (0x3fa4aa76), BIL_VAL (0x8cec3150)), + BIL_PAIR (BIL_VAL (0xd4b46d9e), BIL_VAL (0x16397fb3)), + BIL_PAIR (BIL_VAL (0x4974e450), BIL_VAL (0x87e5f47a)), + BIL_PAIR (BIL_VAL (0x26745210), BIL_VAL (0x87841381)), + BIL_PAIR (BIL_VAL (0x44168fbe), BIL_VAL (0x845619c0)), + BIL_PAIR (BIL_VAL (0x60bef830), BIL_VAL (0xb1488584)), + BIL_PAIR (BIL_VAL (0x5837f107), BIL_VAL (0xf65c309c)), + BIL_PAIR (BIL_VAL (0xe1750ba5), BIL_VAL (0xa4e2a6b5)), + BIL_PAIR (BIL_VAL (0x6eadae57), BIL_VAL (0xc5213587)), + BIL_PAIR (BIL_VAL (0x59182415), BIL_VAL (0x7d56ad8e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd80fa348), BIL_VAL (0x84e9d4c8)), + BIL_PAIR (BIL_VAL (0x51a90c89), BIL_VAL (0x260c204f)), + BIL_PAIR (BIL_VAL (0xd0747651), BIL_VAL (0x8020077f)), + BIL_PAIR (BIL_VAL (0x73b8bfd2), BIL_VAL (0x630e6ac9)), + BIL_PAIR (BIL_VAL (0x37c42093), BIL_VAL (0x470ff93e)), + BIL_PAIR (BIL_VAL (0x1416ac72), BIL_VAL (0x7d0f5160)), + BIL_PAIR (BIL_VAL (0xcb123ad4), BIL_VAL (0x0f41ca1e)), + BIL_PAIR (BIL_VAL (0x5d193030), BIL_VAL (0x41da373e)), + BIL_PAIR (BIL_VAL (0xc4aae7d2), BIL_VAL (0x7504522a)), + BIL_PAIR (BIL_VAL (0x70e753a7), BIL_VAL (0xd815da90)), + BIL_PAIR (BIL_VAL (0x567626d9), BIL_VAL (0xfcc26e85)), + BIL_PAIR (BIL_VAL (0x83fa929a), BIL_VAL (0xf30c4890)), + BIL_PAIR (BIL_VAL (0xac8c270a), BIL_VAL (0x4a8b4a39)), + BIL_PAIR (BIL_VAL (0x727f6b29), BIL_VAL (0xfc62fdee)), + BIL_PAIR (BIL_VAL (0x2dcbb962), BIL_VAL (0x58ee1cf7))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xdf7d4db0), BIL_VAL (0x55b214c4)), + BIL_PAIR (BIL_VAL (0x58b1f6e7), BIL_VAL (0xd068fa53)), + BIL_PAIR (BIL_VAL (0xf08572aa), BIL_VAL (0x0a81d57c)), + BIL_PAIR (BIL_VAL (0xf9b4f8f5), BIL_VAL (0x4d5de38f)), + BIL_PAIR (BIL_VAL (0x8c87ad8f), BIL_VAL (0x38069985)), + BIL_PAIR (BIL_VAL (0xb7fb846f), BIL_VAL (0x2541797c)), + BIL_PAIR (BIL_VAL (0xffc097c8), BIL_VAL (0x263bcb9d)), + BIL_PAIR (BIL_VAL (0x90264c1a), BIL_VAL (0xd665627b)), + BIL_PAIR (BIL_VAL (0x116b276b), BIL_VAL (0x82ac9bd7)), + BIL_PAIR (BIL_VAL (0xaded151c), BIL_VAL (0x6d5ea764)), + BIL_PAIR (BIL_VAL (0x5cf47735), BIL_VAL (0x8bea1718)), + BIL_PAIR (BIL_VAL (0xda97b544), BIL_VAL (0x9ed76940)), + BIL_PAIR (BIL_VAL (0x87c0bf23), BIL_VAL (0x51910718)), + BIL_PAIR (BIL_VAL (0xce4f2ac6), BIL_VAL (0x43ce3e01)), + BIL_PAIR (BIL_VAL (0xaf4a5cf2), BIL_VAL (0x3d903fbf))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x90c7f98b), BIL_VAL (0xc57047c1)), + BIL_PAIR (BIL_VAL (0xfad2a1f0), BIL_VAL (0xbcedb8b2)), + BIL_PAIR (BIL_VAL (0xaadd8035), BIL_VAL (0x7759156d)), + BIL_PAIR (BIL_VAL (0x94e403cb), BIL_VAL (0x2adc50bd)), + BIL_PAIR (BIL_VAL (0xed457333), BIL_VAL (0xf9aa1df8)), + BIL_PAIR (BIL_VAL (0x2d92e27a), BIL_VAL (0x247ec686)), + BIL_PAIR (BIL_VAL (0xdf9e7b90), BIL_VAL (0x04d7315b)), + BIL_PAIR (BIL_VAL (0xaf6af789), BIL_VAL (0xbf2b6b2e)), + BIL_PAIR (BIL_VAL (0x2bffd459), BIL_VAL (0x09566c37)), + BIL_PAIR (BIL_VAL (0xf7cc8ac2), BIL_VAL (0xc879b804)), + BIL_PAIR (BIL_VAL (0xdf5e297c), BIL_VAL (0x4f89cda4)), + BIL_PAIR (BIL_VAL (0x4e2b95d4), BIL_VAL (0x865acada)), + BIL_PAIR (BIL_VAL (0x5aa8c892), BIL_VAL (0xe4166ead)), + BIL_PAIR (BIL_VAL (0x39982bb5), BIL_VAL (0x589d9e5d)), + BIL_PAIR (BIL_VAL (0xadc9ac73), BIL_VAL (0x613812c1))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x0d1b6f54), BIL_VAL (0x8d5e27cf)), + BIL_PAIR (BIL_VAL (0x982fceeb), BIL_VAL (0xef0e57c3)), + BIL_PAIR (BIL_VAL (0xdcab2919), BIL_VAL (0x979f0cc6)), + BIL_PAIR (BIL_VAL (0x352db417), BIL_VAL (0xee97b638)), + BIL_PAIR (BIL_VAL (0xa554f984), BIL_VAL (0xb764dc5a)), + BIL_PAIR (BIL_VAL (0xede53d28), BIL_VAL (0x165e991d)), + BIL_PAIR (BIL_VAL (0x1c41ed93), BIL_VAL (0x9c1b653a)), + BIL_PAIR (BIL_VAL (0x0fa25a78), BIL_VAL (0x2a9d1556)), + BIL_PAIR (BIL_VAL (0x9bc6f1ac), BIL_VAL (0x47b9f1f2)), + BIL_PAIR (BIL_VAL (0x04ebad73), BIL_VAL (0x591f6bb3)), + BIL_PAIR (BIL_VAL (0xcbd401e5), BIL_VAL (0x68192c9c)), + BIL_PAIR (BIL_VAL (0x022d13e1), BIL_VAL (0x22d5c74b)), + BIL_PAIR (BIL_VAL (0x0b55ca3e), BIL_VAL (0x9ebcf268)), + BIL_PAIR (BIL_VAL (0x7c5201e9), BIL_VAL (0x2c7170be)), + BIL_PAIR (BIL_VAL (0x44e462c8), BIL_VAL (0xbd5aeb63))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x4571dcf0), BIL_VAL (0x9f2f7632)), + BIL_PAIR (BIL_VAL (0x6c63341c), BIL_VAL (0xaea35317)), + BIL_PAIR (BIL_VAL (0xa4d3fd0b), BIL_VAL (0x2f44ed15)), + BIL_PAIR (BIL_VAL (0x7e221d7b), BIL_VAL (0xe2931547)), + BIL_PAIR (BIL_VAL (0xd3a202ac), BIL_VAL (0xa20cbc75)), + BIL_PAIR (BIL_VAL (0xeda15588), BIL_VAL (0x845801ac)), + BIL_PAIR (BIL_VAL (0xc51d7ce8), BIL_VAL (0x757059be)), + BIL_PAIR (BIL_VAL (0xb608240e), BIL_VAL (0xf245c7d8)), + BIL_PAIR (BIL_VAL (0x72468e40), BIL_VAL (0x8d9c1018)), + BIL_PAIR (BIL_VAL (0x27f45032), BIL_VAL (0x37a8b2f8)), + BIL_PAIR (BIL_VAL (0x0168be7b), BIL_VAL (0x1244ca1b)), + BIL_PAIR (BIL_VAL (0xfb4c275f), BIL_VAL (0x176617b6)), + BIL_PAIR (BIL_VAL (0x13bb2d31), BIL_VAL (0x1c0f6c53)), + BIL_PAIR (BIL_VAL (0xfe90ac81), BIL_VAL (0x99bbb667)), + BIL_PAIR (BIL_VAL (0x29b04877), BIL_VAL (0xdd494401)) + /* And implicit 3840 0 bits. */)), + /* 4096 */ + BIL_SET10 (BIL_SET14 (BIL_PAIR (BIL_VAL (0x62), BIL_VAL (0x30290145)), + BIL_PAIR (BIL_VAL (0x104bcd64), BIL_VAL (0xa60a9fc0)), + BIL_PAIR (BIL_VAL (0x25254932), BIL_VAL (0xbb0fd922)), + BIL_PAIR (BIL_VAL (0x271133ee), BIL_VAL (0xae7be4a2)), + BIL_PAIR (BIL_VAL (0xf9151fff), BIL_VAL (0xf868e970)), + BIL_PAIR (BIL_VAL (0xc234d8f5), BIL_VAL (0x1c5563f4)), + BIL_PAIR (BIL_VAL (0x8bd2b496), BIL_VAL (0xd868b275)), + BIL_PAIR (BIL_VAL (0x18ae4240), BIL_VAL (0x4964046f)), + BIL_PAIR (BIL_VAL (0x87cc1d21), BIL_VAL (0x3d5d0b54)), + BIL_PAIR (BIL_VAL (0xf74eb928), BIL_VAL (0x1bb6c6e4)), + BIL_PAIR (BIL_VAL (0x35fcb457), BIL_VAL (0x200c03a5)), + BIL_PAIR (BIL_VAL (0xbca35f77), BIL_VAL (0x92959da2)), + BIL_PAIR (BIL_VAL (0x2e8d623b), BIL_VAL (0x3e7b21e2)), + BIL_PAIR (BIL_VAL (0xb6100fab), BIL_VAL (0x123cd8a1))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xa75409f2), BIL_VAL (0x3956d4b9)), + BIL_PAIR (BIL_VAL (0x41c759f8), BIL_VAL (0x3557de06)), + BIL_PAIR (BIL_VAL (0x8edd2d00), BIL_VAL (0xbcdd9d4a)), + BIL_PAIR (BIL_VAL (0x52ec8721), BIL_VAL (0xac7867f9)), + BIL_PAIR (BIL_VAL (0xe974996f), BIL_VAL (0xb03d7ecd)), + BIL_PAIR (BIL_VAL (0x2fdc6349), BIL_VAL (0xaf06940d)), + BIL_PAIR (BIL_VAL (0x48741a6c), BIL_VAL (0x2ed4684e)), + BIL_PAIR (BIL_VAL (0x5ab8d9c7), BIL_VAL (0xbd7991dc)), + BIL_PAIR (BIL_VAL (0x03b4f63b), BIL_VAL (0x8afd6b25)), + BIL_PAIR (BIL_VAL (0xff66e42c), BIL_VAL (0xaeee333b)), + BIL_PAIR (BIL_VAL (0x7000a519), BIL_VAL (0x87ec7038)), + BIL_PAIR (BIL_VAL (0xaec29e6e), BIL_VAL (0xe8cac982)), + BIL_PAIR (BIL_VAL (0xa4ba4744), BIL_VAL (0x0496fcbe)), + BIL_PAIR (BIL_VAL (0x00d313d5), BIL_VAL (0x84e857fd)), + BIL_PAIR (BIL_VAL (0x214495bb), BIL_VAL (0xdf373f41))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xfd86fe49), BIL_VAL (0xb70a5c7d)), + BIL_PAIR (BIL_VAL (0x2b17e0b2), BIL_VAL (0x544f10cd)), + BIL_PAIR (BIL_VAL (0x4d8bfa89), BIL_VAL (0xd0d73df2)), + BIL_PAIR (BIL_VAL (0x9d0176cc), BIL_VAL (0xa7c234f4)), + BIL_PAIR (BIL_VAL (0xe6d27671), BIL_VAL (0x13fd01c8)), + BIL_PAIR (BIL_VAL (0xc1a08a13), BIL_VAL (0x8c4ef804)), + BIL_PAIR (BIL_VAL (0x56c02d9a), BIL_VAL (0x0ff4f1d4)), + BIL_PAIR (BIL_VAL (0xe3e51cb9), BIL_VAL (0x25585832)), + BIL_PAIR (BIL_VAL (0x5ed8d239), BIL_VAL (0x9faddd9e)), + BIL_PAIR (BIL_VAL (0x9985a2df), BIL_VAL (0x904ff6bf)), + BIL_PAIR (BIL_VAL (0x5c4f2ef0), BIL_VAL (0x650ebc69)), + BIL_PAIR (BIL_VAL (0x2c5508c2), BIL_VAL (0xcbd66670)), + BIL_PAIR (BIL_VAL (0x97aced8e), BIL_VAL (0x437b3d7f)), + BIL_PAIR (BIL_VAL (0xe03b2b63), BIL_VAL (0x41a4c954)), + BIL_PAIR (BIL_VAL (0x108b89bc), BIL_VAL (0x108f19ad))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe5b53345), BIL_VAL (0x8e0dd75a)), + BIL_PAIR (BIL_VAL (0x53400d03), BIL_VAL (0x11953407)), + BIL_PAIR (BIL_VAL (0x4e89541b), BIL_VAL (0xae9641fd)), + BIL_PAIR (BIL_VAL (0xd6266a3f), BIL_VAL (0xdcbf7789)), + BIL_PAIR (BIL_VAL (0x00fc509b), BIL_VAL (0xa674343d)), + BIL_PAIR (BIL_VAL (0xd6769f3b), BIL_VAL (0x72b882e7)), + BIL_PAIR (BIL_VAL (0x282566fb), BIL_VAL (0xc6cc3f8d)), + BIL_PAIR (BIL_VAL (0x6b0dd9bc), BIL_VAL (0x96119b31)), + BIL_PAIR (BIL_VAL (0xa96ddeff), BIL_VAL (0x35e836b5)), + BIL_PAIR (BIL_VAL (0xd298f999), BIL_VAL (0x4b8c9091)), + BIL_PAIR (BIL_VAL (0x8e7b9a73), BIL_VAL (0x49126080)), + BIL_PAIR (BIL_VAL (0x6f233b7c), BIL_VAL (0x94ab6feb)), + BIL_PAIR (BIL_VAL (0xa2ebd6c1), BIL_VAL (0xd9960e2d)), + BIL_PAIR (BIL_VAL (0x73a130d8), BIL_VAL (0x4c4a74fd)), + BIL_PAIR (BIL_VAL (0xe9ce4724), BIL_VAL (0xed5bf546))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xa03f40a8), BIL_VAL (0xfb126ab1)), + BIL_PAIR (BIL_VAL (0xc32da383), BIL_VAL (0x38eb3acc)), + BIL_PAIR (BIL_VAL (0x1a67778c), BIL_VAL (0xfbe8b12a)), + BIL_PAIR (BIL_VAL (0xcf1b2350), BIL_VAL (0x4dcd6cd9)), + BIL_PAIR (BIL_VAL (0x95aca6a8), BIL_VAL (0xb492ed8a)), + BIL_PAIR (BIL_VAL (0xa19adb95), BIL_VAL (0x48497187)), + BIL_PAIR (BIL_VAL (0x0239f4ce), BIL_VAL (0xa6e9cfda)), + BIL_PAIR (BIL_VAL (0x20c33857), BIL_VAL (0xb32c450c)), + BIL_PAIR (BIL_VAL (0x3fecb534), BIL_VAL (0xb71bd1a4)), + BIL_PAIR (BIL_VAL (0x5b060904), BIL_VAL (0x788f6e50)), + BIL_PAIR (BIL_VAL (0xfe78d682), BIL_VAL (0x3613c850)), + BIL_PAIR (BIL_VAL (0x9ee3352c), BIL_VAL (0x90ca19cf)), + BIL_PAIR (BIL_VAL (0xe90afb77), BIL_VAL (0x9eea37c8)), + BIL_PAIR (BIL_VAL (0xab8db59a), BIL_VAL (0x0a80627c)), + BIL_PAIR (BIL_VAL (0xe41d3cc4), BIL_VAL (0x25971d58))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2dfe6d97), BIL_VAL (0xee63302b)), + BIL_PAIR (BIL_VAL (0x8e13e25f), BIL_VAL (0xeeaf19e6)), + BIL_PAIR (BIL_VAL (0x3d326a7e), BIL_VAL (0xb6d1c7bf)), + BIL_PAIR (BIL_VAL (0x2608c4cf), BIL_VAL (0x1cc939c1)), + BIL_PAIR (BIL_VAL (0x307641d9), BIL_VAL (0xb2c39497)), + BIL_PAIR (BIL_VAL (0xa8fcd8e0), BIL_VAL (0xcd9e8d7c)), + BIL_PAIR (BIL_VAL (0x3172826a), BIL_VAL (0xc9df13cb)), + BIL_PAIR (BIL_VAL (0x3d04e8d2), BIL_VAL (0xfca26a9f)), + BIL_PAIR (BIL_VAL (0xf7d8b57e), BIL_VAL (0x27ecf57b)), + BIL_PAIR (BIL_VAL (0xbb9373f4), BIL_VAL (0x6fee7aab)), + BIL_PAIR (BIL_VAL (0x86deb3f0), BIL_VAL (0x78787e2a)), + BIL_PAIR (BIL_VAL (0xb608b895), BIL_VAL (0x72dac789)), + BIL_PAIR (BIL_VAL (0xbf627ede), BIL_VAL (0x440b3f25)), + BIL_PAIR (BIL_VAL (0x1f2b2322), BIL_VAL (0xab312bb9)), + BIL_PAIR (BIL_VAL (0x5893d4b8), BIL_VAL (0x50be10e0))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2d240820), BIL_VAL (0x6e7bb827)), + BIL_PAIR (BIL_VAL (0x2181327e), BIL_VAL (0xc8fa2e8a)), + BIL_PAIR (BIL_VAL (0x37a2d439), BIL_VAL (0x0caea134)), + BIL_PAIR (BIL_VAL (0xc53c0adf), BIL_VAL (0x9462ea75)), + BIL_PAIR (BIL_VAL (0xecf9b5d0), BIL_VAL (0xed4d542d)), + BIL_PAIR (BIL_VAL (0xc19e1faf), BIL_VAL (0x7a872e74)), + BIL_PAIR (BIL_VAL (0xf984d83e), BIL_VAL (0x2dd8d925)), + BIL_PAIR (BIL_VAL (0x80152f18), BIL_VAL (0x390a2b29)), + BIL_PAIR (BIL_VAL (0x5138753d), BIL_VAL (0x1fa8fd5d)), + BIL_PAIR (BIL_VAL (0x59c89f1b), BIL_VAL (0x095edc16)), + BIL_PAIR (BIL_VAL (0x2e2690f3), BIL_VAL (0xcd8f62ff)), + BIL_PAIR (BIL_VAL (0x42923bbd), BIL_VAL (0x87d1cde8)), + BIL_PAIR (BIL_VAL (0x40b464a0), BIL_VAL (0xe137d5e9)), + BIL_PAIR (BIL_VAL (0xa4eb8f8c), BIL_VAL (0xde35c88b)), + BIL_PAIR (BIL_VAL (0xaf63b712), BIL_VAL (0x92baf1de))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xeca19beb), BIL_VAL (0x77fb8af6)), + BIL_PAIR (BIL_VAL (0x176ca776), BIL_VAL (0x743074fa)), + BIL_PAIR (BIL_VAL (0x7021b97a), BIL_VAL (0x1e0a6817)), + BIL_PAIR (BIL_VAL (0x3c20ee69), BIL_VAL (0xe79dadf7)), + BIL_PAIR (BIL_VAL (0xeb83cadb), BIL_VAL (0xdfea5242)), + BIL_PAIR (BIL_VAL (0xa8329761), BIL_VAL (0xffe06205)), + BIL_PAIR (BIL_VAL (0x3ccb5b92), BIL_VAL (0xac50b9c1)), + BIL_PAIR (BIL_VAL (0x75a697b2), BIL_VAL (0xb5341743)), + BIL_PAIR (BIL_VAL (0xc994a450), BIL_VAL (0x3b9af26b)), + BIL_PAIR (BIL_VAL (0x398c6fed), BIL_VAL (0x037d19ee)), + BIL_PAIR (BIL_VAL (0xf4090ee8), BIL_VAL (0xae0725b1)), + BIL_PAIR (BIL_VAL (0x655fec30), BIL_VAL (0x3297cd0c)), + BIL_PAIR (BIL_VAL (0x2bd9cc11), BIL_VAL (0x10c4e996)), + BIL_PAIR (BIL_VAL (0x8738b909), BIL_VAL (0x454eb2a0)), + BIL_PAIR (BIL_VAL (0xdcfe388f), BIL_VAL (0x15b8c898))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd3967a1b), BIL_VAL (0x6dc3a5b4)), + BIL_PAIR (BIL_VAL (0x811a4f04), BIL_VAL (0xf3618ac0)), + BIL_PAIR (BIL_VAL (0x280f4d32), BIL_VAL (0x95a842bc)), + BIL_PAIR (BIL_VAL (0xfd82373a), BIL_VAL (0x3f8ec72a)), + BIL_PAIR (BIL_VAL (0xf2acd507), BIL_VAL (0x1a8309cb)), + BIL_PAIR (BIL_VAL (0x2130504d), BIL_VAL (0xd97d9556)), + BIL_PAIR (BIL_VAL (0xa1ebcad7), BIL_VAL (0x947e0d0e)), + BIL_PAIR (BIL_VAL (0x30c7ae41), BIL_VAL (0xeb659fb8)), + BIL_PAIR (BIL_VAL (0x78f06181), BIL_VAL (0x4f6cea9c)), + BIL_PAIR (BIL_VAL (0x441c2d47), BIL_VAL (0x3bfe167b)), + BIL_PAIR (BIL_VAL (0x1a1c304e), BIL_VAL (0x7613b224)), + BIL_PAIR (BIL_VAL (0x54ab9c41), BIL_VAL (0xff0b0905)), + BIL_PAIR (BIL_VAL (0xbc131761), BIL_VAL (0x68dde6d4)), + BIL_PAIR (BIL_VAL (0x88052f8c), BIL_VAL (0xf8169c84)), + BIL_PAIR (BIL_VAL (0xcb4bf982), BIL_VAL (0x87009701))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2c234811), BIL_VAL (0x61959127)), + BIL_PAIR (BIL_VAL (0x142e0e80), BIL_VAL (0xcab3e6d7)), + BIL_PAIR (BIL_VAL (0xaf6a2574), BIL_VAL (0x3dbeabcd)), + BIL_PAIR (BIL_VAL (0x0f237f1a), BIL_VAL (0x016b67b2)), + BIL_PAIR (BIL_VAL (0xc2dfae78), BIL_VAL (0xe341be10)), + BIL_PAIR (BIL_VAL (0xd6bfdf75), BIL_VAL (0x9b8ba1e8)), + BIL_PAIR (BIL_VAL (0x1d1f4cce), BIL_VAL (0x7c4823da)), + BIL_PAIR (BIL_VAL (0x7e1e7c34), BIL_VAL (0xc0591cc2)), + BIL_PAIR (BIL_VAL (0x45155e93), BIL_VAL (0xb86ae5be)), + BIL_PAIR (BIL_VAL (0x806c0ed3), BIL_VAL (0xf0da6146)), + BIL_PAIR (BIL_VAL (0xe599574e), BIL_VAL (0xfb29b172)), + BIL_PAIR (BIL_VAL (0x506be829), BIL_VAL (0x13b1bb51)), + BIL_PAIR (BIL_VAL (0x54e05154), BIL_VAL (0xef084117)), + BIL_PAIR (BIL_VAL (0xf89a1e90), BIL_VAL (0x8efe7ae7)), + BIL_PAIR (BIL_VAL (0xd4724e8d), BIL_VAL (0x2a67c001)) + /* And implicit 4096 0 bits. */)), + /* 4352 */ + BIL_SET11 (BIL_SET8 (BIL_PAIR (BIL_VAL (0x20b254b), BIL_VAL (0x8def8472)), + BIL_PAIR (BIL_VAL (0xd1b9b04a), BIL_VAL (0xa80ae687)), + BIL_PAIR (BIL_VAL (0xb14e159e), BIL_VAL (0xfef82c45)), + BIL_PAIR (BIL_VAL (0xe9dca4e7), BIL_VAL (0xdccda7bf)), + BIL_PAIR (BIL_VAL (0x094c2e3e), BIL_VAL (0xc0a68bef)), + BIL_PAIR (BIL_VAL (0x5fb6084f), BIL_VAL (0x869034fe)), + BIL_PAIR (BIL_VAL (0x9e692e62), BIL_VAL (0xbae03766)), + BIL_PAIR (BIL_VAL (0xfe3cbc8f), BIL_VAL (0x65db0482))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe2dd0349), BIL_VAL (0xa42e47ff)), + BIL_PAIR (BIL_VAL (0x3643bc35), BIL_VAL (0xfd778b48)), + BIL_PAIR (BIL_VAL (0x8adf90ef), BIL_VAL (0xcf17eed3)), + BIL_PAIR (BIL_VAL (0x83386f2a), BIL_VAL (0xd0729406)), + BIL_PAIR (BIL_VAL (0x3a34a75e), BIL_VAL (0xba4aa84d)), + BIL_PAIR (BIL_VAL (0xf7165cb0), BIL_VAL (0x11d91826)), + BIL_PAIR (BIL_VAL (0xa681b9da), BIL_VAL (0x24f4233a)), + BIL_PAIR (BIL_VAL (0x5c60c316), BIL_VAL (0xbd172b82)), + BIL_PAIR (BIL_VAL (0xd22e4e9d), BIL_VAL (0xbff9958d)), + BIL_PAIR (BIL_VAL (0xa2da9193), BIL_VAL (0x8efcb8f0)), + BIL_PAIR (BIL_VAL (0xa61c42f8), BIL_VAL (0x49ff35ca)), + BIL_PAIR (BIL_VAL (0x7df13330), BIL_VAL (0xf1201c64)), + BIL_PAIR (BIL_VAL (0x0a2ff3d2), BIL_VAL (0x101fed53)), + BIL_PAIR (BIL_VAL (0x6c6960f3), BIL_VAL (0xcb0b87a7)), + BIL_PAIR (BIL_VAL (0x0eb1abfe), BIL_VAL (0x9817590d))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x0c72d281), BIL_VAL (0x5378f699)), + BIL_PAIR (BIL_VAL (0x44f02029), BIL_VAL (0xb0f5eba9)), + BIL_PAIR (BIL_VAL (0xa6308b17), BIL_VAL (0xb15c398a)), + BIL_PAIR (BIL_VAL (0x0c03f038), BIL_VAL (0x6d00d4a0)), + BIL_PAIR (BIL_VAL (0x5247571c), BIL_VAL (0x291d0121)), + BIL_PAIR (BIL_VAL (0xe96dd907), BIL_VAL (0xbd390957)), + BIL_PAIR (BIL_VAL (0x75c1464e), BIL_VAL (0x1d7cc220)), + BIL_PAIR (BIL_VAL (0xf7d193d9), BIL_VAL (0xc0291178)), + BIL_PAIR (BIL_VAL (0xd3bd0afb), BIL_VAL (0x759f7e89)), + BIL_PAIR (BIL_VAL (0x04bec35d), BIL_VAL (0xb1788cfb)), + BIL_PAIR (BIL_VAL (0x94e27abe), BIL_VAL (0x7d249789)), + BIL_PAIR (BIL_VAL (0x3c41c1ee), BIL_VAL (0x5905c28d)), + BIL_PAIR (BIL_VAL (0x89a24a20), BIL_VAL (0x77612f46)), + BIL_PAIR (BIL_VAL (0x3ff725d2), BIL_VAL (0xe6fadc69)), + BIL_PAIR (BIL_VAL (0x97ec72c0), BIL_VAL (0xf95a6e8b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7aa5b391), BIL_VAL (0x4732c0eb)), + BIL_PAIR (BIL_VAL (0x0970275e), BIL_VAL (0x40d72bc0)), + BIL_PAIR (BIL_VAL (0x06c4f380), BIL_VAL (0xad25ea9f)), + BIL_PAIR (BIL_VAL (0x35c1b28f), BIL_VAL (0x67c16135)), + BIL_PAIR (BIL_VAL (0x03368728), BIL_VAL (0x1a353447)), + BIL_PAIR (BIL_VAL (0x992b6b95), BIL_VAL (0x94c7caf3)), + BIL_PAIR (BIL_VAL (0xf5daf77e), BIL_VAL (0x54774e0b)), + BIL_PAIR (BIL_VAL (0xeb41da22), BIL_VAL (0xcd528193)), + BIL_PAIR (BIL_VAL (0x68818a83), BIL_VAL (0x5317befd)), + BIL_PAIR (BIL_VAL (0x58bc0ee8), BIL_VAL (0xc9d03df6)), + BIL_PAIR (BIL_VAL (0xcc3cbb30), BIL_VAL (0x73abd935)), + BIL_PAIR (BIL_VAL (0xcd458429), BIL_VAL (0xe5f84f1c)), + BIL_PAIR (BIL_VAL (0x946301ed), BIL_VAL (0xfd0ce211)), + BIL_PAIR (BIL_VAL (0x81e43a55), BIL_VAL (0x863fbf2c)), + BIL_PAIR (BIL_VAL (0x865a490d), BIL_VAL (0xf8a2f82b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7df80102), BIL_VAL (0x5ce33571)), + BIL_PAIR (BIL_VAL (0xf523080a), BIL_VAL (0xf3ac631f)), + BIL_PAIR (BIL_VAL (0xed97c788), BIL_VAL (0xe6d734f6)), + BIL_PAIR (BIL_VAL (0x5c0926a5), BIL_VAL (0xfa45c44b)), + BIL_PAIR (BIL_VAL (0x6129a223), BIL_VAL (0xebdd4d18)), + BIL_PAIR (BIL_VAL (0x4d2be365), BIL_VAL (0xb150997e)), + BIL_PAIR (BIL_VAL (0x307b4863), BIL_VAL (0x1ec88f00)), + BIL_PAIR (BIL_VAL (0xdf6a61e9), BIL_VAL (0x59c5ca61)), + BIL_PAIR (BIL_VAL (0xe857856f), BIL_VAL (0xba4be52b)), + BIL_PAIR (BIL_VAL (0xb3d5c00d), BIL_VAL (0x1f34e5ec)), + BIL_PAIR (BIL_VAL (0x0989e604), BIL_VAL (0xe6a2ee6a)), + BIL_PAIR (BIL_VAL (0x722702c9), BIL_VAL (0x38b002f0)), + BIL_PAIR (BIL_VAL (0xd6fcacee), BIL_VAL (0x916335c3)), + BIL_PAIR (BIL_VAL (0xfcb87856), BIL_VAL (0xce8b906b)), + BIL_PAIR (BIL_VAL (0xfc29e722), BIL_VAL (0x4a586b35))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf2525112), BIL_VAL (0x596e1d98)), + BIL_PAIR (BIL_VAL (0x065bfeda), BIL_VAL (0x7dfe7bfd)), + BIL_PAIR (BIL_VAL (0xb1b6c4a1), BIL_VAL (0x05feafb5)), + BIL_PAIR (BIL_VAL (0x75da43b3), BIL_VAL (0xe5790dc4)), + BIL_PAIR (BIL_VAL (0x4091fdf7), BIL_VAL (0xc97467ad)), + BIL_PAIR (BIL_VAL (0x75850c21), BIL_VAL (0x1ca075f8)), + BIL_PAIR (BIL_VAL (0xe1604c6e), BIL_VAL (0x19349a2c)), + BIL_PAIR (BIL_VAL (0x4c854dfc), BIL_VAL (0x5558a281)), + BIL_PAIR (BIL_VAL (0x2dd05c45), BIL_VAL (0x5b257d1d)), + BIL_PAIR (BIL_VAL (0xd50ab79f), BIL_VAL (0x82c04dfc)), + BIL_PAIR (BIL_VAL (0xb08f76ae), BIL_VAL (0x1080c34e)), + BIL_PAIR (BIL_VAL (0x48567ad5), BIL_VAL (0xc0739155)), + BIL_PAIR (BIL_VAL (0xed70ceef), BIL_VAL (0xc91da846)), + BIL_PAIR (BIL_VAL (0xb30b4138), BIL_VAL (0xf915402a)), + BIL_PAIR (BIL_VAL (0xbb833171), BIL_VAL (0x8b967426))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x68d65761), BIL_VAL (0x0b837fa5)), + BIL_PAIR (BIL_VAL (0x4c56bad6), BIL_VAL (0x6d68d4fe)), + BIL_PAIR (BIL_VAL (0x81adec55), BIL_VAL (0xadbb8022)), + BIL_PAIR (BIL_VAL (0x49c90bc4), BIL_VAL (0x94c84726)), + BIL_PAIR (BIL_VAL (0xe579f32c), BIL_VAL (0x0a5e8623)), + BIL_PAIR (BIL_VAL (0x2b34d3f6), BIL_VAL (0xcf444ec5)), + BIL_PAIR (BIL_VAL (0xe8d82754), BIL_VAL (0xd63da459)), + BIL_PAIR (BIL_VAL (0x8c394447), BIL_VAL (0x2b38df2c)), + BIL_PAIR (BIL_VAL (0xc73a3fc8), BIL_VAL (0xe6de1525)), + BIL_PAIR (BIL_VAL (0x16aa227e), BIL_VAL (0x28c76eac)), + BIL_PAIR (BIL_VAL (0x649b18d8), BIL_VAL (0xc0123bfb)), + BIL_PAIR (BIL_VAL (0xc76f2279), BIL_VAL (0xf9aa5662)), + BIL_PAIR (BIL_VAL (0x29f3987b), BIL_VAL (0x303be91c)), + BIL_PAIR (BIL_VAL (0x173cd800), BIL_VAL (0x8f8d88d3)), + BIL_PAIR (BIL_VAL (0x95eb91bb), BIL_VAL (0x4b1a9444))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x0df9d84d), BIL_VAL (0xf387013e)), + BIL_PAIR (BIL_VAL (0x7e26df67), BIL_VAL (0x993c92d8)), + BIL_PAIR (BIL_VAL (0x0271ca2b), BIL_VAL (0xfa05e674)), + BIL_PAIR (BIL_VAL (0x5afeaa5e), BIL_VAL (0x14e0c928)), + BIL_PAIR (BIL_VAL (0xa93472a7), BIL_VAL (0xf5b62ff4)), + BIL_PAIR (BIL_VAL (0x2cb4ff95), BIL_VAL (0xd4e56f14)), + BIL_PAIR (BIL_VAL (0xbca0763d), BIL_VAL (0xf5dab395)), + BIL_PAIR (BIL_VAL (0xfeb40da4), BIL_VAL (0xdc20e48e)), + BIL_PAIR (BIL_VAL (0xe3f904fb), BIL_VAL (0x7466c446)), + BIL_PAIR (BIL_VAL (0x24ac37f8), BIL_VAL (0x6e272792)), + BIL_PAIR (BIL_VAL (0x0411e082), BIL_VAL (0x7a5499f9)), + BIL_PAIR (BIL_VAL (0x82588f8f), BIL_VAL (0x877b368c)), + BIL_PAIR (BIL_VAL (0x48ac2481), BIL_VAL (0x7cf91b01)), + BIL_PAIR (BIL_VAL (0x96325672), BIL_VAL (0x015bd643)), + BIL_PAIR (BIL_VAL (0x9ead1f72), BIL_VAL (0xb992ef04))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd4ecd130), BIL_VAL (0x2cf77336)), + BIL_PAIR (BIL_VAL (0x5c07023a), BIL_VAL (0x56cc8e8d)), + BIL_PAIR (BIL_VAL (0x06a492be), BIL_VAL (0x64112006)), + BIL_PAIR (BIL_VAL (0xcbbce33d), BIL_VAL (0x63a56ffd)), + BIL_PAIR (BIL_VAL (0xa47e37e6), BIL_VAL (0x700ababa)), + BIL_PAIR (BIL_VAL (0x5b74a9de), BIL_VAL (0x38afbc3f)), + BIL_PAIR (BIL_VAL (0xd48c5c21), BIL_VAL (0x74d3d0f6)), + BIL_PAIR (BIL_VAL (0x601ee10a), BIL_VAL (0xa82f1316)), + BIL_PAIR (BIL_VAL (0xfe877eef), BIL_VAL (0x5ad75abf)), + BIL_PAIR (BIL_VAL (0x727b0467), BIL_VAL (0x3a347ee3)), + BIL_PAIR (BIL_VAL (0x19cef9ea), BIL_VAL (0xdefb258e)), + BIL_PAIR (BIL_VAL (0xbf330136), BIL_VAL (0xa79510f3)), + BIL_PAIR (BIL_VAL (0x270fd78d), BIL_VAL (0x38f89486)), + BIL_PAIR (BIL_VAL (0x64118f6d), BIL_VAL (0x9f31ca69)), + BIL_PAIR (BIL_VAL (0x802e2ed8), BIL_VAL (0xf584b1f4))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7b797e06), BIL_VAL (0xceb41fb8)), + BIL_PAIR (BIL_VAL (0xfbf19451), BIL_VAL (0xa7c721d3)), + BIL_PAIR (BIL_VAL (0x9b42395a), BIL_VAL (0x7ec1fe8e)), + BIL_PAIR (BIL_VAL (0x83000e87), BIL_VAL (0x67f06772)), + BIL_PAIR (BIL_VAL (0x8b565616), BIL_VAL (0x8cf2e894)), + BIL_PAIR (BIL_VAL (0xdd6fe737), BIL_VAL (0xd495d47f)), + BIL_PAIR (BIL_VAL (0x35b37bd8), BIL_VAL (0x8b17181f)), + BIL_PAIR (BIL_VAL (0x017cbd29), BIL_VAL (0xbbbbcdf7)), + BIL_PAIR (BIL_VAL (0x304710fa), BIL_VAL (0x9732a682)), + BIL_PAIR (BIL_VAL (0x1e318c76), BIL_VAL (0x7871b779)), + BIL_PAIR (BIL_VAL (0xc40f140e), BIL_VAL (0xac731d3c)), + BIL_PAIR (BIL_VAL (0xe8275360), BIL_VAL (0x7e68951a)), + BIL_PAIR (BIL_VAL (0xe9e82809), BIL_VAL (0x6c6a7d57)), + BIL_PAIR (BIL_VAL (0x3d7c8a35), BIL_VAL (0x54cffad2)), + BIL_PAIR (BIL_VAL (0x7220e4d6), BIL_VAL (0x6a04c76e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x15babe10), BIL_VAL (0xc26d400c)), + BIL_PAIR (BIL_VAL (0x8498d9fa), BIL_VAL (0xd1728acf)), + BIL_PAIR (BIL_VAL (0x4e09b5c3), BIL_VAL (0x20445633)), + BIL_PAIR (BIL_VAL (0xcdf4aa4d), BIL_VAL (0xafbbe800)), + BIL_PAIR (BIL_VAL (0xde679315), BIL_VAL (0x55472b08)), + BIL_PAIR (BIL_VAL (0xc050359f), BIL_VAL (0x891fb025)), + BIL_PAIR (BIL_VAL (0x879a9da8), BIL_VAL (0xe3ab7d4e)), + BIL_PAIR (BIL_VAL (0x0f9464d8), BIL_VAL (0x9d0ae0c3)), + BIL_PAIR (BIL_VAL (0xe8cbd7b6), BIL_VAL (0xe9eac4c8)), + BIL_PAIR (BIL_VAL (0x80eb8014), BIL_VAL (0x654c6730)), + BIL_PAIR (BIL_VAL (0x611b945d), BIL_VAL (0x8d3f1379)), + BIL_PAIR (BIL_VAL (0x7a0a5c7c), BIL_VAL (0xd00b1cd5)), + BIL_PAIR (BIL_VAL (0x35c8fa6e), BIL_VAL (0x09740c7a)), + BIL_PAIR (BIL_VAL (0xdc7c6428), BIL_VAL (0xc98141fd)), + BIL_PAIR (BIL_VAL (0xe8feaf17), BIL_VAL (0x83963c01)) + /* And implicit 4352 0 bits. */)), + /* 4608 */ + BIL_SET12 (BIL_SET3 (BIL_VAL (0xae3), + BIL_PAIR (BIL_VAL (0x511626ed), BIL_VAL (0x559f07ef)), + BIL_PAIR (BIL_VAL (0x5f8c1b3a), BIL_VAL (0x0771c5a4))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x3d43795f), BIL_VAL (0x92ea268d)), + BIL_PAIR (BIL_VAL (0x759e7a3f), BIL_VAL (0xff997806)), + BIL_PAIR (BIL_VAL (0x7c40f1c6), BIL_VAL (0x92f3d22e)), + BIL_PAIR (BIL_VAL (0x6c855b8c), BIL_VAL (0x44fbbf53)), + BIL_PAIR (BIL_VAL (0x497c7ef9), BIL_VAL (0x17890db0)), + BIL_PAIR (BIL_VAL (0x84a6784d), BIL_VAL (0xbb915fa0)), + BIL_PAIR (BIL_VAL (0xe317da89), BIL_VAL (0x86604f59)), + BIL_PAIR (BIL_VAL (0xbbf9146b), BIL_VAL (0x89ef815a)), + BIL_PAIR (BIL_VAL (0xe8a7a780), BIL_VAL (0x29e7136f)), + BIL_PAIR (BIL_VAL (0xe7526a95), BIL_VAL (0xc38cf143)), + BIL_PAIR (BIL_VAL (0xf86589c9), BIL_VAL (0x4740b173)), + BIL_PAIR (BIL_VAL (0x1b7400e5), BIL_VAL (0x0ab5e90b)), + BIL_PAIR (BIL_VAL (0x060228ac), BIL_VAL (0x157cd1e6)), + BIL_PAIR (BIL_VAL (0x1c60443e), BIL_VAL (0x14730f0d)), + BIL_PAIR (BIL_VAL (0x041d84d2), BIL_VAL (0x06c82add))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x84fa5359), BIL_VAL (0xb2f464dd)), + BIL_PAIR (BIL_VAL (0xac6b4247), BIL_VAL (0x992ac4cc)), + BIL_PAIR (BIL_VAL (0x01e40d01), BIL_VAL (0x5945d33d)), + BIL_PAIR (BIL_VAL (0xc387f7d8), BIL_VAL (0x09248432)), + BIL_PAIR (BIL_VAL (0x77d84f29), BIL_VAL (0xe1b6d481)), + BIL_PAIR (BIL_VAL (0xa693d350), BIL_VAL (0xd8ab92d7)), + BIL_PAIR (BIL_VAL (0x52783498), BIL_VAL (0x4fedbd75)), + BIL_PAIR (BIL_VAL (0xe9608e9a), BIL_VAL (0xa3c0a1e9)), + BIL_PAIR (BIL_VAL (0xacf5da42), BIL_VAL (0x0ac6e6c8)), + BIL_PAIR (BIL_VAL (0xbec90871), BIL_VAL (0x90719715)), + BIL_PAIR (BIL_VAL (0x0b946029), BIL_VAL (0x3c90b1d2)), + BIL_PAIR (BIL_VAL (0xc8473eef), BIL_VAL (0xa10e2427)), + BIL_PAIR (BIL_VAL (0x24c08387), BIL_VAL (0x4c7b1b42)), + BIL_PAIR (BIL_VAL (0xd212c2b6), BIL_VAL (0xdeb379cd)), + BIL_PAIR (BIL_VAL (0xcb806a2f), BIL_VAL (0xad68c2cd))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf73b3c8c), BIL_VAL (0x77a6ee9b)), + BIL_PAIR (BIL_VAL (0x642687fd), BIL_VAL (0xb77e32e5)), + BIL_PAIR (BIL_VAL (0x5dfa7919), BIL_VAL (0x0c7be47e)), + BIL_PAIR (BIL_VAL (0x92772c67), BIL_VAL (0x74406904)), + BIL_PAIR (BIL_VAL (0xde98843d), BIL_VAL (0xf33ab3cc)), + BIL_PAIR (BIL_VAL (0x2aedb306), BIL_VAL (0xb2ec5dad)), + BIL_PAIR (BIL_VAL (0xb3a4879f), BIL_VAL (0xac646c84)), + BIL_PAIR (BIL_VAL (0x3dc16333), BIL_VAL (0x611c2451)), + BIL_PAIR (BIL_VAL (0x43ea8d52), BIL_VAL (0x3648e405)), + BIL_PAIR (BIL_VAL (0x2b6b4955), BIL_VAL (0x5b303e0c)), + BIL_PAIR (BIL_VAL (0x6b0f4a9a), BIL_VAL (0x521a6580)), + BIL_PAIR (BIL_VAL (0xfb6761b5), BIL_VAL (0xd3d26e40)), + BIL_PAIR (BIL_VAL (0x207978c4), BIL_VAL (0x6ad16c97)), + BIL_PAIR (BIL_VAL (0x60d10fea), BIL_VAL (0xbb010d91)), + BIL_PAIR (BIL_VAL (0x827a5f04), BIL_VAL (0xec49142c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xca7a622b), BIL_VAL (0x25afed45)), + BIL_PAIR (BIL_VAL (0xd6cb29f9), BIL_VAL (0x0dcb7bf7)), + BIL_PAIR (BIL_VAL (0xc01cc53d), BIL_VAL (0x8de6a7e6)), + BIL_PAIR (BIL_VAL (0x65bf0bc3), BIL_VAL (0x355a8ff2)), + BIL_PAIR (BIL_VAL (0xd1de534c), BIL_VAL (0xda503bea)), + BIL_PAIR (BIL_VAL (0x2e64f077), BIL_VAL (0x9b741e90)), + BIL_PAIR (BIL_VAL (0x9922784e), BIL_VAL (0x7861dfea)), + BIL_PAIR (BIL_VAL (0x3b8255c1), BIL_VAL (0xb03d1a5b)), + BIL_PAIR (BIL_VAL (0x66a7b6af), BIL_VAL (0xaf38522c)), + BIL_PAIR (BIL_VAL (0x96d97422), BIL_VAL (0xa32cc31b)), + BIL_PAIR (BIL_VAL (0x1145bb70), BIL_VAL (0xc661852e)), + BIL_PAIR (BIL_VAL (0xe319c9ac), BIL_VAL (0x122e8b8d)), + BIL_PAIR (BIL_VAL (0x77f6a74a), BIL_VAL (0x64494ad7)), + BIL_PAIR (BIL_VAL (0x3dda7fca), BIL_VAL (0x4ccd49e6)), + BIL_PAIR (BIL_VAL (0x72707151), BIL_VAL (0x3134cbdc))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x93e65761), BIL_VAL (0xf1cbb880)), + BIL_PAIR (BIL_VAL (0x2094eb48), BIL_VAL (0x5181a94a)), + BIL_PAIR (BIL_VAL (0xebd93a4e), BIL_VAL (0x1397d4e7)), + BIL_PAIR (BIL_VAL (0x8dc2b5c2), BIL_VAL (0x828e3aa5)), + BIL_PAIR (BIL_VAL (0x1795de82), BIL_VAL (0xeefa1589)), + BIL_PAIR (BIL_VAL (0xa359cd71), BIL_VAL (0xa7189317)), + BIL_PAIR (BIL_VAL (0xad3179cf), BIL_VAL (0x212ad91b)), + BIL_PAIR (BIL_VAL (0xf4b02a58), BIL_VAL (0xb7fb86bb)), + BIL_PAIR (BIL_VAL (0x9eff22e8), BIL_VAL (0x8c578146)), + BIL_PAIR (BIL_VAL (0xf682e850), BIL_VAL (0xc49d24b2)), + BIL_PAIR (BIL_VAL (0x76e143fa), BIL_VAL (0xb4f4f9f8)), + BIL_PAIR (BIL_VAL (0x0ea716bc), BIL_VAL (0x98e124e4)), + BIL_PAIR (BIL_VAL (0xd9ea168d), BIL_VAL (0xacf17994)), + BIL_PAIR (BIL_VAL (0xf835fe30), BIL_VAL (0xa5e789dd)), + BIL_PAIR (BIL_VAL (0x383ecc3f), BIL_VAL (0xab41a5f5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x895b6279), BIL_VAL (0x3dac8cd6)), + BIL_PAIR (BIL_VAL (0x38fa25a2), BIL_VAL (0x4c2c6855)), + BIL_PAIR (BIL_VAL (0x494cd9ab), BIL_VAL (0xad9a5931)), + BIL_PAIR (BIL_VAL (0xfee518e4), BIL_VAL (0x114a76bf)), + BIL_PAIR (BIL_VAL (0x050b79d6), BIL_VAL (0x19ff2206)), + BIL_PAIR (BIL_VAL (0xc9cee77a), BIL_VAL (0xc04720a7)), + BIL_PAIR (BIL_VAL (0x2e883e5c), BIL_VAL (0xd9d94b12)), + BIL_PAIR (BIL_VAL (0xa113c9ff), BIL_VAL (0x9f32f880)), + BIL_PAIR (BIL_VAL (0x4dd07575), BIL_VAL (0xfa2c9b09)), + BIL_PAIR (BIL_VAL (0xb4c51385), BIL_VAL (0xdc7d2d2f)), + BIL_PAIR (BIL_VAL (0x650d5138), BIL_VAL (0x86d434ba)), + BIL_PAIR (BIL_VAL (0x731aa759), BIL_VAL (0xd7b2bdb2)), + BIL_PAIR (BIL_VAL (0xee2064ab), BIL_VAL (0x43f872a7)), + BIL_PAIR (BIL_VAL (0xfc52893b), BIL_VAL (0xd7f8ef35)), + BIL_PAIR (BIL_VAL (0x14d8ac6b), BIL_VAL (0x0337c604))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x1e52c4da), BIL_VAL (0x490010be)), + BIL_PAIR (BIL_VAL (0x158f64ce), BIL_VAL (0x27d27f9d)), + BIL_PAIR (BIL_VAL (0xc2b741c6), BIL_VAL (0xd9b1b6ae)), + BIL_PAIR (BIL_VAL (0xf0adeaa5), BIL_VAL (0xe11b524d)), + BIL_PAIR (BIL_VAL (0x07198130), BIL_VAL (0x50ab6a6f)), + BIL_PAIR (BIL_VAL (0x2e32b413), BIL_VAL (0x739481cc)), + BIL_PAIR (BIL_VAL (0xbc2c1d98), BIL_VAL (0xe64344ee)), + BIL_PAIR (BIL_VAL (0x4a9a6b66), BIL_VAL (0xd61f9c10)), + BIL_PAIR (BIL_VAL (0x9847fb8c), BIL_VAL (0x804c9bf6)), + BIL_PAIR (BIL_VAL (0x539914c6), BIL_VAL (0x7205a67e)), + BIL_PAIR (BIL_VAL (0x16232d1e), BIL_VAL (0xdd36ccb4)), + BIL_PAIR (BIL_VAL (0x44fe3bfb), BIL_VAL (0x571c78ef)), + BIL_PAIR (BIL_VAL (0x7f514e25), BIL_VAL (0xa9e09a48)), + BIL_PAIR (BIL_VAL (0x5df68c62), BIL_VAL (0x98125dd5)), + BIL_PAIR (BIL_VAL (0x25425d47), BIL_VAL (0x3d4244c0))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x562b0c6a), BIL_VAL (0x123364d0)), + BIL_PAIR (BIL_VAL (0x066c744f), BIL_VAL (0x16d810e5)), + BIL_PAIR (BIL_VAL (0x410a49d0), BIL_VAL (0xc9b818c3)), + BIL_PAIR (BIL_VAL (0xfa510257), BIL_VAL (0x8900f435)), + BIL_PAIR (BIL_VAL (0x96d0113c), BIL_VAL (0x6106d9e6)), + BIL_PAIR (BIL_VAL (0x2aec33fb), BIL_VAL (0x61928ab1)), + BIL_PAIR (BIL_VAL (0xc63fe6b9), BIL_VAL (0x3f3232c5)), + BIL_PAIR (BIL_VAL (0x48418579), BIL_VAL (0x971f1284)), + BIL_PAIR (BIL_VAL (0x1013ea81), BIL_VAL (0x016e17b3)), + BIL_PAIR (BIL_VAL (0x8f197ff5), BIL_VAL (0x4b665fab)), + BIL_PAIR (BIL_VAL (0x042a5baf), BIL_VAL (0xbc2eb120)), + BIL_PAIR (BIL_VAL (0x49217bcc), BIL_VAL (0xa99b3d12)), + BIL_PAIR (BIL_VAL (0x98d818b8), BIL_VAL (0x4b34bf80)), + BIL_PAIR (BIL_VAL (0x50d84bc8), BIL_VAL (0xe36e4d0f)), + BIL_PAIR (BIL_VAL (0x9c9f41d7), BIL_VAL (0x27bdd99a))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x44284d41), BIL_VAL (0x8c4e2f93)), + BIL_PAIR (BIL_VAL (0xcff05ad0), BIL_VAL (0xee077255)), + BIL_PAIR (BIL_VAL (0xfd9f8d69), BIL_VAL (0x9f1ec826)), + BIL_PAIR (BIL_VAL (0x29289a4e), BIL_VAL (0x410c0d4d)), + BIL_PAIR (BIL_VAL (0x4e27706b), BIL_VAL (0xb4a38e2e)), + BIL_PAIR (BIL_VAL (0xfb65bea3), BIL_VAL (0x930e8c9c)), + BIL_PAIR (BIL_VAL (0xe1125df3), BIL_VAL (0x8d89c9ed)), + BIL_PAIR (BIL_VAL (0x042c81a4), BIL_VAL (0xfeb6317a)), + BIL_PAIR (BIL_VAL (0xbb24d559), BIL_VAL (0x63cb7d3d)), + BIL_PAIR (BIL_VAL (0xd11324a4), BIL_VAL (0xf5abe2a2)), + BIL_PAIR (BIL_VAL (0x915a4923), BIL_VAL (0x92a703c1)), + BIL_PAIR (BIL_VAL (0xf23553d8), BIL_VAL (0x7011e9df)), + BIL_PAIR (BIL_VAL (0x027e010c), BIL_VAL (0x88bd44ae)), + BIL_PAIR (BIL_VAL (0x26ba013f), BIL_VAL (0xa6f3fee5)), + BIL_PAIR (BIL_VAL (0x558bc272), BIL_VAL (0x7d4089be))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xd8fee73c), BIL_VAL (0x4c073655)), + BIL_PAIR (BIL_VAL (0xa0bc28f8), BIL_VAL (0xb9652ddd)), + BIL_PAIR (BIL_VAL (0x0be42c45), BIL_VAL (0x34d4837a)), + BIL_PAIR (BIL_VAL (0x962c69a3), BIL_VAL (0xcc48382e)), + BIL_PAIR (BIL_VAL (0xe440d1e7), BIL_VAL (0xf5ccd3dd)), + BIL_PAIR (BIL_VAL (0x49b043a0), BIL_VAL (0x5e1da8e6)), + BIL_PAIR (BIL_VAL (0x985620d0), BIL_VAL (0x988db96a)), + BIL_PAIR (BIL_VAL (0xc1cf8166), BIL_VAL (0x7dccdb62)), + BIL_PAIR (BIL_VAL (0x626b558a), BIL_VAL (0xf118b76c)), + BIL_PAIR (BIL_VAL (0x94424330), BIL_VAL (0xee028601)), + BIL_PAIR (BIL_VAL (0xdbcfba7f), BIL_VAL (0x67bd2e7f)), + BIL_PAIR (BIL_VAL (0x324dd54c), BIL_VAL (0x24e25b0c)), + BIL_PAIR (BIL_VAL (0x88540bbc), BIL_VAL (0x2f4dbe7b)), + BIL_PAIR (BIL_VAL (0x2521f2a1), BIL_VAL (0x954c757a)), + BIL_PAIR (BIL_VAL (0x95c308d0), BIL_VAL (0xf13b59e5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x3f4f873d), BIL_VAL (0xbf3dd88f)), + BIL_PAIR (BIL_VAL (0x9d9c6a0c), BIL_VAL (0x33674f74)), + BIL_PAIR (BIL_VAL (0xfad20fa0), BIL_VAL (0x94138119)), + BIL_PAIR (BIL_VAL (0x48abc459), BIL_VAL (0x33195e86)), + BIL_PAIR (BIL_VAL (0x76a0e98f), BIL_VAL (0xa875b1fa)), + BIL_PAIR (BIL_VAL (0xee57be9e), BIL_VAL (0x896aa1d5)), + BIL_PAIR (BIL_VAL (0xf3bd1cb5), BIL_VAL (0x67f02dc7)), + BIL_PAIR (BIL_VAL (0x2b7b304e), BIL_VAL (0x413c67ff)), + BIL_PAIR (BIL_VAL (0x0c34a008), BIL_VAL (0xe411031e)), + BIL_PAIR (BIL_VAL (0x14b2b298), BIL_VAL (0x2d5886fb)), + BIL_PAIR (BIL_VAL (0x43b2b4c0), BIL_VAL (0x2d55129c)), + BIL_PAIR (BIL_VAL (0x0751e41e), BIL_VAL (0xb19d761f)), + BIL_PAIR (BIL_VAL (0xadc8c0a0), BIL_VAL (0x3e825fa6)), + BIL_PAIR (BIL_VAL (0x1f5e38dd), BIL_VAL (0x855c4520)), + BIL_PAIR (BIL_VAL (0xe507c6ce), BIL_VAL (0xa8d4b801)) + /* And implicit 4608 0 bits. */)), + /* 4864 */ + BIL_SET12 (BIL_SET12 (BIL_VAL (0x3a02ce1f), + BIL_PAIR (BIL_VAL (0xee451b5b), BIL_VAL (0x29aa67b8)), + BIL_PAIR (BIL_VAL (0x56bfb794), BIL_VAL (0xf9cabcfe)), + BIL_PAIR (BIL_VAL (0xbe0114f3), BIL_VAL (0x852626f9)), + BIL_PAIR (BIL_VAL (0x088b744d), BIL_VAL (0xdecc0bdf)), + BIL_PAIR (BIL_VAL (0xa9becfb4), BIL_VAL (0xbdcc19d3)), + BIL_PAIR (BIL_VAL (0x30de7f6d), BIL_VAL (0x7c6b91f7)), + BIL_PAIR (BIL_VAL (0x31d8a8c3), BIL_VAL (0xdbd0f56e)), + BIL_PAIR (BIL_VAL (0xbb3067df), BIL_VAL (0x85b1dd07)), + BIL_PAIR (BIL_VAL (0xbad4f7b0), BIL_VAL (0xb6a39a4a)), + BIL_PAIR (BIL_VAL (0xaf6bc6b9), BIL_VAL (0x62ca8c15)), + BIL_PAIR (BIL_VAL (0x6fe4dab6), BIL_VAL (0xf10773f3))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7fe84b9d), BIL_VAL (0x4dbc0af1)), + BIL_PAIR (BIL_VAL (0xea4e88ba), BIL_VAL (0x690879fe)), + BIL_PAIR (BIL_VAL (0x3503ec6a), BIL_VAL (0x13042c42)), + BIL_PAIR (BIL_VAL (0x26d8d941), BIL_VAL (0x16f55daf)), + BIL_PAIR (BIL_VAL (0x4a0d17b5), BIL_VAL (0x54347ce8)), + BIL_PAIR (BIL_VAL (0x200556b7), BIL_VAL (0xb63690b1)), + BIL_PAIR (BIL_VAL (0x073c6717), BIL_VAL (0xbcff75e9)), + BIL_PAIR (BIL_VAL (0x00541130), BIL_VAL (0x11885702)), + BIL_PAIR (BIL_VAL (0xe22fd631), BIL_VAL (0x7fcbbad3)), + BIL_PAIR (BIL_VAL (0x506970e4), BIL_VAL (0xeae57975)), + BIL_PAIR (BIL_VAL (0xe85a2848), BIL_VAL (0x85da438a)), + BIL_PAIR (BIL_VAL (0x1b1afea5), BIL_VAL (0xb9bf010a)), + BIL_PAIR (BIL_VAL (0x943aa7d6), BIL_VAL (0x0384ac8a)), + BIL_PAIR (BIL_VAL (0x90a21240), BIL_VAL (0x2c59cf09)), + BIL_PAIR (BIL_VAL (0x3b8da621), BIL_VAL (0x1eb5fabd))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x47a69c01), BIL_VAL (0x2dc47cc5)), + BIL_PAIR (BIL_VAL (0x60d1fd4d), BIL_VAL (0xa46c7d9d)), + BIL_PAIR (BIL_VAL (0x2a2d739c), BIL_VAL (0xef2d32e1)), + BIL_PAIR (BIL_VAL (0x7ef59000), BIL_VAL (0x1d558134)), + BIL_PAIR (BIL_VAL (0x5d39f19c), BIL_VAL (0x32e812d9)), + BIL_PAIR (BIL_VAL (0xa32da95b), BIL_VAL (0xbd804238)), + BIL_PAIR (BIL_VAL (0x23679ac6), BIL_VAL (0xa3a8e6db)), + BIL_PAIR (BIL_VAL (0xa6757401), BIL_VAL (0x3468dd4d)), + BIL_PAIR (BIL_VAL (0xd4d1d0fd), BIL_VAL (0xc56193ba)), + BIL_PAIR (BIL_VAL (0x365113ce), BIL_VAL (0x528ccb55)), + BIL_PAIR (BIL_VAL (0x400bcf20), BIL_VAL (0xbf0765ed)), + BIL_PAIR (BIL_VAL (0x53d510d5), BIL_VAL (0x2be8384f)), + BIL_PAIR (BIL_VAL (0xfc69a86a), BIL_VAL (0xb422b6a6)), + BIL_PAIR (BIL_VAL (0xf51b1fbf), BIL_VAL (0x3e98b3a1)), + BIL_PAIR (BIL_VAL (0x522adb52), BIL_VAL (0xfcaa1aa7))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6894aea4), BIL_VAL (0x85719472)), + BIL_PAIR (BIL_VAL (0x3dd8d93a), BIL_VAL (0xe82425da)), + BIL_PAIR (BIL_VAL (0x57f7163c), BIL_VAL (0xaffebe0e)), + BIL_PAIR (BIL_VAL (0xf8b54a31), BIL_VAL (0x3492e860)), + BIL_PAIR (BIL_VAL (0x11bbacb7), BIL_VAL (0x467b1965)), + BIL_PAIR (BIL_VAL (0x05dd832a), BIL_VAL (0xb8464288)), + BIL_PAIR (BIL_VAL (0xbcb64c11), BIL_VAL (0x03fef89a)), + BIL_PAIR (BIL_VAL (0x299ebd3f), BIL_VAL (0xbbd2a802)), + BIL_PAIR (BIL_VAL (0x95b4297b), BIL_VAL (0xbe845657)), + BIL_PAIR (BIL_VAL (0x7e0d7b8b), BIL_VAL (0x3991ea7c)), + BIL_PAIR (BIL_VAL (0x1ce9a697), BIL_VAL (0x1e34e1d4)), + BIL_PAIR (BIL_VAL (0xe2f94dbf), BIL_VAL (0x9a5c1cb8)), + BIL_PAIR (BIL_VAL (0x5022fc09), BIL_VAL (0x4055abd4)), + BIL_PAIR (BIL_VAL (0x69344930), BIL_VAL (0xbfcc16f3)), + BIL_PAIR (BIL_VAL (0x088c5628), BIL_VAL (0xdbeb498f))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xccfbffdd), BIL_VAL (0x058c40b6)), + BIL_PAIR (BIL_VAL (0xcd4ba7a9), BIL_VAL (0x9aaa4eb5)), + BIL_PAIR (BIL_VAL (0x17a78040), BIL_VAL (0x4bd4f236)), + BIL_PAIR (BIL_VAL (0xa83e76df), BIL_VAL (0x61021d46)), + BIL_PAIR (BIL_VAL (0x3fd733eb), BIL_VAL (0x03ce11fe)), + BIL_PAIR (BIL_VAL (0xcc104c80), BIL_VAL (0x7ebd353f)), + BIL_PAIR (BIL_VAL (0x82e39816), BIL_VAL (0x64a896c7)), + BIL_PAIR (BIL_VAL (0xe7af724b), BIL_VAL (0x686fe303)), + BIL_PAIR (BIL_VAL (0xfdcdc4ca), BIL_VAL (0x5bb17301)), + BIL_PAIR (BIL_VAL (0x5de44be9), BIL_VAL (0x2e922a7a)), + BIL_PAIR (BIL_VAL (0x04193ac2), BIL_VAL (0xec362b62)), + BIL_PAIR (BIL_VAL (0x64279091), BIL_VAL (0x709411f7)), + BIL_PAIR (BIL_VAL (0x0205e1ca), BIL_VAL (0xfbf6c79d)), + BIL_PAIR (BIL_VAL (0x0091837f), BIL_VAL (0x199f824f)), + BIL_PAIR (BIL_VAL (0x5bfac3d2), BIL_VAL (0x2b947dac))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc2774c3d), BIL_VAL (0x919e0284)), + BIL_PAIR (BIL_VAL (0x3dd8a300), BIL_VAL (0x908c6e84)), + BIL_PAIR (BIL_VAL (0x464d13f7), BIL_VAL (0x44c937d9)), + BIL_PAIR (BIL_VAL (0x4f3848ab), BIL_VAL (0x41c472b0)), + BIL_PAIR (BIL_VAL (0xe0d4c1c8), BIL_VAL (0x361060f9)), + BIL_PAIR (BIL_VAL (0x16746578), BIL_VAL (0xa61440f1)), + BIL_PAIR (BIL_VAL (0xc04e40e0), BIL_VAL (0x5346d375)), + BIL_PAIR (BIL_VAL (0x9318d398), BIL_VAL (0x6c8266d8)), + BIL_PAIR (BIL_VAL (0xd4a024f5), BIL_VAL (0x29764961)), + BIL_PAIR (BIL_VAL (0xea98427d), BIL_VAL (0x03c04d62)), + BIL_PAIR (BIL_VAL (0x0dd5a667), BIL_VAL (0xd485b325)), + BIL_PAIR (BIL_VAL (0x07a3f162), BIL_VAL (0x601936ed)), + BIL_PAIR (BIL_VAL (0x8a154572), BIL_VAL (0x1b883f99)), + BIL_PAIR (BIL_VAL (0x1782efc4), BIL_VAL (0x85458919)), + BIL_PAIR (BIL_VAL (0x592ca8f3), BIL_VAL (0xc31f3829))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xaafd28b1), BIL_VAL (0xda71860a)), + BIL_PAIR (BIL_VAL (0x0570e86e), BIL_VAL (0xadf3f528)), + BIL_PAIR (BIL_VAL (0xa826b981), BIL_VAL (0xc617e2ae)), + BIL_PAIR (BIL_VAL (0x84a2c76b), BIL_VAL (0xeb7f5e60)), + BIL_PAIR (BIL_VAL (0x918aa854), BIL_VAL (0x835a7149)), + BIL_PAIR (BIL_VAL (0x100f7402), BIL_VAL (0xa9e85c34)), + BIL_PAIR (BIL_VAL (0xc8c7cb72), BIL_VAL (0x1bfde347)), + BIL_PAIR (BIL_VAL (0x44bc19a1), BIL_VAL (0xff0b9751)), + BIL_PAIR (BIL_VAL (0xa9de0af2), BIL_VAL (0xd1f6fc99)), + BIL_PAIR (BIL_VAL (0x13905d25), BIL_VAL (0x8f4acee9)), + BIL_PAIR (BIL_VAL (0x95ef32ff), BIL_VAL (0xb2863c89)), + BIL_PAIR (BIL_VAL (0x0b715a18), BIL_VAL (0xd2686150)), + BIL_PAIR (BIL_VAL (0x8a68b01a), BIL_VAL (0xafa200b7)), + BIL_PAIR (BIL_VAL (0x41e0a1a6), BIL_VAL (0x250959e2)), + BIL_PAIR (BIL_VAL (0x297f978e), BIL_VAL (0x2dbf0b80))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe0913c9d), BIL_VAL (0x5e819d1f)), + BIL_PAIR (BIL_VAL (0x9f5d5a96), BIL_VAL (0x4c68531d)), + BIL_PAIR (BIL_VAL (0x44cdcf07), BIL_VAL (0x75c31a01)), + BIL_PAIR (BIL_VAL (0x1735637e), BIL_VAL (0x58c19c37)), + BIL_PAIR (BIL_VAL (0x925a4577), BIL_VAL (0xface42a7)), + BIL_PAIR (BIL_VAL (0x21d13f28), BIL_VAL (0x71e53d25)), + BIL_PAIR (BIL_VAL (0x1222ed91), BIL_VAL (0xa4da6c80)), + BIL_PAIR (BIL_VAL (0xb61278ae), BIL_VAL (0xa7bbc7f9)), + BIL_PAIR (BIL_VAL (0xa9945ca6), BIL_VAL (0x76e220e0)), + BIL_PAIR (BIL_VAL (0x679b517b), BIL_VAL (0x6981afd3)), + BIL_PAIR (BIL_VAL (0x249af884), BIL_VAL (0x7b36c221)), + BIL_PAIR (BIL_VAL (0x40540ea9), BIL_VAL (0xa9dcbc76)), + BIL_PAIR (BIL_VAL (0x164b42aa), BIL_VAL (0xbf347f83)), + BIL_PAIR (BIL_VAL (0x64c1055a), BIL_VAL (0x62c3891b)), + BIL_PAIR (BIL_VAL (0xa58fc176), BIL_VAL (0xbb32e291))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x64bd4921), BIL_VAL (0x53292641)), + BIL_PAIR (BIL_VAL (0x3b252a9d), BIL_VAL (0x9a8d69db)), + BIL_PAIR (BIL_VAL (0x94aa05cf), BIL_VAL (0xa51f4bc3)), + BIL_PAIR (BIL_VAL (0x44fe80b1), BIL_VAL (0x1357386a)), + BIL_PAIR (BIL_VAL (0xb944f9e3), BIL_VAL (0x38741b40)), + BIL_PAIR (BIL_VAL (0x600fa952), BIL_VAL (0xcbe6c3d0)), + BIL_PAIR (BIL_VAL (0x0d0ebaf6), BIL_VAL (0x5bc30bf9)), + BIL_PAIR (BIL_VAL (0xc762fe00), BIL_VAL (0xf0dd26e6)), + BIL_PAIR (BIL_VAL (0x70f4de1c), BIL_VAL (0xfc217bf3)), + BIL_PAIR (BIL_VAL (0x6aa53788), BIL_VAL (0x9c3cd017)), + BIL_PAIR (BIL_VAL (0xa5995d69), BIL_VAL (0xbcca3bf5)), + BIL_PAIR (BIL_VAL (0x1730a460), BIL_VAL (0xf086b3da)), + BIL_PAIR (BIL_VAL (0x1d819d27), BIL_VAL (0xe9ac5140)), + BIL_PAIR (BIL_VAL (0x9940d3e1), BIL_VAL (0xfc899512)), + BIL_PAIR (BIL_VAL (0x8b48469c), BIL_VAL (0x45fe2ba3))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6a1d896f), BIL_VAL (0xa24d6e15)), + BIL_PAIR (BIL_VAL (0xfb0a0012), BIL_VAL (0x7dac7e73)), + BIL_PAIR (BIL_VAL (0xfcb3d13e), BIL_VAL (0x4aa57623)), + BIL_PAIR (BIL_VAL (0xd82b3264), BIL_VAL (0xd4abdb9c)), + BIL_PAIR (BIL_VAL (0xbd1f6aa0), BIL_VAL (0xc683cc58)), + BIL_PAIR (BIL_VAL (0x6979bbbc), BIL_VAL (0xef7ec97b)), + BIL_PAIR (BIL_VAL (0xd57cacad), BIL_VAL (0x4fb60b58)), + BIL_PAIR (BIL_VAL (0x1d194842), BIL_VAL (0x37fae907)), + BIL_PAIR (BIL_VAL (0xb1d7727d), BIL_VAL (0x6067ac9c)), + BIL_PAIR (BIL_VAL (0xce601a11), BIL_VAL (0xeaff2c80)), + BIL_PAIR (BIL_VAL (0x165523be), BIL_VAL (0xac93554a)), + BIL_PAIR (BIL_VAL (0x6a513344), BIL_VAL (0x0339180c)), + BIL_PAIR (BIL_VAL (0xefa0ede7), BIL_VAL (0x772d0d57)), + BIL_PAIR (BIL_VAL (0x68c7f589), BIL_VAL (0x4c513c4b)), + BIL_PAIR (BIL_VAL (0xd4225d39), BIL_VAL (0x6013ccb3))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc19a7a7e), BIL_VAL (0xa59f9af9)), + BIL_PAIR (BIL_VAL (0x88d87a57), BIL_VAL (0xa2199eae)), + BIL_PAIR (BIL_VAL (0x9bd6f51b), BIL_VAL (0xcb710c68)), + BIL_PAIR (BIL_VAL (0xa701bc99), BIL_VAL (0xb412c1ae)), + BIL_PAIR (BIL_VAL (0xd114d2d0), BIL_VAL (0xde9f8b41)), + BIL_PAIR (BIL_VAL (0x0b991941), BIL_VAL (0x115dce91)), + BIL_PAIR (BIL_VAL (0xeb77fc9c), BIL_VAL (0xdfc534e9)), + BIL_PAIR (BIL_VAL (0x1f761a43), BIL_VAL (0x9e1cbfeb)), + BIL_PAIR (BIL_VAL (0xb5cd9af4), BIL_VAL (0xa4ad43dc)), + BIL_PAIR (BIL_VAL (0x9019ca6d), BIL_VAL (0x401470af)), + BIL_PAIR (BIL_VAL (0x8b6aca79), BIL_VAL (0x8cbea82e)), + BIL_PAIR (BIL_VAL (0x1ebded34), BIL_VAL (0x4aa1b2f0)), + BIL_PAIR (BIL_VAL (0xd1c17ede), BIL_VAL (0x2168264e)), + BIL_PAIR (BIL_VAL (0x27354943), BIL_VAL (0x3f80cd8c)), + BIL_PAIR (BIL_VAL (0xd15ed683), BIL_VAL (0x1f4e7cc2))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x842e07eb), BIL_VAL (0x6ba8a455)), + BIL_PAIR (BIL_VAL (0x09da6cc4), BIL_VAL (0x574d1526)), + BIL_PAIR (BIL_VAL (0x8ab8a5c8), BIL_VAL (0x2edb7fc2)), + BIL_PAIR (BIL_VAL (0x8bcd5516), BIL_VAL (0xc5201ca6)), + BIL_PAIR (BIL_VAL (0x0dd5daae), BIL_VAL (0x3f1f7213)), + BIL_PAIR (BIL_VAL (0xb5f52a9a), BIL_VAL (0xd44124a9)), + BIL_PAIR (BIL_VAL (0x089fa60c), BIL_VAL (0x2996b37c)), + BIL_PAIR (BIL_VAL (0x12c92f51), BIL_VAL (0xdc0c17ca)), + BIL_PAIR (BIL_VAL (0x4d7c4a3f), BIL_VAL (0x0ae13c74)), + BIL_PAIR (BIL_VAL (0x7d5d63b3), BIL_VAL (0x8ab84312)), + BIL_PAIR (BIL_VAL (0x7027a308), BIL_VAL (0x5b0a2d60)), + BIL_PAIR (BIL_VAL (0x4a6e9805), BIL_VAL (0x9024404c)), + BIL_PAIR (BIL_VAL (0x3e0ba104), BIL_VAL (0x76d2fb55)), + BIL_PAIR (BIL_VAL (0xebdb6d80), BIL_VAL (0x09d73755)), + BIL_PAIR (BIL_VAL (0xae2d736a), BIL_VAL (0x5a233401)) + /* And implicit 4864 0 bits. */)), + /* 5120 */ + BIL_SET13 (BIL_SET6 (BIL_PAIR (BIL_VAL (0x13514), BIL_VAL (0xfde1fda7)), + BIL_PAIR (BIL_VAL (0x5645a90b), BIL_VAL (0xa1db147f)), + BIL_PAIR (BIL_VAL (0x51825fc2), BIL_VAL (0x263ff010)), + BIL_PAIR (BIL_VAL (0xb0af9f54), BIL_VAL (0xdaf1cbc7)), + BIL_PAIR (BIL_VAL (0x2a46b53e), BIL_VAL (0x0d0ccf61)), + BIL_PAIR (BIL_VAL (0xc12ed152), BIL_VAL (0xfd388abb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x94e3f8a1), BIL_VAL (0x06b5c530)), + BIL_PAIR (BIL_VAL (0xa088f982), BIL_VAL (0xf76f2185)), + BIL_PAIR (BIL_VAL (0x8f98f525), BIL_VAL (0xbb2d2728)), + BIL_PAIR (BIL_VAL (0x6a231bbf), BIL_VAL (0x821b0abe)), + BIL_PAIR (BIL_VAL (0x85f7803d), BIL_VAL (0x5c64326a)), + BIL_PAIR (BIL_VAL (0xcb01cbf4), BIL_VAL (0xaee907e1)), + BIL_PAIR (BIL_VAL (0xd454d8b2), BIL_VAL (0x73a362fd)), + BIL_PAIR (BIL_VAL (0xd5c2ba77), BIL_VAL (0xc97c626d)), + BIL_PAIR (BIL_VAL (0x91e1d943), BIL_VAL (0x3fbe9a94)), + BIL_PAIR (BIL_VAL (0xcedcc74b), BIL_VAL (0xc663bb11)), + BIL_PAIR (BIL_VAL (0xe6bdb2d2), BIL_VAL (0x39f16fff)), + BIL_PAIR (BIL_VAL (0xa1694564), BIL_VAL (0x84006fba)), + BIL_PAIR (BIL_VAL (0x319cf969), BIL_VAL (0x10b311e9)), + BIL_PAIR (BIL_VAL (0xb6408583), BIL_VAL (0x09a6d314)), + BIL_PAIR (BIL_VAL (0xd51c5ab1), BIL_VAL (0x9e8214ef))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6fbd4ca9), BIL_VAL (0x7ae24246)), + BIL_PAIR (BIL_VAL (0xd6dfb22d), BIL_VAL (0x27b481f8)), + BIL_PAIR (BIL_VAL (0x96772505), BIL_VAL (0x62be17b6)), + BIL_PAIR (BIL_VAL (0xdc20f58b), BIL_VAL (0xea91499c)), + BIL_PAIR (BIL_VAL (0x129322b7), BIL_VAL (0x27868aac)), + BIL_PAIR (BIL_VAL (0x0d199420), BIL_VAL (0xe568a9b3)), + BIL_PAIR (BIL_VAL (0xf5d9606a), BIL_VAL (0x8a265c4c)), + BIL_PAIR (BIL_VAL (0xa2af78c7), BIL_VAL (0xbae5e715)), + BIL_PAIR (BIL_VAL (0x1653427c), BIL_VAL (0x1583026e)), + BIL_PAIR (BIL_VAL (0x4fd630c2), BIL_VAL (0x0804a7fa)), + BIL_PAIR (BIL_VAL (0xaaf2eedc), BIL_VAL (0xfb414890)), + BIL_PAIR (BIL_VAL (0xf3ae4892), BIL_VAL (0x0e985551)), + BIL_PAIR (BIL_VAL (0x2f63e83f), BIL_VAL (0x11215b6a)), + BIL_PAIR (BIL_VAL (0xc67eb682), BIL_VAL (0x26791623)), + BIL_PAIR (BIL_VAL (0x59335a8e), BIL_VAL (0x60095bcf))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe1a7ac36), BIL_VAL (0x1af768fa)), + BIL_PAIR (BIL_VAL (0x29191bfd), BIL_VAL (0xad7879f6)), + BIL_PAIR (BIL_VAL (0xe9e8d551), BIL_VAL (0x918ef613)), + BIL_PAIR (BIL_VAL (0x2cf4c7fc), BIL_VAL (0x012842d4)), + BIL_PAIR (BIL_VAL (0x4c65c27b), BIL_VAL (0x2a4b26bc)), + BIL_PAIR (BIL_VAL (0xe6d8a2ad), BIL_VAL (0x70d21aa2)), + BIL_PAIR (BIL_VAL (0xcc1710b4), BIL_VAL (0xe78985f2)), + BIL_PAIR (BIL_VAL (0x5a12b261), BIL_VAL (0x9f5d242d)), + BIL_PAIR (BIL_VAL (0x80811b8e), BIL_VAL (0x9b106271)), + BIL_PAIR (BIL_VAL (0x1045b6ce), BIL_VAL (0x3562bc33)), + BIL_PAIR (BIL_VAL (0xfbc5ee9f), BIL_VAL (0x817050dc)), + BIL_PAIR (BIL_VAL (0x994563e3), BIL_VAL (0x9e497267)), + BIL_PAIR (BIL_VAL (0x0a8a2c77), BIL_VAL (0x2abc9ef2)), + BIL_PAIR (BIL_VAL (0xd1e42f6d), BIL_VAL (0xb128fc68)), + BIL_PAIR (BIL_VAL (0xab97b160), BIL_VAL (0xc7170745))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc624ed55), BIL_VAL (0x9c692b6e)), + BIL_PAIR (BIL_VAL (0xd2b053b0), BIL_VAL (0xc7021499)), + BIL_PAIR (BIL_VAL (0x9a96d655), BIL_VAL (0x65385f01)), + BIL_PAIR (BIL_VAL (0xa80d3204), BIL_VAL (0x74e5a113)), + BIL_PAIR (BIL_VAL (0x5fd8c1f9), BIL_VAL (0xc13da5cb)), + BIL_PAIR (BIL_VAL (0xca3ccddf), BIL_VAL (0xddc62d5f)), + BIL_PAIR (BIL_VAL (0x950b7fee), BIL_VAL (0x5ff59efd)), + BIL_PAIR (BIL_VAL (0xa0536e8a), BIL_VAL (0xdfac6dba)), + BIL_PAIR (BIL_VAL (0x9d1662e2), BIL_VAL (0x3af99f3b)), + BIL_PAIR (BIL_VAL (0x56ee628e), BIL_VAL (0x8648ffa0)), + BIL_PAIR (BIL_VAL (0x6b0c00d0), BIL_VAL (0xc8513aff)), + BIL_PAIR (BIL_VAL (0x333613d6), BIL_VAL (0x375895d5)), + BIL_PAIR (BIL_VAL (0xd8011875), BIL_VAL (0x5a1bcec3)), + BIL_PAIR (BIL_VAL (0x39bcac45), BIL_VAL (0xfbe2bf28)), + BIL_PAIR (BIL_VAL (0xb8174acc), BIL_VAL (0x27599f8d))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xbcd25ed4), BIL_VAL (0x3075c466)), + BIL_PAIR (BIL_VAL (0x50d5ebcc), BIL_VAL (0x61fa44c6)), + BIL_PAIR (BIL_VAL (0x16d03284), BIL_VAL (0x1d7c0a14)), + BIL_PAIR (BIL_VAL (0x0904a154), BIL_VAL (0xa280d9a1)), + BIL_PAIR (BIL_VAL (0x93a642a8), BIL_VAL (0x21816799)), + BIL_PAIR (BIL_VAL (0x5d0df943), BIL_VAL (0x208f2c1b)), + BIL_PAIR (BIL_VAL (0x5a41a8a0), BIL_VAL (0x61f9813b)), + BIL_PAIR (BIL_VAL (0x34c9cbae), BIL_VAL (0xece90af6)), + BIL_PAIR (BIL_VAL (0x9c6307d1), BIL_VAL (0x870cbdc4)), + BIL_PAIR (BIL_VAL (0x30becc0b), BIL_VAL (0x1204b39a)), + BIL_PAIR (BIL_VAL (0x59959958), BIL_VAL (0x1b521f62)), + BIL_PAIR (BIL_VAL (0x96b8ecc1), BIL_VAL (0xc561ef2d)), + BIL_PAIR (BIL_VAL (0xca963fc6), BIL_VAL (0xf17e8281)), + BIL_PAIR (BIL_VAL (0x27d66b91), BIL_VAL (0x005da141)), + BIL_PAIR (BIL_VAL (0xbd7d66d7), BIL_VAL (0xacda490c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x76fd4447), BIL_VAL (0x0c7d33e5)), + BIL_PAIR (BIL_VAL (0xeb4f1077), BIL_VAL (0xdf9aa0fb)), + BIL_PAIR (BIL_VAL (0xf7655ad0), BIL_VAL (0xf535ec74)), + BIL_PAIR (BIL_VAL (0xbd9030f5), BIL_VAL (0x931bd979)), + BIL_PAIR (BIL_VAL (0x5653db83), BIL_VAL (0xcb31e567)), + BIL_PAIR (BIL_VAL (0x770202a1), BIL_VAL (0x99fa7c25)), + BIL_PAIR (BIL_VAL (0x6cc7b71f), BIL_VAL (0x2f0f074f)), + BIL_PAIR (BIL_VAL (0x3f070d40), BIL_VAL (0xd3e5c31a)), + BIL_PAIR (BIL_VAL (0x6567f47b), BIL_VAL (0x538b9206)), + BIL_PAIR (BIL_VAL (0xc3b6791a), BIL_VAL (0xfdcd8fba)), + BIL_PAIR (BIL_VAL (0x8360cfb4), BIL_VAL (0x6ae27267)), + BIL_PAIR (BIL_VAL (0x93ddd0db), BIL_VAL (0x17416c08)), + BIL_PAIR (BIL_VAL (0xe5154ec7), BIL_VAL (0x392a6293)), + BIL_PAIR (BIL_VAL (0x50dfa8ee), BIL_VAL (0xdf21ba24)), + BIL_PAIR (BIL_VAL (0x019f0c01), BIL_VAL (0x16687045))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xcc36ed6a), BIL_VAL (0x9c7a2b0b)), + BIL_PAIR (BIL_VAL (0x30b86a29), BIL_VAL (0xbb982743)), + BIL_PAIR (BIL_VAL (0x5ce69efd), BIL_VAL (0x645c0788)), + BIL_PAIR (BIL_VAL (0x73741554), BIL_VAL (0xf89df791)), + BIL_PAIR (BIL_VAL (0x9c7086f3), BIL_VAL (0xb465f564)), + BIL_PAIR (BIL_VAL (0x20a2cf01), BIL_VAL (0x3353e655)), + BIL_PAIR (BIL_VAL (0xedef677b), BIL_VAL (0x085233ef)), + BIL_PAIR (BIL_VAL (0x33d37e25), BIL_VAL (0xc2708d24)), + BIL_PAIR (BIL_VAL (0xf4302bd0), BIL_VAL (0x3db267aa)), + BIL_PAIR (BIL_VAL (0x4434766f), BIL_VAL (0x4faef8e1)), + BIL_PAIR (BIL_VAL (0xfafd7dc7), BIL_VAL (0x20907840)), + BIL_PAIR (BIL_VAL (0x446c129c), BIL_VAL (0x70cbe819)), + BIL_PAIR (BIL_VAL (0x02259b10), BIL_VAL (0x3c7bbc69)), + BIL_PAIR (BIL_VAL (0xc302ddb7), BIL_VAL (0xa9d401b4)), + BIL_PAIR (BIL_VAL (0x43bb1ce6), BIL_VAL (0xfa0d75f0))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xba752674), BIL_VAL (0xbf83693c)), + BIL_PAIR (BIL_VAL (0xf584c208), BIL_VAL (0x92983d24)), + BIL_PAIR (BIL_VAL (0xb8cbb8da), BIL_VAL (0xcdc8d588)), + BIL_PAIR (BIL_VAL (0xd6e6784a), BIL_VAL (0xd0eda615)), + BIL_PAIR (BIL_VAL (0x867d5f17), BIL_VAL (0x82215f1c)), + BIL_PAIR (BIL_VAL (0xd40d1e5a), BIL_VAL (0xcd4a12e7)), + BIL_PAIR (BIL_VAL (0x47ee52cd), BIL_VAL (0xcf7a3556)), + BIL_PAIR (BIL_VAL (0x0feb0a2b), BIL_VAL (0xf1aa7c92)), + BIL_PAIR (BIL_VAL (0xd63e9959), BIL_VAL (0x2340f98b)), + BIL_PAIR (BIL_VAL (0xb075c90f), BIL_VAL (0xd0f7e682)), + BIL_PAIR (BIL_VAL (0x5276f23a), BIL_VAL (0xf678c76d)), + BIL_PAIR (BIL_VAL (0xe5187dab), BIL_VAL (0x616ea2ab)), + BIL_PAIR (BIL_VAL (0x145ee01f), BIL_VAL (0xc192e54a)), + BIL_PAIR (BIL_VAL (0x5eb1250b), BIL_VAL (0x60e4fe41)), + BIL_PAIR (BIL_VAL (0x18e9b9a7), BIL_VAL (0x9fc3476c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xdc3e7d0f), BIL_VAL (0xaa802add)), + BIL_PAIR (BIL_VAL (0x4158ca3b), BIL_VAL (0xf791e21f)), + BIL_PAIR (BIL_VAL (0xd68e123c), BIL_VAL (0xbaa51055)), + BIL_PAIR (BIL_VAL (0x4d8f528d), BIL_VAL (0xe12b0834)), + BIL_PAIR (BIL_VAL (0xc14a0694), BIL_VAL (0xb7730787)), + BIL_PAIR (BIL_VAL (0xd62613ab), BIL_VAL (0x37e9a9f2)), + BIL_PAIR (BIL_VAL (0x59087ad8), BIL_VAL (0x9d99e891)), + BIL_PAIR (BIL_VAL (0xdb774345), BIL_VAL (0x10dc7753)), + BIL_PAIR (BIL_VAL (0xcb138468), BIL_VAL (0x06092514)), + BIL_PAIR (BIL_VAL (0x51cd2c4b), BIL_VAL (0x4856e00e)), + BIL_PAIR (BIL_VAL (0xa479086f), BIL_VAL (0x71abe6f5)), + BIL_PAIR (BIL_VAL (0xfb7a4751), BIL_VAL (0x3ad868dc)), + BIL_PAIR (BIL_VAL (0xad45e5e1), BIL_VAL (0x40cbf39c)), + BIL_PAIR (BIL_VAL (0xf3da17d7), BIL_VAL (0xefb45640)), + BIL_PAIR (BIL_VAL (0x4e1e3b2d), BIL_VAL (0x8a223c3c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x53daec11), BIL_VAL (0x4e5df0fe)), + BIL_PAIR (BIL_VAL (0x34e0b523), BIL_VAL (0x6378317b)), + BIL_PAIR (BIL_VAL (0x234c6100), BIL_VAL (0x47419896)), + BIL_PAIR (BIL_VAL (0x9bd8b1cf), BIL_VAL (0xe6ddde46)), + BIL_PAIR (BIL_VAL (0x1ba6ce49), BIL_VAL (0x60cda6b9)), + BIL_PAIR (BIL_VAL (0x7504ecb1), BIL_VAL (0x99e269b9)), + BIL_PAIR (BIL_VAL (0xe50007a1), BIL_VAL (0xf5dc1d4f)), + BIL_PAIR (BIL_VAL (0x7fb125ea), BIL_VAL (0xe4aa039a)), + BIL_PAIR (BIL_VAL (0x3105927a), BIL_VAL (0x00c0c4a0)), + BIL_PAIR (BIL_VAL (0x7c351784), BIL_VAL (0x9ee1fd37)), + BIL_PAIR (BIL_VAL (0x4d1a8096), BIL_VAL (0xfdf005d4)), + BIL_PAIR (BIL_VAL (0x95cadfe7), BIL_VAL (0x9a2fa776)), + BIL_PAIR (BIL_VAL (0xc61b2bb6), BIL_VAL (0xab9b1d09)), + BIL_PAIR (BIL_VAL (0x1724af87), BIL_VAL (0x86187e6a)), + BIL_PAIR (BIL_VAL (0x8208275b), BIL_VAL (0xc294610d))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xde82dbea), BIL_VAL (0xc59331e6)), + BIL_PAIR (BIL_VAL (0x47124c46), BIL_VAL (0x83dce2c2)), + BIL_PAIR (BIL_VAL (0x8331e5d2), BIL_VAL (0x0766bb75)), + BIL_PAIR (BIL_VAL (0xab22ee6c), BIL_VAL (0xe4ca0a7b)), + BIL_PAIR (BIL_VAL (0xdfd15fef), BIL_VAL (0x08c344c7)), + BIL_PAIR (BIL_VAL (0xc9a2dde1), BIL_VAL (0x0fe2ecb7)), + BIL_PAIR (BIL_VAL (0xb31688cc), BIL_VAL (0x53832243)), + BIL_PAIR (BIL_VAL (0x9b4a0112), BIL_VAL (0x99c989e3)), + BIL_PAIR (BIL_VAL (0x4d8c293e), BIL_VAL (0x49b3c367)), + BIL_PAIR (BIL_VAL (0x7cd512e5), BIL_VAL (0x4d04ebd6)), + BIL_PAIR (BIL_VAL (0xba87bd43), BIL_VAL (0x73d103c6)), + BIL_PAIR (BIL_VAL (0xa878541b), BIL_VAL (0x44dc1d5c)), + BIL_PAIR (BIL_VAL (0xcc8aa1cf), BIL_VAL (0x3c13f77b)), + BIL_PAIR (BIL_VAL (0xba75fde7), BIL_VAL (0x94163cb8)), + BIL_PAIR (BIL_VAL (0xb52bb705), BIL_VAL (0xf7832ccd))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7eb5e3bd), BIL_VAL (0xedddb5d4)), + BIL_PAIR (BIL_VAL (0x6d42b06a), BIL_VAL (0x01f75df4)), + BIL_PAIR (BIL_VAL (0xbc9efed9), BIL_VAL (0xaff05268)), + BIL_PAIR (BIL_VAL (0x301989ce), BIL_VAL (0x9368afe5)), + BIL_PAIR (BIL_VAL (0x9c70d9f4), BIL_VAL (0x846b16f7)), + BIL_PAIR (BIL_VAL (0x16f5726c), BIL_VAL (0x925045f5)), + BIL_PAIR (BIL_VAL (0xe3eb19fb), BIL_VAL (0x59268b48)), + BIL_PAIR (BIL_VAL (0x793686fb), BIL_VAL (0x079b05ef)), + BIL_PAIR (BIL_VAL (0xa44a7227), BIL_VAL (0xcce33570)), + BIL_PAIR (BIL_VAL (0x78e3c47e), BIL_VAL (0x1d5a87fa)), + BIL_PAIR (BIL_VAL (0x30c43ecd), BIL_VAL (0x9573d6c0)), + BIL_PAIR (BIL_VAL (0xe4ef3393), BIL_VAL (0x241f1da3)), + BIL_PAIR (BIL_VAL (0x2c717e23), BIL_VAL (0x4afc315f)), + BIL_PAIR (BIL_VAL (0xc9a44fcf), BIL_VAL (0xf8db4fca)), + BIL_PAIR (BIL_VAL (0xca7913a2), BIL_VAL (0x5781b001)) + /* And implicit 5120 0 bits. */)), + /* 5376 */ + BIL_SET14 (BIL_VAL (0x6), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6ec96eb8), BIL_VAL (0xb8572f28)), + BIL_PAIR (BIL_VAL (0x6ce9824d), BIL_VAL (0x9506690c)), + BIL_PAIR (BIL_VAL (0x33a97a54), BIL_VAL (0xb56fcaf7)), + BIL_PAIR (BIL_VAL (0x0ccb6860), BIL_VAL (0xe6e7ce18)), + BIL_PAIR (BIL_VAL (0x17791b5f), BIL_VAL (0xc4a55822)), + BIL_PAIR (BIL_VAL (0xb5c711cb), BIL_VAL (0x0ead50f7)), + BIL_PAIR (BIL_VAL (0xd5bab258), BIL_VAL (0x175560a8)), + BIL_PAIR (BIL_VAL (0x3d3ef274), BIL_VAL (0xa38eeb78)), + BIL_PAIR (BIL_VAL (0x0daf8634), BIL_VAL (0xb2b9f60f)), + BIL_PAIR (BIL_VAL (0x2eb41292), BIL_VAL (0xd49b007a)), + BIL_PAIR (BIL_VAL (0x0982eab6), BIL_VAL (0xbc2dac4c)), + BIL_PAIR (BIL_VAL (0xe57ed552), BIL_VAL (0xff2687d0)), + BIL_PAIR (BIL_VAL (0xb6f72c25), BIL_VAL (0x19b9b0ae)), + BIL_PAIR (BIL_VAL (0x362f2a28), BIL_VAL (0x8fc01015)), + BIL_PAIR (BIL_VAL (0xa765975e), BIL_VAL (0x23afc8a5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xb8113e83), BIL_VAL (0xa147a532)), + BIL_PAIR (BIL_VAL (0x15e803bf), BIL_VAL (0x7c692ceb)), + BIL_PAIR (BIL_VAL (0x595500f1), BIL_VAL (0xb7c9d231)), + BIL_PAIR (BIL_VAL (0xc46af402), BIL_VAL (0xf0f7a7e7)), + BIL_PAIR (BIL_VAL (0x29e8279a), BIL_VAL (0xa559e04c)), + BIL_PAIR (BIL_VAL (0xae6da345), BIL_VAL (0x7c95a882)), + BIL_PAIR (BIL_VAL (0x4696b8c4), BIL_VAL (0xbb3666d9)), + BIL_PAIR (BIL_VAL (0x31071a79), BIL_VAL (0x8b832f0c)), + BIL_PAIR (BIL_VAL (0x35d9d2f0), BIL_VAL (0x6777e9d3)), + BIL_PAIR (BIL_VAL (0x20676b58), BIL_VAL (0xac35e60d)), + BIL_PAIR (BIL_VAL (0x4360c427), BIL_VAL (0x328e622e)), + BIL_PAIR (BIL_VAL (0x7519c692), BIL_VAL (0x83732c76)), + BIL_PAIR (BIL_VAL (0xd6f60356), BIL_VAL (0x76fd1d4c)), + BIL_PAIR (BIL_VAL (0xf535e933), BIL_VAL (0x7490bc7e)), + BIL_PAIR (BIL_VAL (0xc5c29857), BIL_VAL (0x9348deaf))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x403f6cdb), BIL_VAL (0xa25060f3)), + BIL_PAIR (BIL_VAL (0x04a312b5), BIL_VAL (0x61c3662a)), + BIL_PAIR (BIL_VAL (0x21819332), BIL_VAL (0xde47dbd0)), + BIL_PAIR (BIL_VAL (0xdc61ffcf), BIL_VAL (0x6dcc587a)), + BIL_PAIR (BIL_VAL (0xd43ad3a6), BIL_VAL (0x376d095d)), + BIL_PAIR (BIL_VAL (0x9637e47d), BIL_VAL (0x85948771)), + BIL_PAIR (BIL_VAL (0x904f19e9), BIL_VAL (0x4fb3b31c)), + BIL_PAIR (BIL_VAL (0x113c3892), BIL_VAL (0xb1049392)), + BIL_PAIR (BIL_VAL (0x882a2d0f), BIL_VAL (0x18a6ad0b)), + BIL_PAIR (BIL_VAL (0xccc2242f), BIL_VAL (0xc5133854)), + BIL_PAIR (BIL_VAL (0xafbe0ed8), BIL_VAL (0xafebce5a)), + BIL_PAIR (BIL_VAL (0xa5e3b769), BIL_VAL (0xb0242ffd)), + BIL_PAIR (BIL_VAL (0x1bc52d0a), BIL_VAL (0xb8c132fb)), + BIL_PAIR (BIL_VAL (0xd42ad880), BIL_VAL (0x0a1b85dd)), + BIL_PAIR (BIL_VAL (0xe96ed5d8), BIL_VAL (0xf26951d3))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf7abd9bb), BIL_VAL (0xd89f824d)), + BIL_PAIR (BIL_VAL (0xf2a861b7), BIL_VAL (0x612ec255)), + BIL_PAIR (BIL_VAL (0x5a9055a0), BIL_VAL (0x78ae65b4)), + BIL_PAIR (BIL_VAL (0x80159cf4), BIL_VAL (0x1a26fb0e)), + BIL_PAIR (BIL_VAL (0x8f81eb8b), BIL_VAL (0x3c4972e7)), + BIL_PAIR (BIL_VAL (0x70026ce1), BIL_VAL (0x980704a1)), + BIL_PAIR (BIL_VAL (0xdfcaceb5), BIL_VAL (0x052f0b27)), + BIL_PAIR (BIL_VAL (0xfc62f04e), BIL_VAL (0xd9500c93)), + BIL_PAIR (BIL_VAL (0xb6b03cfd), BIL_VAL (0xd3654f0d)), + BIL_PAIR (BIL_VAL (0x22bf4673), BIL_VAL (0x19f81232)), + BIL_PAIR (BIL_VAL (0x07c41f66), BIL_VAL (0x49434d9b)), + BIL_PAIR (BIL_VAL (0x9cdb3c03), BIL_VAL (0x52327cb2)), + BIL_PAIR (BIL_VAL (0xc2312382), BIL_VAL (0x63418bf0)), + BIL_PAIR (BIL_VAL (0x36f44283), BIL_VAL (0x39846d13)), + BIL_PAIR (BIL_VAL (0x34c0946a), BIL_VAL (0xa848006e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xfba19fe3), BIL_VAL (0x36cdebdf)), + BIL_PAIR (BIL_VAL (0x8cdff6b1), BIL_VAL (0x2beb4284)), + BIL_PAIR (BIL_VAL (0x6da1ee8f), BIL_VAL (0xdc239466)), + BIL_PAIR (BIL_VAL (0xbd5bffc1), BIL_VAL (0x13c4c16e)), + BIL_PAIR (BIL_VAL (0xebc887ce), BIL_VAL (0x9c18c2dc)), + BIL_PAIR (BIL_VAL (0xbd7edaee), BIL_VAL (0x8a34223f)), + BIL_PAIR (BIL_VAL (0xdf31047d), BIL_VAL (0x03602870)), + BIL_PAIR (BIL_VAL (0x609ac8b5), BIL_VAL (0xc88a2683)), + BIL_PAIR (BIL_VAL (0x3028bb8e), BIL_VAL (0xdf1facb8)), + BIL_PAIR (BIL_VAL (0x1c9abe80), BIL_VAL (0x67800d2c)), + BIL_PAIR (BIL_VAL (0x93bd6e32), BIL_VAL (0xf38f2426)), + BIL_PAIR (BIL_VAL (0xd106f01d), BIL_VAL (0x05ff4fee)), + BIL_PAIR (BIL_VAL (0xf7ccdd62), BIL_VAL (0x8420d4cf)), + BIL_PAIR (BIL_VAL (0x2c1a55ac), BIL_VAL (0x3c72834c)), + BIL_PAIR (BIL_VAL (0x6464ccda), BIL_VAL (0x66e7a8ad))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x179281bd), BIL_VAL (0x8d7c6ff6)), + BIL_PAIR (BIL_VAL (0x5df006ff), BIL_VAL (0xa9638ec8)), + BIL_PAIR (BIL_VAL (0x67d32e23), BIL_VAL (0xe854b68e)), + BIL_PAIR (BIL_VAL (0x156aa124), BIL_VAL (0xf61c249f)), + BIL_PAIR (BIL_VAL (0xce8d33fd), BIL_VAL (0xabf0a8e8)), + BIL_PAIR (BIL_VAL (0xfb6c187c), BIL_VAL (0xb632f418)), + BIL_PAIR (BIL_VAL (0x4400c386), BIL_VAL (0x4175da01)), + BIL_PAIR (BIL_VAL (0x19639820), BIL_VAL (0x594b3a05)), + BIL_PAIR (BIL_VAL (0x53949d10), BIL_VAL (0xe053044f)), + BIL_PAIR (BIL_VAL (0x94bb1d16), BIL_VAL (0xfb3b9c14)), + BIL_PAIR (BIL_VAL (0x4afbea65), BIL_VAL (0xe2864a19)), + BIL_PAIR (BIL_VAL (0x4d7ba00b), BIL_VAL (0x8963fb89)), + BIL_PAIR (BIL_VAL (0x2dca2792), BIL_VAL (0x62edcb62)), + BIL_PAIR (BIL_VAL (0xa1668304), BIL_VAL (0x37c8d012)), + BIL_PAIR (BIL_VAL (0xf45b83d7), BIL_VAL (0xa97e2350))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xade32f89), BIL_VAL (0x9bd068ca)), + BIL_PAIR (BIL_VAL (0x231f7871), BIL_VAL (0xc4189982)), + BIL_PAIR (BIL_VAL (0x01d87d77), BIL_VAL (0xf5e658b0)), + BIL_PAIR (BIL_VAL (0x95e1f056), BIL_VAL (0xa7024f3d)), + BIL_PAIR (BIL_VAL (0xe941629c), BIL_VAL (0x515fbf01)), + BIL_PAIR (BIL_VAL (0x21e6df09), BIL_VAL (0x898015dd)), + BIL_PAIR (BIL_VAL (0x5cac7a50), BIL_VAL (0xcba66225)), + BIL_PAIR (BIL_VAL (0x1fdb1f40), BIL_VAL (0xbd992a69)), + BIL_PAIR (BIL_VAL (0x649b2ea7), BIL_VAL (0x81a9c1b9)), + BIL_PAIR (BIL_VAL (0x87e8f08f), BIL_VAL (0xa034a766)), + BIL_PAIR (BIL_VAL (0x883ad30b), BIL_VAL (0x2cc0735f)), + BIL_PAIR (BIL_VAL (0xe6d7fbe1), BIL_VAL (0x6ef501d3)), + BIL_PAIR (BIL_VAL (0x295ee41d), BIL_VAL (0x0b4b6d2a)), + BIL_PAIR (BIL_VAL (0xf55c723f), BIL_VAL (0x3626d72b)), + BIL_PAIR (BIL_VAL (0xe78a229c), BIL_VAL (0xdc229684))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x954a92da), BIL_VAL (0x28cffd6f)), + BIL_PAIR (BIL_VAL (0x4e0d0031), BIL_VAL (0x89b688b8)), + BIL_PAIR (BIL_VAL (0x301a1fff), BIL_VAL (0x3dc42fe7)), + BIL_PAIR (BIL_VAL (0xbd8035ae), BIL_VAL (0x6d9278dc)), + BIL_PAIR (BIL_VAL (0x06d71643), BIL_VAL (0x1fd967d9)), + BIL_PAIR (BIL_VAL (0xcb67d223), BIL_VAL (0xfe057a4c)), + BIL_PAIR (BIL_VAL (0xddf08b0e), BIL_VAL (0xc58f9bf6)), + BIL_PAIR (BIL_VAL (0xdc61b501), BIL_VAL (0xf66c0a5c)), + BIL_PAIR (BIL_VAL (0xe8d5873c), BIL_VAL (0x5e2469f4)), + BIL_PAIR (BIL_VAL (0xb977bd3a), BIL_VAL (0x89f1b3a6)), + BIL_PAIR (BIL_VAL (0x71b1bbfa), BIL_VAL (0x17fcc265)), + BIL_PAIR (BIL_VAL (0x895edcf4), BIL_VAL (0x152af33a)), + BIL_PAIR (BIL_VAL (0xf6637be8), BIL_VAL (0x01f101d5)), + BIL_PAIR (BIL_VAL (0xbc0ab6f6), BIL_VAL (0xcba9c2cd)), + BIL_PAIR (BIL_VAL (0x77b3f6e2), BIL_VAL (0x53ec437a))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x5527e87b), BIL_VAL (0x5af23203)), + BIL_PAIR (BIL_VAL (0xdc5d4e00), BIL_VAL (0x90f5c8f5)), + BIL_PAIR (BIL_VAL (0xa4e98562), BIL_VAL (0x65ea2d92)), + BIL_PAIR (BIL_VAL (0x37cd2335), BIL_VAL (0x706e722e)), + BIL_PAIR (BIL_VAL (0x50e25e72), BIL_VAL (0x5e2c57ba)), + BIL_PAIR (BIL_VAL (0x279b323e), BIL_VAL (0xac788e46)), + BIL_PAIR (BIL_VAL (0x5169badc), BIL_VAL (0x4ac6548a)), + BIL_PAIR (BIL_VAL (0x6ff0fda5), BIL_VAL (0x89024ebc)), + BIL_PAIR (BIL_VAL (0x6d95fde4), BIL_VAL (0xe5725d28)), + BIL_PAIR (BIL_VAL (0x98da6a2f), BIL_VAL (0x7736fdf4)), + BIL_PAIR (BIL_VAL (0x246a2b72), BIL_VAL (0x2bf76fca)), + BIL_PAIR (BIL_VAL (0x651548b3), BIL_VAL (0xeddbaa1e)), + BIL_PAIR (BIL_VAL (0xdd974c75), BIL_VAL (0x639c8be5)), + BIL_PAIR (BIL_VAL (0x8c02e5dc), BIL_VAL (0xbdaba423)), + BIL_PAIR (BIL_VAL (0x290a5719), BIL_VAL (0x1a8db2a1))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x3391c1ec), BIL_VAL (0x2eecf719)), + BIL_PAIR (BIL_VAL (0xb7b380af), BIL_VAL (0x86d3529f)), + BIL_PAIR (BIL_VAL (0x11d9ba06), BIL_VAL (0x292ca3b3)), + BIL_PAIR (BIL_VAL (0x319371e0), BIL_VAL (0x74aa0b92)), + BIL_PAIR (BIL_VAL (0xe86c2cc1), BIL_VAL (0x1119acb5)), + BIL_PAIR (BIL_VAL (0xfc9e3943), BIL_VAL (0x59afe7e7)), + BIL_PAIR (BIL_VAL (0xb19264f9), BIL_VAL (0x8724785a)), + BIL_PAIR (BIL_VAL (0x551f4e55), BIL_VAL (0x837b1cb0)), + BIL_PAIR (BIL_VAL (0x3a1661b5), BIL_VAL (0xc53c8e44)), + BIL_PAIR (BIL_VAL (0x019e98a7), BIL_VAL (0x2c1232c0)), + BIL_PAIR (BIL_VAL (0xd931ad45), BIL_VAL (0x1cd8b775)), + BIL_PAIR (BIL_VAL (0x1fd2384e), BIL_VAL (0x8ea571c5)), + BIL_PAIR (BIL_VAL (0x0949d4e4), BIL_VAL (0x71d99116)), + BIL_PAIR (BIL_VAL (0x0ee318c4), BIL_VAL (0xa94a2700)), + BIL_PAIR (BIL_VAL (0x4d0b4596), BIL_VAL (0x7f272ca9))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xe3608c3a), BIL_VAL (0x38738e94)), + BIL_PAIR (BIL_VAL (0x2a35c4f4), BIL_VAL (0x75c66e0f)), + BIL_PAIR (BIL_VAL (0x028512cf), BIL_VAL (0x3ff0c109)), + BIL_PAIR (BIL_VAL (0xf1a9e538), BIL_VAL (0x193791d1)), + BIL_PAIR (BIL_VAL (0xef1f628a), BIL_VAL (0x67375e40)), + BIL_PAIR (BIL_VAL (0xb21a4713), BIL_VAL (0x5888ad68)), + BIL_PAIR (BIL_VAL (0x35104c67), BIL_VAL (0xa6ca49d6)), + BIL_PAIR (BIL_VAL (0x3338fa2a), BIL_VAL (0x337be3c1)), + BIL_PAIR (BIL_VAL (0x187f64f7), BIL_VAL (0x1e37710e)), + BIL_PAIR (BIL_VAL (0xbc4e4621), BIL_VAL (0x248e0f4a)), + BIL_PAIR (BIL_VAL (0xe1b4148f), BIL_VAL (0x578c7fd7)), + BIL_PAIR (BIL_VAL (0xf4859218), BIL_VAL (0xf601e92f)), + BIL_PAIR (BIL_VAL (0x77ee9f9c), BIL_VAL (0x96c83b5e)), + BIL_PAIR (BIL_VAL (0x2043840e), BIL_VAL (0x4cdbda0f)), + BIL_PAIR (BIL_VAL (0x4fb59deb), BIL_VAL (0x44045577))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7086d59e), BIL_VAL (0xb6025d59)), + BIL_PAIR (BIL_VAL (0x0d90219c), BIL_VAL (0x82cc0893)), + BIL_PAIR (BIL_VAL (0x0dd507df), BIL_VAL (0x59c03664)), + BIL_PAIR (BIL_VAL (0x7d120602), BIL_VAL (0x7ffb5055)), + BIL_PAIR (BIL_VAL (0x37943cd2), BIL_VAL (0x17475b41)), + BIL_PAIR (BIL_VAL (0x915fe523), BIL_VAL (0x98c681bd)), + BIL_PAIR (BIL_VAL (0xa2b06680), BIL_VAL (0xaf213582)), + BIL_PAIR (BIL_VAL (0x66317842), BIL_VAL (0x091a96a4)), + BIL_PAIR (BIL_VAL (0x352e4dc4), BIL_VAL (0x58372d7c)), + BIL_PAIR (BIL_VAL (0x8e8ff571), BIL_VAL (0x36af1cfc)), + BIL_PAIR (BIL_VAL (0x82f8e46a), BIL_VAL (0xc505a1e1)), + BIL_PAIR (BIL_VAL (0xe8c9ab9c), BIL_VAL (0x710d3c94)), + BIL_PAIR (BIL_VAL (0xa148468e), BIL_VAL (0xe229e24a)), + BIL_PAIR (BIL_VAL (0xf8b0f1ea), BIL_VAL (0x58e9b984)), + BIL_PAIR (BIL_VAL (0xfd66826d), BIL_VAL (0x2a264561))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc6210fa2), BIL_VAL (0xb01d6c78)), + BIL_PAIR (BIL_VAL (0x781a2429), BIL_VAL (0x09e9ea03)), + BIL_PAIR (BIL_VAL (0xf44e80e0), BIL_VAL (0xaefe5a16)), + BIL_PAIR (BIL_VAL (0x079b4212), BIL_VAL (0x628f06be)), + BIL_PAIR (BIL_VAL (0xd254ed67), BIL_VAL (0xeaeaab77)), + BIL_PAIR (BIL_VAL (0x6dd5597e), BIL_VAL (0xa2567f97)), + BIL_PAIR (BIL_VAL (0x2b53367c), BIL_VAL (0xbd4c2791)), + BIL_PAIR (BIL_VAL (0xeca3b4c7), BIL_VAL (0x779acef0)), + BIL_PAIR (BIL_VAL (0x22469708), BIL_VAL (0x930d3215)), + BIL_PAIR (BIL_VAL (0xb69b53b4), BIL_VAL (0x10388a67)), + BIL_PAIR (BIL_VAL (0xb5869a49), BIL_VAL (0xb445405a)), + BIL_PAIR (BIL_VAL (0x4528bda7), BIL_VAL (0xf0c50955)), + BIL_PAIR (BIL_VAL (0x7da99556), BIL_VAL (0xb67f79d2)), + BIL_PAIR (BIL_VAL (0x093932f6), BIL_VAL (0xfd38c618)), + BIL_PAIR (BIL_VAL (0xa8d9872e), BIL_VAL (0x60f02c01)) + /* And implicit 5376 0 bits. */)), + /* 5632 */ + BIL_SET14 (BIL_SET10 (BIL_VAL (0x224611), + BIL_PAIR (BIL_VAL (0xc5854d85), BIL_VAL (0x1830a03b)), + BIL_PAIR (BIL_VAL (0x29062425), BIL_VAL (0x649d1019)), + BIL_PAIR (BIL_VAL (0x60f18f93), BIL_VAL (0x6b266eb0)), + BIL_PAIR (BIL_VAL (0x43e21844), BIL_VAL (0xe3052106)), + BIL_PAIR (BIL_VAL (0x4ae94552), BIL_VAL (0xf216987a)), + BIL_PAIR (BIL_VAL (0xfdff4d0e), BIL_VAL (0x652f98ed)), + BIL_PAIR (BIL_VAL (0xb33ab0a6), BIL_VAL (0x92678193)), + BIL_PAIR (BIL_VAL (0xf689679c), BIL_VAL (0xd9e3ab52)), + BIL_PAIR (BIL_VAL (0xef781b22), BIL_VAL (0x63740f51))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6973b59d), BIL_VAL (0x47b7001d)), + BIL_PAIR (BIL_VAL (0xe7f0fb08), BIL_VAL (0x9fefc350)), + BIL_PAIR (BIL_VAL (0x61e73108), BIL_VAL (0xbab77d75)), + BIL_PAIR (BIL_VAL (0xf58d16f7), BIL_VAL (0x1f68d8a1)), + BIL_PAIR (BIL_VAL (0x22192873), BIL_VAL (0x1fdbb5f5)), + BIL_PAIR (BIL_VAL (0x02f4a286), BIL_VAL (0x4dc70d62)), + BIL_PAIR (BIL_VAL (0x6657c472), BIL_VAL (0x91980115)), + BIL_PAIR (BIL_VAL (0x0428e8ba), BIL_VAL (0x62292d51)), + BIL_PAIR (BIL_VAL (0x3f13e05b), BIL_VAL (0x3adaf585)), + BIL_PAIR (BIL_VAL (0xb58306a4), BIL_VAL (0xf8d19ef3)), + BIL_PAIR (BIL_VAL (0xd80b16e9), BIL_VAL (0xeee6d7e8)), + BIL_PAIR (BIL_VAL (0x5fc08dd6), BIL_VAL (0xe65f01b3)), + BIL_PAIR (BIL_VAL (0x9d8fa6aa), BIL_VAL (0x15365c80)), + BIL_PAIR (BIL_VAL (0x26145450), BIL_VAL (0x5deea602)), + BIL_PAIR (BIL_VAL (0x910e5850), BIL_VAL (0x473412d6))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf6c38efa), BIL_VAL (0xdb6c5db4)), + BIL_PAIR (BIL_VAL (0x0c514d2d), BIL_VAL (0x59f43e5f)), + BIL_PAIR (BIL_VAL (0x249a5829), BIL_VAL (0x856b3e92)), + BIL_PAIR (BIL_VAL (0xb7d35890), BIL_VAL (0xee1d9a4b)), + BIL_PAIR (BIL_VAL (0x77b4ee05), BIL_VAL (0x371b6610)), + BIL_PAIR (BIL_VAL (0x38705cc7), BIL_VAL (0xa4ca9e95)), + BIL_PAIR (BIL_VAL (0x5c175abb), BIL_VAL (0x85c33f19)), + BIL_PAIR (BIL_VAL (0xc2f2e569), BIL_VAL (0xf5ffcd9d)), + BIL_PAIR (BIL_VAL (0x834ead3b), BIL_VAL (0x52ac077b)), + BIL_PAIR (BIL_VAL (0x8e4c07d1), BIL_VAL (0x866fd4c3)), + BIL_PAIR (BIL_VAL (0x3f0a8808), BIL_VAL (0x3ad0ef8a)), + BIL_PAIR (BIL_VAL (0x0cc83fa1), BIL_VAL (0x25d598e4)), + BIL_PAIR (BIL_VAL (0xc0d81c14), BIL_VAL (0x2ba0e06c)), + BIL_PAIR (BIL_VAL (0xf51fbf2b), BIL_VAL (0xe17f395c)), + BIL_PAIR (BIL_VAL (0x8999bee7), BIL_VAL (0x289a3d19))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x74f0fca3), BIL_VAL (0xcc18cb6a)), + BIL_PAIR (BIL_VAL (0x095d8994), BIL_VAL (0x55915069)), + BIL_PAIR (BIL_VAL (0x38388c4d), BIL_VAL (0x98b1a8e2)), + BIL_PAIR (BIL_VAL (0x27ed41b0), BIL_VAL (0x9a6a3ab1)), + BIL_PAIR (BIL_VAL (0x07725e84), BIL_VAL (0x700904bb)), + BIL_PAIR (BIL_VAL (0x067133a7), BIL_VAL (0x0ab2c7de)), + BIL_PAIR (BIL_VAL (0xae9a5201), BIL_VAL (0xb0706c12)), + BIL_PAIR (BIL_VAL (0xa9740be6), BIL_VAL (0x95cb11bb)), + BIL_PAIR (BIL_VAL (0x79ef1b1b), BIL_VAL (0xb990d5fb)), + BIL_PAIR (BIL_VAL (0xc95a190d), BIL_VAL (0x4c1f9277)), + BIL_PAIR (BIL_VAL (0xee227b7d), BIL_VAL (0xb6ca903e)), + BIL_PAIR (BIL_VAL (0x8f70a8ac), BIL_VAL (0x5c6ee938)), + BIL_PAIR (BIL_VAL (0xf218a25d), BIL_VAL (0x8a50278e)), + BIL_PAIR (BIL_VAL (0x23fc60c8), BIL_VAL (0x46a90e78)), + BIL_PAIR (BIL_VAL (0x648c04f5), BIL_VAL (0xf57d1e0c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x689fd665), BIL_VAL (0x71bce824)), + BIL_PAIR (BIL_VAL (0x5f8f1cf2), BIL_VAL (0xf38475b6)), + BIL_PAIR (BIL_VAL (0x6c3c7ec9), BIL_VAL (0x4538912f)), + BIL_PAIR (BIL_VAL (0x2ee877ca), BIL_VAL (0xaa9d1104)), + BIL_PAIR (BIL_VAL (0xa730cc23), BIL_VAL (0x1907127d)), + BIL_PAIR (BIL_VAL (0x5e7b42c2), BIL_VAL (0x6afcdf87)), + BIL_PAIR (BIL_VAL (0xf4c1880f), BIL_VAL (0x3d98e658)), + BIL_PAIR (BIL_VAL (0xfda08d04), BIL_VAL (0x7d4fe6fb)), + BIL_PAIR (BIL_VAL (0xf4565473), BIL_VAL (0x028670a3)), + BIL_PAIR (BIL_VAL (0xece04cb2), BIL_VAL (0x6d5a5140)), + BIL_PAIR (BIL_VAL (0xda859f3f), BIL_VAL (0xec51a981)), + BIL_PAIR (BIL_VAL (0x1961309b), BIL_VAL (0x05e1d3af)), + BIL_PAIR (BIL_VAL (0xc6d4be87), BIL_VAL (0x82bc8f2f)), + BIL_PAIR (BIL_VAL (0x56ac70e9), BIL_VAL (0x9d73bfc7)), + BIL_PAIR (BIL_VAL (0x12160aba), BIL_VAL (0xfc279daa))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x857805a5), BIL_VAL (0x4380fbaa)), + BIL_PAIR (BIL_VAL (0xbe82f9d6), BIL_VAL (0xf5bfcb64)), + BIL_PAIR (BIL_VAL (0x47719264), BIL_VAL (0x35b0c2e6)), + BIL_PAIR (BIL_VAL (0x5c7fec41), BIL_VAL (0x9c3768e3)), + BIL_PAIR (BIL_VAL (0x3e3bd5fb), BIL_VAL (0x38bc3e5d)), + BIL_PAIR (BIL_VAL (0x34d4f3ba), BIL_VAL (0xb29f110a)), + BIL_PAIR (BIL_VAL (0x5e592e8c), BIL_VAL (0xa6c69d56)), + BIL_PAIR (BIL_VAL (0xeb2e1b2a), BIL_VAL (0x2d9332d1)), + BIL_PAIR (BIL_VAL (0x2137a169), BIL_VAL (0x878242a3)), + BIL_PAIR (BIL_VAL (0x1a0492a4), BIL_VAL (0xbdc9de31)), + BIL_PAIR (BIL_VAL (0x28a76ad6), BIL_VAL (0x44d29afa)), + BIL_PAIR (BIL_VAL (0x153e9624), BIL_VAL (0x5e6f4e44)), + BIL_PAIR (BIL_VAL (0xe8e29412), BIL_VAL (0x1859c55e)), + BIL_PAIR (BIL_VAL (0x0e44968a), BIL_VAL (0xb24da705)), + BIL_PAIR (BIL_VAL (0x3ceae3a1), BIL_VAL (0xaed83cb9))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x30a86acd), BIL_VAL (0xffcc2285)), + BIL_PAIR (BIL_VAL (0x90dce19b), BIL_VAL (0x9c199dc1)), + BIL_PAIR (BIL_VAL (0xbe880cec), BIL_VAL (0xc52750cf)), + BIL_PAIR (BIL_VAL (0xc328856e), BIL_VAL (0xe3afa9ed)), + BIL_PAIR (BIL_VAL (0xa7137ce3), BIL_VAL (0xe0501600)), + BIL_PAIR (BIL_VAL (0x8022151a), BIL_VAL (0x2dc31a08)), + BIL_PAIR (BIL_VAL (0xf901220a), BIL_VAL (0x99220a34)), + BIL_PAIR (BIL_VAL (0x1692f79e), BIL_VAL (0x2813c945)), + BIL_PAIR (BIL_VAL (0x1f825830), BIL_VAL (0x0096598e)), + BIL_PAIR (BIL_VAL (0x0c154132), BIL_VAL (0xdb00c005)), + BIL_PAIR (BIL_VAL (0x1cadc641), BIL_VAL (0x5883a620)), + BIL_PAIR (BIL_VAL (0x2f26e4ea), BIL_VAL (0x18945888)), + BIL_PAIR (BIL_VAL (0xe505ffd1), BIL_VAL (0xc823ebe7)), + BIL_PAIR (BIL_VAL (0x4a1e6345), BIL_VAL (0x7046538e)), + BIL_PAIR (BIL_VAL (0x34ba87b3), BIL_VAL (0x8e5f4e27))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xaf4d7c28), BIL_VAL (0x4a6ee0a0)), + BIL_PAIR (BIL_VAL (0x03580a19), BIL_VAL (0x4eedc35e)), + BIL_PAIR (BIL_VAL (0xb8add60a), BIL_VAL (0x31597e32)), + BIL_PAIR (BIL_VAL (0x701cb142), BIL_VAL (0xa9dc6f2d)), + BIL_PAIR (BIL_VAL (0x6558c1ab), BIL_VAL (0x478cffcf)), + BIL_PAIR (BIL_VAL (0x3cc783a3), BIL_VAL (0xdb8e696a)), + BIL_PAIR (BIL_VAL (0xfd03ec6f), BIL_VAL (0x5742987a)), + BIL_PAIR (BIL_VAL (0x03c8b055), BIL_VAL (0x436e3d08)), + BIL_PAIR (BIL_VAL (0xa48a857d), BIL_VAL (0xd18dd2c6)), + BIL_PAIR (BIL_VAL (0xa29277ba), BIL_VAL (0xd2b2afc3)), + BIL_PAIR (BIL_VAL (0x8a1963c2), BIL_VAL (0x9b6bda73)), + BIL_PAIR (BIL_VAL (0x7f1974ac), BIL_VAL (0xc3a11a16)), + BIL_PAIR (BIL_VAL (0x58d29915), BIL_VAL (0x5d14c454)), + BIL_PAIR (BIL_VAL (0x542bb043), BIL_VAL (0x5b05cb25)), + BIL_PAIR (BIL_VAL (0x4951333e), BIL_VAL (0x4c387095))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6fbc8d86), BIL_VAL (0x298fda21)), + BIL_PAIR (BIL_VAL (0x68bbf68a), BIL_VAL (0xa0982715)), + BIL_PAIR (BIL_VAL (0xb06a75e4), BIL_VAL (0x20c87bf2)), + BIL_PAIR (BIL_VAL (0xa9ab6fc3), BIL_VAL (0x4aa3e2a8)), + BIL_PAIR (BIL_VAL (0x8d3a8f3d), BIL_VAL (0xa64bbe64)), + BIL_PAIR (BIL_VAL (0x45ebf828), BIL_VAL (0x4ddca23c)), + BIL_PAIR (BIL_VAL (0xfa5819be), BIL_VAL (0xd6a51541)), + BIL_PAIR (BIL_VAL (0x96802289), BIL_VAL (0x061fb4ad)), + BIL_PAIR (BIL_VAL (0x7b3965e8), BIL_VAL (0x36a7fd59)), + BIL_PAIR (BIL_VAL (0x02320d2d), BIL_VAL (0x079dffbb)), + BIL_PAIR (BIL_VAL (0x531add3a), BIL_VAL (0xa62ce433)), + BIL_PAIR (BIL_VAL (0xfc550dc4), BIL_VAL (0x9eae49b5)), + BIL_PAIR (BIL_VAL (0x1be766c2), BIL_VAL (0x63538568)), + BIL_PAIR (BIL_VAL (0x3ba00603), BIL_VAL (0x29b6c45a)), + BIL_PAIR (BIL_VAL (0xe38bceda), BIL_VAL (0xc0da63e5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x6e5acc42), BIL_VAL (0xd44fe620)), + BIL_PAIR (BIL_VAL (0x78f460aa), BIL_VAL (0x232c7a3f)), + BIL_PAIR (BIL_VAL (0x35e87bec), BIL_VAL (0x90244273)), + BIL_PAIR (BIL_VAL (0x09668bce), BIL_VAL (0x5f995e37)), + BIL_PAIR (BIL_VAL (0xf8af85b2), BIL_VAL (0xeed6dca2)), + BIL_PAIR (BIL_VAL (0x3d85a418), BIL_VAL (0xdf92bbe7)), + BIL_PAIR (BIL_VAL (0x82cd7a94), BIL_VAL (0xd3714389)), + BIL_PAIR (BIL_VAL (0xa38205e3), BIL_VAL (0x5c101afa)), + BIL_PAIR (BIL_VAL (0xa66fd3cd), BIL_VAL (0xd0d66873)), + BIL_PAIR (BIL_VAL (0x6eb82347), BIL_VAL (0x42fc81c3)), + BIL_PAIR (BIL_VAL (0x1bd0d662), BIL_VAL (0x2e1afa37)), + BIL_PAIR (BIL_VAL (0x5115612d), BIL_VAL (0x53b5cee2)), + BIL_PAIR (BIL_VAL (0xb03c85c6), BIL_VAL (0x4ac311d8)), + BIL_PAIR (BIL_VAL (0x4908573e), BIL_VAL (0x32e9e141)), + BIL_PAIR (BIL_VAL (0x61a46a90), BIL_VAL (0xbde97339))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x1c23c7b6), BIL_VAL (0xf359df5c)), + BIL_PAIR (BIL_VAL (0x9fce7d70), BIL_VAL (0x5aa28d3b)), + BIL_PAIR (BIL_VAL (0x42f92afe), BIL_VAL (0xda0aaeb8)), + BIL_PAIR (BIL_VAL (0xeeddc616), BIL_VAL (0x27867923)), + BIL_PAIR (BIL_VAL (0x1aa03f21), BIL_VAL (0x48def2ea)), + BIL_PAIR (BIL_VAL (0xa7f2ea80), BIL_VAL (0xe0eaecd0)), + BIL_PAIR (BIL_VAL (0x284d69cd), BIL_VAL (0xe2b6cb71)), + BIL_PAIR (BIL_VAL (0xf211d8e1), BIL_VAL (0x65d1131b)), + BIL_PAIR (BIL_VAL (0x76c5f38c), BIL_VAL (0xacd1da0c)), + BIL_PAIR (BIL_VAL (0xf873780b), BIL_VAL (0x502a4657)), + BIL_PAIR (BIL_VAL (0x02f7083c), BIL_VAL (0xfc50768e)), + BIL_PAIR (BIL_VAL (0xcad280d8), BIL_VAL (0x0c2fd094)), + BIL_PAIR (BIL_VAL (0xf1225e0d), BIL_VAL (0x2ef10751)), + BIL_PAIR (BIL_VAL (0x32c67f08), BIL_VAL (0x9da7e189)), + BIL_PAIR (BIL_VAL (0x35413aff), BIL_VAL (0xd12bc27c))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x888ac652), BIL_VAL (0x3f20dd4c)), + BIL_PAIR (BIL_VAL (0xa0854b12), BIL_VAL (0xfe80f887)), + BIL_PAIR (BIL_VAL (0x35eb81e4), BIL_VAL (0xb340f758)), + BIL_PAIR (BIL_VAL (0x617bce8f), BIL_VAL (0xb6badfc1)), + BIL_PAIR (BIL_VAL (0xde6881c3), BIL_VAL (0x9d849ad7)), + BIL_PAIR (BIL_VAL (0x7695a1eb), BIL_VAL (0xdc42c300)), + BIL_PAIR (BIL_VAL (0xd6e0304a), BIL_VAL (0x8aa5b484)), + BIL_PAIR (BIL_VAL (0xb0cf9037), BIL_VAL (0xa8f26ef4)), + BIL_PAIR (BIL_VAL (0x66f8b022), BIL_VAL (0xfb699240)), + BIL_PAIR (BIL_VAL (0x8f5bcc7c), BIL_VAL (0x6754ff70)), + BIL_PAIR (BIL_VAL (0x83d12676), BIL_VAL (0x415e075d)), + BIL_PAIR (BIL_VAL (0xf68c0beb), BIL_VAL (0xee399ddd)), + BIL_PAIR (BIL_VAL (0x20af61de), BIL_VAL (0xe96b5097)), + BIL_PAIR (BIL_VAL (0x732819fe), BIL_VAL (0x2e213507)), + BIL_PAIR (BIL_VAL (0x7980e129), BIL_VAL (0xcc947259))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x86c6c4a5), BIL_VAL (0xb0a83c59)), + BIL_PAIR (BIL_VAL (0x7451da67), BIL_VAL (0x748b1e42)), + BIL_PAIR (BIL_VAL (0x72b63dae), BIL_VAL (0x845a7164)), + BIL_PAIR (BIL_VAL (0x3b1ee8d1), BIL_VAL (0x112449b5)), + BIL_PAIR (BIL_VAL (0x6628fb0b), BIL_VAL (0x0b1fdbea)), + BIL_PAIR (BIL_VAL (0xbcc5b9b1), BIL_VAL (0x5a1771cf)), + BIL_PAIR (BIL_VAL (0xa45a3923), BIL_VAL (0xebe20258)), + BIL_PAIR (BIL_VAL (0xcd8e6fa2), BIL_VAL (0x2fdc050b)), + BIL_PAIR (BIL_VAL (0x3323abac), BIL_VAL (0x81f1c603)), + BIL_PAIR (BIL_VAL (0x8a277d96), BIL_VAL (0xbe1b64d3)), + BIL_PAIR (BIL_VAL (0x0fdb1ec9), BIL_VAL (0x02f236e5)), + BIL_PAIR (BIL_VAL (0x6297e059), BIL_VAL (0xff9b1c49)), + BIL_PAIR (BIL_VAL (0x81ab0116), BIL_VAL (0x8557d004)), + BIL_PAIR (BIL_VAL (0xe70b09e6), BIL_VAL (0x51b0d5ff)), + BIL_PAIR (BIL_VAL (0x7fb0acf2), BIL_VAL (0xbafb2397))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x05c0888d), BIL_VAL (0x25512a50)), + BIL_PAIR (BIL_VAL (0x7204fffd), BIL_VAL (0x4583a151)), + BIL_PAIR (BIL_VAL (0x01056e0f), BIL_VAL (0x10f6176a)), + BIL_PAIR (BIL_VAL (0xfda18615), BIL_VAL (0xa4103397)), + BIL_PAIR (BIL_VAL (0xb119b33d), BIL_VAL (0xf4a0c422)), + BIL_PAIR (BIL_VAL (0x4249adb7), BIL_VAL (0x8534981b)), + BIL_PAIR (BIL_VAL (0x341fe960), BIL_VAL (0xc28eb015)), + BIL_PAIR (BIL_VAL (0xbff6ab02), BIL_VAL (0x02e855bf)), + BIL_PAIR (BIL_VAL (0x5956e080), BIL_VAL (0x06ecbb57)), + BIL_PAIR (BIL_VAL (0xed03ee43), BIL_VAL (0xbda5fb81)), + BIL_PAIR (BIL_VAL (0x0418e2af), BIL_VAL (0x5b67f484)), + BIL_PAIR (BIL_VAL (0xcea6e916), BIL_VAL (0x91a74df1)), + BIL_PAIR (BIL_VAL (0xd64c259e), BIL_VAL (0x80a83a19)), + BIL_PAIR (BIL_VAL (0xfcad49f7), BIL_VAL (0xc7c617e5)), + BIL_PAIR (BIL_VAL (0xf99f2ec6), BIL_VAL (0x366ea801)) + /* And implicit 5632 0 bits. */)), + /* 5888 */ + BIL_SET15 (BIL_SET4 (BIL_PAIR (BIL_VAL (0xb6), BIL_VAL (0x9c2f0f5f)), + BIL_PAIR (BIL_VAL (0x3a0b54df), BIL_VAL (0x874de552)), + BIL_PAIR (BIL_VAL (0xfc578936), BIL_VAL (0x3e72b00a)), + BIL_PAIR (BIL_VAL (0xe0f17bfc), BIL_VAL (0x86e27c0b))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf3dfaed9), BIL_VAL (0x6c0195b2)), + BIL_PAIR (BIL_VAL (0x670bc090), BIL_VAL (0x6095339b)), + BIL_PAIR (BIL_VAL (0x3e504cf0), BIL_VAL (0xd2129fb6)), + BIL_PAIR (BIL_VAL (0x53a4da9f), BIL_VAL (0xa13f3ccc)), + BIL_PAIR (BIL_VAL (0x9347090e), BIL_VAL (0x24030512)), + BIL_PAIR (BIL_VAL (0xfb20335a), BIL_VAL (0x345c18a9)), + BIL_PAIR (BIL_VAL (0xdf61191b), BIL_VAL (0x4f7c601e)), + BIL_PAIR (BIL_VAL (0xcc328739), BIL_VAL (0x90f87126)), + BIL_PAIR (BIL_VAL (0xdf54b40c), BIL_VAL (0xbaed4e8a)), + BIL_PAIR (BIL_VAL (0x267def57), BIL_VAL (0x357514bb)), + BIL_PAIR (BIL_VAL (0x8160bf4b), BIL_VAL (0xb290ae76)), + BIL_PAIR (BIL_VAL (0xe5e7f565), BIL_VAL (0x0661a615)), + BIL_PAIR (BIL_VAL (0xe9c872eb), BIL_VAL (0xe4cc46cb)), + BIL_PAIR (BIL_VAL (0x48dc9fb9), BIL_VAL (0x7c462050)), + BIL_PAIR (BIL_VAL (0x429ed245), BIL_VAL (0xf1a07d84))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7c07d157), BIL_VAL (0x1ee51f55)), + BIL_PAIR (BIL_VAL (0xdff55caa), BIL_VAL (0x9cdd0227)), + BIL_PAIR (BIL_VAL (0xbcf35566), BIL_VAL (0xe49968b2)), + BIL_PAIR (BIL_VAL (0xfee6a274), BIL_VAL (0xcceae998)), + BIL_PAIR (BIL_VAL (0xd2247dc6), BIL_VAL (0xc8bd26ef)), + BIL_PAIR (BIL_VAL (0x274297cb), BIL_VAL (0xac8741d8)), + BIL_PAIR (BIL_VAL (0xc6b3dd94), BIL_VAL (0x2ad0a509)), + BIL_PAIR (BIL_VAL (0x903b8a53), BIL_VAL (0x9e022b6a)), + BIL_PAIR (BIL_VAL (0x18870e45), BIL_VAL (0x7225b6aa)), + BIL_PAIR (BIL_VAL (0x55a22483), BIL_VAL (0xe540b6c1)), + BIL_PAIR (BIL_VAL (0xcc085e0b), BIL_VAL (0xf68253d8)), + BIL_PAIR (BIL_VAL (0x4db686a3), BIL_VAL (0x6ae3ffe4)), + BIL_PAIR (BIL_VAL (0x4009afc8), BIL_VAL (0x848ac80a)), + BIL_PAIR (BIL_VAL (0xb62abbc6), BIL_VAL (0x4f248623)), + BIL_PAIR (BIL_VAL (0xe26c3a47), BIL_VAL (0x7ec69732))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x822d819b), BIL_VAL (0x03e952dd)), + BIL_PAIR (BIL_VAL (0x0d84b07c), BIL_VAL (0xc34e4257)), + BIL_PAIR (BIL_VAL (0x88f5ecf4), BIL_VAL (0x0a84250b)), + BIL_PAIR (BIL_VAL (0x7e5e5b84), BIL_VAL (0x0e026f69)), + BIL_PAIR (BIL_VAL (0x144ec6cf), BIL_VAL (0x210d7864)), + BIL_PAIR (BIL_VAL (0xc614d606), BIL_VAL (0xe93f0416)), + BIL_PAIR (BIL_VAL (0x11f3860a), BIL_VAL (0x930fc0fa)), + BIL_PAIR (BIL_VAL (0xe8f7422e), BIL_VAL (0xf03cc7b9)), + BIL_PAIR (BIL_VAL (0x07f97237), BIL_VAL (0xe0683326)), + BIL_PAIR (BIL_VAL (0x7941c334), BIL_VAL (0x8e33e751)), + BIL_PAIR (BIL_VAL (0x55954fed), BIL_VAL (0x34b1ffa6)), + BIL_PAIR (BIL_VAL (0x39752a67), BIL_VAL (0x496cc888)), + BIL_PAIR (BIL_VAL (0xb9d11490), BIL_VAL (0x7989a821)), + BIL_PAIR (BIL_VAL (0x2c6f4de1), BIL_VAL (0x35db807b)), + BIL_PAIR (BIL_VAL (0x3a7ed38d), BIL_VAL (0x7cb22201))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xf507034d), BIL_VAL (0x53138333)), + BIL_PAIR (BIL_VAL (0xd5ffe9d5), BIL_VAL (0xaac605fe)), + BIL_PAIR (BIL_VAL (0x0de44db0), BIL_VAL (0x74f5bd09)), + BIL_PAIR (BIL_VAL (0x26987a89), BIL_VAL (0x6c8117ef)), + BIL_PAIR (BIL_VAL (0xdee29ed8), BIL_VAL (0x2487f78d)), + BIL_PAIR (BIL_VAL (0x38ed3905), BIL_VAL (0x701d6f35)), + BIL_PAIR (BIL_VAL (0xa2d2443d), BIL_VAL (0x9391ae60)), + BIL_PAIR (BIL_VAL (0x1fe34152), BIL_VAL (0xadc680c9)), + BIL_PAIR (BIL_VAL (0x56a49c7b), BIL_VAL (0xb1e317f6)), + BIL_PAIR (BIL_VAL (0xdc87b300), BIL_VAL (0xa53afc1a)), + BIL_PAIR (BIL_VAL (0x941331cb), BIL_VAL (0x8d1fd58d)), + BIL_PAIR (BIL_VAL (0x086885f5), BIL_VAL (0x071dbdbf)), + BIL_PAIR (BIL_VAL (0xaf6582e4), BIL_VAL (0xe58e508e)), + BIL_PAIR (BIL_VAL (0xc9df47c5), BIL_VAL (0x4b7a4143)), + BIL_PAIR (BIL_VAL (0x0eaa28a5), BIL_VAL (0x98ed0d93))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xbcb1297f), BIL_VAL (0x1cbb01b1)), + BIL_PAIR (BIL_VAL (0x655bd5a7), BIL_VAL (0x578e33a3)), + BIL_PAIR (BIL_VAL (0x1037cd98), BIL_VAL (0xc42bba93)), + BIL_PAIR (BIL_VAL (0x4e8b638a), BIL_VAL (0xade264a4)), + BIL_PAIR (BIL_VAL (0x737fe90b), BIL_VAL (0xf99da471)), + BIL_PAIR (BIL_VAL (0x7c7dcbe4), BIL_VAL (0xb9474906)), + BIL_PAIR (BIL_VAL (0xf8041016), BIL_VAL (0xec620e0c)), + BIL_PAIR (BIL_VAL (0x0af21946), BIL_VAL (0x5a8d2d6c)), + BIL_PAIR (BIL_VAL (0xb9d814cd), BIL_VAL (0xc6010de4)), + BIL_PAIR (BIL_VAL (0xe0281f62), BIL_VAL (0x3103cc37)), + BIL_PAIR (BIL_VAL (0xab4d633e), BIL_VAL (0x10739577)), + BIL_PAIR (BIL_VAL (0x0853f0dc), BIL_VAL (0x3e7ad4ab)), + BIL_PAIR (BIL_VAL (0x0d175489), BIL_VAL (0x21f60a63)), + BIL_PAIR (BIL_VAL (0x44ab0113), BIL_VAL (0x64548d71)), + BIL_PAIR (BIL_VAL (0x3c057901), BIL_VAL (0xaa8003bf))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2660df28), BIL_VAL (0x88c4bb58)), + BIL_PAIR (BIL_VAL (0x3e870811), BIL_VAL (0xdab6a814)), + BIL_PAIR (BIL_VAL (0x34d7bf36), BIL_VAL (0x6e40c2dc)), + BIL_PAIR (BIL_VAL (0xbb63038c), BIL_VAL (0xc767b4f8)), + BIL_PAIR (BIL_VAL (0x1c4bd559), BIL_VAL (0x26297872)), + BIL_PAIR (BIL_VAL (0x43843e1c), BIL_VAL (0x49641d35)), + BIL_PAIR (BIL_VAL (0x7f51664c), BIL_VAL (0xdc063fa6)), + BIL_PAIR (BIL_VAL (0xa686f12b), BIL_VAL (0x29b55e60)), + BIL_PAIR (BIL_VAL (0x75842790), BIL_VAL (0x5ffad9c1)), + BIL_PAIR (BIL_VAL (0x6c01d6d8), BIL_VAL (0xa11f5efb)), + BIL_PAIR (BIL_VAL (0x9f54ce6f), BIL_VAL (0xd7becaa8)), + BIL_PAIR (BIL_VAL (0xc8177d7d), BIL_VAL (0x2ef9f79a)), + BIL_PAIR (BIL_VAL (0x89701cb6), BIL_VAL (0x9e7789c2)), + BIL_PAIR (BIL_VAL (0x0a681df5), BIL_VAL (0x80966623)), + BIL_PAIR (BIL_VAL (0xf908416a), BIL_VAL (0xca315df5))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x4cc3f685), BIL_VAL (0xbc3e29d5)), + BIL_PAIR (BIL_VAL (0x5a19e272), BIL_VAL (0x62318fdc)), + BIL_PAIR (BIL_VAL (0xb91fa145), BIL_VAL (0x3efe94d0)), + BIL_PAIR (BIL_VAL (0xf3abea58), BIL_VAL (0x892cf5c6)), + BIL_PAIR (BIL_VAL (0xcf22ae77), BIL_VAL (0x7d8654c2)), + BIL_PAIR (BIL_VAL (0x4696946c), BIL_VAL (0x68108d91)), + BIL_PAIR (BIL_VAL (0xb29a59e4), BIL_VAL (0xf21ff450)), + BIL_PAIR (BIL_VAL (0xd13a0c2b), BIL_VAL (0xfb4a382d)), + BIL_PAIR (BIL_VAL (0x043435c9), BIL_VAL (0x51b3d2e9)), + BIL_PAIR (BIL_VAL (0x2197efb1), BIL_VAL (0xb3d8f782)), + BIL_PAIR (BIL_VAL (0xeedab9aa), BIL_VAL (0x1c522eb7)), + BIL_PAIR (BIL_VAL (0xe9099ec8), BIL_VAL (0x95964edb)), + BIL_PAIR (BIL_VAL (0xffd4362e), BIL_VAL (0x3642c206)), + BIL_PAIR (BIL_VAL (0x49fa105b), BIL_VAL (0xf08e21ec)), + BIL_PAIR (BIL_VAL (0x7e5aadcb), BIL_VAL (0x7756d510))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x7bbcdcda), BIL_VAL (0xb5cacc68)), + BIL_PAIR (BIL_VAL (0x7006e753), BIL_VAL (0x3ce15400)), + BIL_PAIR (BIL_VAL (0x63490c5f), BIL_VAL (0x5593b7b7)), + BIL_PAIR (BIL_VAL (0x6bd1be87), BIL_VAL (0xde2e3312)), + BIL_PAIR (BIL_VAL (0x13b3d979), BIL_VAL (0x05cadc60)), + BIL_PAIR (BIL_VAL (0x948df4eb), BIL_VAL (0xed35a8a9)), + BIL_PAIR (BIL_VAL (0x07ee724d), BIL_VAL (0x6b8e0594)), + BIL_PAIR (BIL_VAL (0xc0637779), BIL_VAL (0xb52fbb65)), + BIL_PAIR (BIL_VAL (0x55507351), BIL_VAL (0xff5aa2ce)), + BIL_PAIR (BIL_VAL (0xeaaef2c8), BIL_VAL (0x82412ce1)), + BIL_PAIR (BIL_VAL (0x83117aed), BIL_VAL (0xa0a6348d)), + BIL_PAIR (BIL_VAL (0x70ba9721), BIL_VAL (0xd6e90d79)), + BIL_PAIR (BIL_VAL (0x6c516598), BIL_VAL (0x73210902)), + BIL_PAIR (BIL_VAL (0x5650acc4), BIL_VAL (0x9eb28adc)), + BIL_PAIR (BIL_VAL (0x23205b36), BIL_VAL (0xdb55eec0))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x3fdba800), BIL_VAL (0x64744377)), + BIL_PAIR (BIL_VAL (0x8f9e58c0), BIL_VAL (0x165ec14e)), + BIL_PAIR (BIL_VAL (0x7581b624), BIL_VAL (0xfa8e889f)), + BIL_PAIR (BIL_VAL (0x0a9fb9ca), BIL_VAL (0x73ad2ea8)), + BIL_PAIR (BIL_VAL (0xea017cd4), BIL_VAL (0xa0c0f9ac)), + BIL_PAIR (BIL_VAL (0x247dc112), BIL_VAL (0x2f84312b)), + BIL_PAIR (BIL_VAL (0xf3042144), BIL_VAL (0xf3d15c68)), + BIL_PAIR (BIL_VAL (0x0ce9312d), BIL_VAL (0x3c5f786d)), + BIL_PAIR (BIL_VAL (0xf175a825), BIL_VAL (0xe120ccbc)), + BIL_PAIR (BIL_VAL (0xfb8f9110), BIL_VAL (0x0b9f1e61)), + BIL_PAIR (BIL_VAL (0xac706bd5), BIL_VAL (0x4268448c)), + BIL_PAIR (BIL_VAL (0xcc01efd7), BIL_VAL (0x761d89e4)), + BIL_PAIR (BIL_VAL (0xcddbe060), BIL_VAL (0x4125b5bb)), + BIL_PAIR (BIL_VAL (0x8838be28), BIL_VAL (0x986d5971)), + BIL_PAIR (BIL_VAL (0xb31ab06e), BIL_VAL (0x6b56b12a))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x2bd1a7dc), BIL_VAL (0xd70a422f)), + BIL_PAIR (BIL_VAL (0xc441e54c), BIL_VAL (0xe6fc9564)), + BIL_PAIR (BIL_VAL (0xbea0d95e), BIL_VAL (0x8982a21f)), + BIL_PAIR (BIL_VAL (0xa4bbb914), BIL_VAL (0x6591cd1d)), + BIL_PAIR (BIL_VAL (0xf0aab4fd), BIL_VAL (0x20e6c665)), + BIL_PAIR (BIL_VAL (0xfa617aa8), BIL_VAL (0x8c7055dc)), + BIL_PAIR (BIL_VAL (0xb4571d53), BIL_VAL (0xdc6c4284)), + BIL_PAIR (BIL_VAL (0xaeb4e341), BIL_VAL (0xa75559ea)), + BIL_PAIR (BIL_VAL (0x20e9de7f), BIL_VAL (0x9d85fb46)), + BIL_PAIR (BIL_VAL (0xc08d351b), BIL_VAL (0x9a9b9444)), + BIL_PAIR (BIL_VAL (0x59f76be6), BIL_VAL (0xc778ccfb)), + BIL_PAIR (BIL_VAL (0x156f11cc), BIL_VAL (0x189cb45a)), + BIL_PAIR (BIL_VAL (0x199e5556), BIL_VAL (0x33f6ad26)), + BIL_PAIR (BIL_VAL (0x4639ff60), BIL_VAL (0x553244de)), + BIL_PAIR (BIL_VAL (0x30803502), BIL_VAL (0x64667fad))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0x25372141), BIL_VAL (0x79053f93)), + BIL_PAIR (BIL_VAL (0x5e108092), BIL_VAL (0x46d82e10)), + BIL_PAIR (BIL_VAL (0x5fc07c0f), BIL_VAL (0xa9b7cf87)), + BIL_PAIR (BIL_VAL (0x592e9739), BIL_VAL (0x0c0df6a8)), + BIL_PAIR (BIL_VAL (0x8d2c8c6a), BIL_VAL (0xa7e79970)), + BIL_PAIR (BIL_VAL (0x5f0f0d6e), BIL_VAL (0xfed62b13)), + BIL_PAIR (BIL_VAL (0xb5d793eb), BIL_VAL (0xfcff5102)), + BIL_PAIR (BIL_VAL (0x75deb1df), BIL_VAL (0xa73466cb)), + BIL_PAIR (BIL_VAL (0x18e3ce4e), BIL_VAL (0x97d128f4)), + BIL_PAIR (BIL_VAL (0xccfc82d5), BIL_VAL (0x9f60906d)), + BIL_PAIR (BIL_VAL (0x14817167), BIL_VAL (0x8b51fff1)), + BIL_PAIR (BIL_VAL (0xe358ea51), BIL_VAL (0x278265cd)), + BIL_PAIR (BIL_VAL (0xbb2612ac), BIL_VAL (0x5d04f567)), + BIL_PAIR (BIL_VAL (0x90f464b3), BIL_VAL (0x96343904)), + BIL_PAIR (BIL_VAL (0x6e951de7), BIL_VAL (0xe1c854e1))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xc072efcb), BIL_VAL (0x6540c04a)), + BIL_PAIR (BIL_VAL (0x5e4c8689), BIL_VAL (0x08b72393)), + BIL_PAIR (BIL_VAL (0x308cfe4c), BIL_VAL (0xca4c36d5)), + BIL_PAIR (BIL_VAL (0xc1a27b0f), BIL_VAL (0x9e4784e0)), + BIL_PAIR (BIL_VAL (0x14055fa5), BIL_VAL (0x67c1af07)), + BIL_PAIR (BIL_VAL (0x70ccc621), BIL_VAL (0xedb456cb)), + BIL_PAIR (BIL_VAL (0x9a107e0e), BIL_VAL (0xae4b6cad)), + BIL_PAIR (BIL_VAL (0x728839e2), BIL_VAL (0x07f6cea4)), + BIL_PAIR (BIL_VAL (0xfc6c5347), BIL_VAL (0x77fc3b96)), + BIL_PAIR (BIL_VAL (0xabdf4309), BIL_VAL (0xc5987182)), + BIL_PAIR (BIL_VAL (0xb54a823d), BIL_VAL (0x227d572c)), + BIL_PAIR (BIL_VAL (0x6f6b0d97), BIL_VAL (0x97fdd78f)), + BIL_PAIR (BIL_VAL (0x86caba74), BIL_VAL (0xbfa00e2b)), + BIL_PAIR (BIL_VAL (0xb0e7b9cf), BIL_VAL (0x21b9234e)), + BIL_PAIR (BIL_VAL (0x4cbd1e95), BIL_VAL (0x55951cfb))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xba719851), BIL_VAL (0xcfe084b3)), + BIL_PAIR (BIL_VAL (0x874bb9dc), BIL_VAL (0x1903f99e)), + BIL_PAIR (BIL_VAL (0x932aaf77), BIL_VAL (0x83bf173f)), + BIL_PAIR (BIL_VAL (0x0acf46e1), BIL_VAL (0xbe903963)), + BIL_PAIR (BIL_VAL (0x78eb625b), BIL_VAL (0xed21681e)), + BIL_PAIR (BIL_VAL (0x299cd37b), BIL_VAL (0xe3ad7362)), + BIL_PAIR (BIL_VAL (0x756e7c09), BIL_VAL (0x78c9ed55)), + BIL_PAIR (BIL_VAL (0xae4a1aa8), BIL_VAL (0x5e13fd5c)), + BIL_PAIR (BIL_VAL (0x8ea27de1), BIL_VAL (0x973e8da1)), + BIL_PAIR (BIL_VAL (0x478f96dc), BIL_VAL (0xb29a6212)), + BIL_PAIR (BIL_VAL (0xc2854b84), BIL_VAL (0xc56bfa1a)), + BIL_PAIR (BIL_VAL (0x16dc5087), BIL_VAL (0xbba76d21)), + BIL_PAIR (BIL_VAL (0x12388c0c), BIL_VAL (0x30efce8d)), + BIL_PAIR (BIL_VAL (0xf5d11211), BIL_VAL (0x0a6b1d70)), + BIL_PAIR (BIL_VAL (0xb3a6922e), BIL_VAL (0x60d69e6e))), + BIL_SET15 (BIL_PAIR (BIL_VAL (0xcb79b7bd), BIL_VAL (0xee9d39a4)), + BIL_PAIR (BIL_VAL (0xa024daaa), BIL_VAL (0x9ec4b538)), + BIL_PAIR (BIL_VAL (0x74fee300), BIL_VAL (0x9b187c38)), + BIL_PAIR (BIL_VAL (0x0fa4d2e1), BIL_VAL (0xc1787658)), + BIL_PAIR (BIL_VAL (0x6b271020), BIL_VAL (0x0f8b4bb9)), + BIL_PAIR (BIL_VAL (0xc17559de), BIL_VAL (0xc3891a38)), + BIL_PAIR (BIL_VAL (0xf2d0fe6d), BIL_VAL (0xe4749dcb)), + BIL_PAIR (BIL_VAL (0x5066ba0f), BIL_VAL (0x9228562b)), + BIL_PAIR (BIL_VAL (0x5975dec4), BIL_VAL (0xf279385b)), + BIL_PAIR (BIL_VAL (0x5a191ac9), BIL_VAL (0xc41800e9)), + BIL_PAIR (BIL_VAL (0xb01d9559), BIL_VAL (0xb96aee41)), + BIL_PAIR (BIL_VAL (0x4c1f6ff9), BIL_VAL (0x86032047)), + BIL_PAIR (BIL_VAL (0xee0377c1), BIL_VAL (0xa4c8af03)), + BIL_PAIR (BIL_VAL (0xfba3b3f9), BIL_VAL (0x22606fb0)), + BIL_PAIR (BIL_VAL (0x16f7ec21), BIL_VAL (0x97fd2401)) + /* And implicit 5888 0 bits. */)) +}; + +static unsigned short pow10_offs[] = { + /* 0 */ BIL_OFF (0, 0), + /* 1 */ BIL_OFF (1, 1), + /* 2 */ BIL_OFF (2, 2), + /* 3 */ BIL_OFF (3, 3), + /* 4 */ BIL_OFF (4, 4), + /* 5 */ BIL_OFF (5, 5), + /* 6 */ BIL_OFF (6, 6), + /* 7 */ BIL_OFF (7, 7), + /* 8 */ BIL_OFF (8, 8), + /* 9 */ BIL_OFF (9, 9), + /* 10 */ BIL_OFF (10, 10), + /* 11 */ BIL_OFF (11, 12), + /* 12 */ BIL_OFF (12, 14), + /* 13 */ BIL_OFF (13, 16), + /* 14 */ BIL_OFF (14, 18), + /* 15 */ BIL_OFF (15, 20), + /* 16 */ BIL_OFF (16, 22), + /* 17 */ BIL_OFF (17, 24), + /* 18 */ BIL_OFF (18, 26), + /* 19 */ BIL_OFF (19, 28), + /* 20 */ BIL_OFF (20, 30), + /* 21 */ BIL_OFF (22, 33), + /* 22 */ BIL_OFF (24, 36), + /* 23 */ BIL_OFF (26, 39), + /* 24 */ BIL_OFF (28, 42), + /* 25 */ BIL_OFF (30, 45), + /* 26 */ BIL_OFF (32, 48), + /* 27 */ BIL_OFF (34, 51), + /* 28 */ BIL_OFF (36, 54), + /* 29 */ BIL_OFF (38, 57), + /* 30 */ BIL_OFF (40, 61), + /* 31 */ BIL_OFF (42, 65), + /* 32 */ BIL_OFF (44, 69), + /* 33 */ BIL_OFF (46, 73), + /* 34 */ BIL_OFF (48, 77), + /* 35 */ BIL_OFF (50, 81), + /* 36 */ BIL_OFF (52, 85), + /* 37 */ BIL_OFF (54, 89), + /* 38 */ BIL_OFF (56, 93), + /* 39 */ BIL_OFF (58, 97), + /* 40 */ BIL_OFF (61, 102), + /* 41 */ BIL_OFF (64, 107), + /* 42 */ BIL_OFF (67, 112), + /* 43 */ BIL_OFF (70, 117), + /* 44 */ BIL_OFF (73, 122), + /* 45 */ BIL_OFF (76, 127), + /* 46 */ BIL_OFF (79, 132), + /* 47 */ BIL_OFF (82, 137), + /* 48 */ BIL_OFF (85, 142), + /* 49 */ BIL_OFF (88, 147), + /* 50 */ BIL_OFF (91, 153), + /* 51 */ BIL_OFF (94, 159), + /* 52 */ BIL_OFF (97, 165), + /* 53 */ BIL_OFF (100, 171), + /* 54 */ BIL_OFF (103, 177), + /* 55 */ BIL_OFF (106, 183), + /* 56 */ BIL_OFF (109, 189), + /* 57 */ BIL_OFF (112, 195), + /* 58 */ BIL_OFF (115, 201), + /* 59 */ BIL_OFF (119, 208), + /* 60 */ BIL_OFF (123, 215), + /* 61 */ BIL_OFF (127, 222), + /* 62 */ BIL_OFF (131, 229), + /* 63 */ BIL_OFF (135, 236), + /* 64 */ BIL_OFF (139, 243), + /* 65 */ BIL_OFF (142, 248), + /* 66 */ BIL_OFF (145, 253), + /* 67 */ BIL_OFF (148, 258), + /* 68 */ BIL_OFF (151, 263), + /* 69 */ BIL_OFF (154, 269), + /* 70 */ BIL_OFF (157, 275), + /* 71 */ BIL_OFF (160, 281), + /* 72 */ BIL_OFF (163, 287), + /* 73 */ BIL_OFF (166, 293), + /* 74 */ BIL_OFF (169, 299), + /* 75 */ BIL_OFF (172, 305), + /* 76 */ BIL_OFF (175, 311), + /* 77 */ BIL_OFF (178, 317), + /* 78 */ BIL_OFF (181, 323), + /* 79 */ BIL_OFF (185, 330), + /* 80 */ BIL_OFF (189, 337), + /* 81 */ BIL_OFF (193, 344), + /* 82 */ BIL_OFF (197, 351), + /* 83 */ BIL_OFF (201, 358), + /* 84 */ BIL_OFF (205, 365), + /* 85 */ BIL_OFF (209, 372), + /* 86 */ BIL_OFF (213, 379), + /* 87 */ BIL_OFF (217, 386), + /* 88 */ BIL_OFF (221, 394), + /* 89 */ BIL_OFF (225, 402), + /* 90 */ BIL_OFF (229, 410), + /* 91 */ BIL_OFF (233, 418), + /* 92 */ BIL_OFF (237, 426), + /* 93 */ BIL_OFF (241, 434), + /* 94 */ BIL_OFF (245, 442), + /* 95 */ BIL_OFF (249, 450), + /* 96 */ BIL_OFF (253, 458), + /* 97 */ BIL_OFF (257, 466), + /* 98 */ BIL_OFF (262, 475), + /* 99 */ BIL_OFF (267, 484), + /* 100 */ BIL_OFF (272, 493), + /* 101 */ BIL_OFF (277, 502), + /* 102 */ BIL_OFF (282, 511), + /* 103 */ BIL_OFF (287, 520), + /* 104 */ BIL_OFF (292, 529), + /* 105 */ BIL_OFF (297, 538), + /* 106 */ BIL_OFF (302, 547), + /* 107 */ BIL_OFF (307, 557), + /* 108 */ BIL_OFF (312, 567), + /* 109 */ BIL_OFF (317, 577), + /* 110 */ BIL_OFF (322, 587), + /* 111 */ BIL_OFF (327, 597), + /* 112 */ BIL_OFF (332, 607), + /* 113 */ BIL_OFF (337, 617), + /* 114 */ BIL_OFF (342, 627), + /* 115 */ BIL_OFF (347, 637), + /* 116 */ BIL_OFF (352, 647), + /* 117 */ BIL_OFF (358, 658), + /* 118 */ BIL_OFF (364, 669), + /* 119 */ BIL_OFF (370, 680), + /* 120 */ BIL_OFF (376, 691), + /* 121 */ BIL_OFF (382, 702), + /* 122 */ BIL_OFF (388, 713), + /* 123 */ BIL_OFF (394, 724), + /* 124 */ BIL_OFF (400, 735), + /* 125 */ BIL_OFF (406, 746), + /* 126 */ BIL_OFF (412, 757), + /* 127 */ BIL_OFF (418, 769), + /* 128 */ BIL_OFF (424, 781), + /* 129 */ BIL_OFF (429, 791), + /* 130 */ BIL_OFF (434, 801), + /* 131 */ BIL_OFF (439, 811), + /* 132 */ BIL_OFF (444, 821), + /* 133 */ BIL_OFF (449, 831), + /* 134 */ BIL_OFF (454, 841), + /* 135 */ BIL_OFF (459, 851), + /* 136 */ BIL_OFF (465, 862), + /* 137 */ BIL_OFF (471, 873), + /* 138 */ BIL_OFF (477, 884), + /* 139 */ BIL_OFF (483, 895), + /* 140 */ BIL_OFF (489, 906), + /* 141 */ BIL_OFF (495, 917), + /* 142 */ BIL_OFF (501, 928), + /* 143 */ BIL_OFF (507, 939), + /* 144 */ BIL_OFF (513, 950), + /* 145 */ BIL_OFF (519, 961), + /* 146 */ BIL_OFF (525, 973), + /* 147 */ BIL_OFF (531, 985), + /* 148 */ BIL_OFF (537, 997), + /* 149 */ BIL_OFF (543, 1009), + /* 150 */ BIL_OFF (549, 1021), + /* 151 */ BIL_OFF (555, 1033), + /* 152 */ BIL_OFF (561, 1045), + /* 153 */ BIL_OFF (567, 1057), + /* 154 */ BIL_OFF (573, 1069), + /* 155 */ BIL_OFF (579, 1081), + /* 156 */ BIL_OFF (586, 1094), + /* 157 */ BIL_OFF (593, 1107), + /* 158 */ BIL_OFF (600, 1120), + /* 159 */ BIL_OFF (607, 1133), + /* 160 */ BIL_OFF (614, 1146), + /* 161 */ BIL_OFF (621, 1159), + /* 162 */ BIL_OFF (628, 1172), + /* 163 */ BIL_OFF (635, 1185), + /* 164 */ BIL_OFF (642, 1198), + /* 165 */ BIL_OFF (649, 1212), + /* 166 */ BIL_OFF (656, 1226), + /* 167 */ BIL_OFF (663, 1240), + /* 168 */ BIL_OFF (670, 1254), + /* 169 */ BIL_OFF (677, 1268), + /* 170 */ BIL_OFF (684, 1282), + /* 171 */ BIL_OFF (691, 1296), + /* 172 */ BIL_OFF (698, 1310), + /* 173 */ BIL_OFF (705, 1324), + /* 174 */ BIL_OFF (712, 1338), + /* 175 */ BIL_OFF (720, 1353), + /* 176 */ BIL_OFF (728, 1368), + /* 177 */ BIL_OFF (736, 1383), + /* 178 */ BIL_OFF (744, 1398), + /* 179 */ BIL_OFF (752, 1413), + /* 180 */ BIL_OFF (760, 1428), + /* 181 */ BIL_OFF (768, 1443), + /* 182 */ BIL_OFF (776, 1458), + /* 183 */ BIL_OFF (784, 1473), + /* 184 */ BIL_OFF (792, 1488), + /* 185 */ BIL_OFF (800, 1504), + /* 186 */ BIL_OFF (808, 1520), + /* 187 */ BIL_OFF (816, 1536), + /* 188 */ BIL_OFF (824, 1552), + /* 189 */ BIL_OFF (832, 1568), + /* 190 */ BIL_OFF (840, 1584), + /* 191 */ BIL_OFF (848, 1600), + /* 192 */ BIL_OFF (856, 1616), + /* 193 */ BIL_OFF (863, 1630), + /* 194 */ BIL_OFF (871, 1645), + /* 195 */ BIL_OFF (879, 1660), + /* 196 */ BIL_OFF (887, 1675), + /* 197 */ BIL_OFF (895, 1690), + /* 198 */ BIL_OFF (903, 1705), + /* 199 */ BIL_OFF (911, 1720), + /* 200 */ BIL_OFF (919, 1735), + /* 201 */ BIL_OFF (927, 1750), + /* 202 */ BIL_OFF (935, 1765), + /* 203 */ BIL_OFF (943, 1780), + /* 204 */ BIL_OFF (951, 1796), + /* 205 */ BIL_OFF (959, 1812), + /* 206 */ BIL_OFF (967, 1828), + /* 207 */ BIL_OFF (975, 1844), + /* 208 */ BIL_OFF (983, 1860), + /* 209 */ BIL_OFF (991, 1876), + /* 210 */ BIL_OFF (999, 1892), + /* 211 */ BIL_OFF (1007, 1908), + /* 212 */ BIL_OFF (1015, 1924), + /* 213 */ BIL_OFF (1024, 1941), + /* 214 */ BIL_OFF (1033, 1958), + /* 215 */ BIL_OFF (1042, 1975), + /* 216 */ BIL_OFF (1051, 1992), + /* 217 */ BIL_OFF (1060, 2009), + /* 218 */ BIL_OFF (1069, 2026), + /* 219 */ BIL_OFF (1078, 2043), + /* 220 */ BIL_OFF (1087, 2060), + /* 221 */ BIL_OFF (1096, 2077), + /* 222 */ BIL_OFF (1105, 2094), + /* 223 */ BIL_OFF (1114, 2112), + /* 224 */ BIL_OFF (1123, 2130), + /* 225 */ BIL_OFF (1132, 2148), + /* 226 */ BIL_OFF (1141, 2166), + /* 227 */ BIL_OFF (1150, 2184), + /* 228 */ BIL_OFF (1159, 2202), + /* 229 */ BIL_OFF (1168, 2220), + /* 230 */ BIL_OFF (1177, 2238), + /* 231 */ BIL_OFF (1186, 2256), + /* 232 */ BIL_OFF (1195, 2274), + /* 233 */ BIL_OFF (1205, 2293), + /* 234 */ BIL_OFF (1215, 2312), + /* 235 */ BIL_OFF (1225, 2331), + /* 236 */ BIL_OFF (1235, 2350), + /* 237 */ BIL_OFF (1245, 2369), + /* 238 */ BIL_OFF (1255, 2388), + /* 239 */ BIL_OFF (1265, 2407), + /* 240 */ BIL_OFF (1275, 2426), + /* 241 */ BIL_OFF (1285, 2445), + /* 242 */ BIL_OFF (1295, 2465), + /* 243 */ BIL_OFF (1305, 2485), + /* 244 */ BIL_OFF (1315, 2505), + /* 245 */ BIL_OFF (1325, 2525), + /* 246 */ BIL_OFF (1335, 2545), + /* 247 */ BIL_OFF (1345, 2565), + /* 248 */ BIL_OFF (1355, 2585), + /* 249 */ BIL_OFF (1365, 2605), + /* 250 */ BIL_OFF (1375, 2625), + /* 251 */ BIL_OFF (1385, 2645), + /* 252 */ BIL_OFF (1396, 2666), + /* 253 */ BIL_OFF (1407, 2687), + /* 254 */ BIL_OFF (1418, 2708), + /* 255 */ BIL_OFF (1429, 2729), + /* 256 */ BIL_OFF (1440, 2750), + /* 512 */ BIL_OFF (1450, 2769), + /* 768 */ BIL_OFF (1469, 2807), + /* 1024 */ BIL_OFF (1497, 2863), + /* 1280 */ BIL_OFF (1535, 2938), + /* 1536 */ BIL_OFF (1582, 3031), + /* 1792 */ BIL_OFF (1638, 3143), + /* 2048 */ BIL_OFF (1704, 3274), + /* 2304 */ BIL_OFF (1779, 3423), + /* 2560 */ BIL_OFF (1863, 3591), + /* 2816 */ BIL_OFF (1956, 3777), + /* 3072 */ BIL_OFF (2059, 3982), + /* 3328 */ BIL_OFF (2171, 4205), + /* 3584 */ BIL_OFF (2292, 4447), + /* 3840 */ BIL_OFF (2423, 4708), + /* 4096 */ BIL_OFF (2563, 4987), + /* 4352 */ BIL_OFF (2712, 5285), + /* 4608 */ BIL_OFF (2870, 5601), + /* 4864 */ BIL_OFF (3038, 5936), + /* 5120 */ BIL_OFF (3215, 6289), + /* 5376 */ BIL_OFF (3401, 6661), + /* 5632 */ BIL_OFF (3597, 7052), + /* 5888 */ BIL_OFF (3802, 7461), + /* End */ BIL_OFF (4016, 7889) +}; From patchwork Wed Aug 9 18:23:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133412 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2992243vqr; Wed, 9 Aug 2023 11:24:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2Wmh5E9VthbcHmvw+7OVwKy2odiMNizMjo8v/pX6o7FrJrrJk1hNMDe7Oswhm/2wukjOL X-Received: by 2002:a05:6402:1495:b0:522:45db:48e3 with SMTP id e21-20020a056402149500b0052245db48e3mr3244edv.30.1691605472842; Wed, 09 Aug 2023 11:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605472; cv=none; d=google.com; s=arc-20160816; b=fuAG3er3SGSGzg8uyccqCwD/vk74XimZmLBZKh3aprTJfwfXjMwOTKwaKFcax+bs/C Fmxeiz/nlueTIcjYtsuDSeT+mU0RrREwBZD6etQoI9JL+7/xeupNLOJuj3dNq2d4bBhU mKaPS/8afXXCNemKjyHyLHxi9rEPDa4+dg98YUMQOBI3Ri2/VoYXrW/fzKqI00uIULNa kv5clgk6Qpuf+q3yRiPV23rOUa8AyGZGFT1vx/dS/PStD3rcZ409ax3aiH2eOWP95axA Ve/GkSt2WP3o6TZspjo1+zxHSy8QCai0ilyjjM4bVa4C7TeF0AT4J1FsBe9pWNdjewOR obxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=pJJenksAZ2jb/Oo3j4IB4lYD0mwB9kgr6Lxzyod5nfI=; fh=4mNOhKok1LgwInaiu16myQpmn8f1SH+8KJcB3fEN4wU=; b=iWH5jKNYVaFjKM61qCkgFfCGuIjVPOXX+snNOYIXqTwnB9pm/DNr82eOR3EsU2ziaQ 12sF5R67U4+H1bbBGiKVybG5k5tU07xv165yoW24waVM2y1fA5MCAYTyisPi0YMlRL31 R9nv+TCpepZNvR8oBFMVAwI0yf37xsAtahWGozkMSOIXkGQ12ZVg2Tv9FWcnicVBSkQ5 ES1H91TsH9LhZx+qMVFCI4ZHp+3Gbb3vvmvqLqHfPhle4eJk55BshQCuldJcuD4DyoXi /7AGWlxopbKBRXTneJYPCz5b3dsLcYp4QxB0QESO2+t+lUhTs2uWUO/fhXfy0YLQQYxB 6pZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ht8UX8W7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l21-20020aa7c3d5000000b005231e3b2825si8167397edr.602.2023.08.09.11.24.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:24:32 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ht8UX8W7; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 08AFA3858D33 for ; Wed, 9 Aug 2023 18:24:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 08AFA3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605462; bh=pJJenksAZ2jb/Oo3j4IB4lYD0mwB9kgr6Lxzyod5nfI=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=Ht8UX8W7WKiXRebSLzr5HtNrJkHcvoY3TnBQwKd1/rL736iRaNsHuACn5388GrqqH 8DFb8Ir4iQWBUfrQKU2ppnkdmJAZuYa0XFAU7DWQs6ZtgLXXKbnnsAPMVV5+beRoy+ gViwPOIC6lL5RcoD4zTuzHN6aKINAMxwQEnP/kOU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 55F6C3858D33 for ; Wed, 9 Aug 2023 18:23:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55F6C3858D33 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-155-1yjPqYKoMlCbKxV-FdsiQg-1; Wed, 09 Aug 2023 14:23:10 -0400 X-MC-Unique: 1yjPqYKoMlCbKxV-FdsiQg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B8641800CAC; Wed, 9 Aug 2023 18:23:09 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 281E440C2076; Wed, 9 Aug 2023 18:23:09 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IN6n22042980 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:23:06 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IN5n02042979; Wed, 9 Aug 2023 20:23:05 +0200 Date: Wed, 9 Aug 2023 20:23:05 +0200 To: "Joseph S. Myers" , Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 9/12] libgcc _BitInt support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_INVALID, DKIM_SIGNED, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773776900557383751 X-GMAIL-MSGID: 1773776900557383751 Hi! This patch adds the library helpers for multiplication, division + modulo and casts from and to floating point (both binary and decimal). As described in the intro, the first step is try to reduce further the passed in precision by skipping over most significant limbs with just zeros or sign bit copies. For multiplication and division I've implemented a simple algorithm, using something smarter like Karatsuba or Toom N-Way might be faster for very large _BitInts (which we don't support right now anyway), but could mean more code in libgcc, which maybe isn't what people are willing to accept. For the to/from floating point conversions the patch uses soft-fp, because it already has tons of handy macros which can be used for that. In theory it could be implemented using {,unsigned} long long or {,unsigned} __int128 to/from floating point conversions with some frexp before/after, but at that point we already need to force it into integer registers and analyze it anyway. Plus, for 32-bit arches there is no __int128 that could be used for XF/TF mode stuff. I know that soft-fp is owned by glibc and I think the op-common.h change should be propagated there, but the bitint stuff is really GCC specific and IMHO doesn't belong into the glibc copy. 2023-08-09 Jakub Jelinek PR c/102989 libgcc/ * config/aarch64/t-softfp (softfp_extras): Use += rather than :=. * config/i386/64/t-softfp (softfp_extras): Likewise. * config/i386/libgcc-glibc.ver (GCC_14.0.0): Export _BitInt support routines. * config/i386/t-softfp (softfp_extras): Add fixxfbitint and bf, hf and xf mode floatbitint. (CFLAGS-floatbitintbf.c, CFLAGS-floatbitinthf.c): Add -msse2. * config/riscv/t-softfp32 (softfp_extras): Use += rather than :=. * config/rs6000/t-e500v1-fp (softfp_extras): Likewise. * config/rs6000/t-e500v2-fp (softfp_extras): Likewise. * config/t-softfp (softfp_floatbitint_funcs): New. (softfp_bid_list): New. (softfp_func_list): Add sf and df mode from and to _BitInt libcalls. (softfp_bid_file_list): New. (LIB2ADD_ST): Add $(softfp_bid_file_list). * config/t-softfp-sfdftf (softfp_extras): Add fixtfbitint and floatbitinttf. * config/t-softfp-tf (softfp_extras): Likewise. * libgcc2.c (bitint_reduce_prec): New inline function. (BITINT_INC, BITINT_END): Define. (bitint_mul_1, bitint_addmul_1): New helper functions. (__mulbitint3): New function. (bitint_negate, bitint_submul_1): New helper functions. (__divmodbitint4): New function. * libgcc2.h (LIBGCC2_UNITS_PER_WORD): When building _BitInt support libcalls, redefine depending on __LIBGCC_BITINT_LIMB_WIDTH__. (__mulbitint3, __divmodbitint4): Declare. * libgcc-std.ver.in (GCC_14.0.0): Export _BitInt support routines. * Makefile.in (lib2funcs): Add _mulbitint3. (LIB2_DIVMOD_FUNCS): Add _divmodbitint4. * soft-fp/bitint.h: New file. * soft-fp/fixdfbitint.c: New file. * soft-fp/fixsfbitint.c: New file. * soft-fp/fixtfbitint.c: New file. * soft-fp/fixxfbitint.c: New file. * soft-fp/floatbitintbf.c: New file. * soft-fp/floatbitintdf.c: New file. * soft-fp/floatbitinthf.c: New file. * soft-fp/floatbitintsf.c: New file. * soft-fp/floatbitinttf.c: New file. * soft-fp/floatbitintxf.c: New file. * soft-fp/op-common.h (_FP_FROM_INT): Add support for rsize up to 4 * _FP_W_TYPE_SIZE rather than just 2 * _FP_W_TYPE_SIZE. * soft-fp/bitintpow10.c: New file. * soft-fp/fixsdbitint.c: New file. * soft-fp/fixddbitint.c: New file. * soft-fp/fixtdbitint.c: New file. * soft-fp/floatbitintsd.c: New file. * soft-fp/floatbitintdd.c: New file. * soft-fp/floatbitinttd.c: New file. Jakub --- libgcc/config/aarch64/t-softfp.jj 2023-08-08 15:54:35.737595343 +0200 +++ libgcc/config/aarch64/t-softfp 2023-08-08 16:12:02.346939560 +0200 @@ -3,7 +3,7 @@ softfp_int_modes := si di ti softfp_extensions := sftf dftf hftf bfsf softfp_truncations := tfsf tfdf tfhf tfbf dfbf sfbf hfbf softfp_exclude_libgcc2 := n -softfp_extras := fixhfti fixunshfti floattihf floatuntihf \ +softfp_extras += fixhfti fixunshfti floattihf floatuntihf \ floatdibf floatundibf floattibf floatuntibf TARGET_LIBGCC2_CFLAGS += -Wno-missing-prototypes --- libgcc/config/i386/64/t-softfp.jj 2023-08-08 15:54:35.766594936 +0200 +++ libgcc/config/i386/64/t-softfp 2023-08-08 16:12:02.346939560 +0200 @@ -1,4 +1,4 @@ -softfp_extras := fixhfti fixunshfti floattihf floatuntihf \ +softfp_extras += fixhfti fixunshfti floattihf floatuntihf \ floattibf floatuntibf CFLAGS-fixhfti.c += -msse2 --- libgcc/config/i386/libgcc-glibc.ver.jj 2023-08-08 15:54:35.831594026 +0200 +++ libgcc/config/i386/libgcc-glibc.ver 2023-08-08 16:12:02.347939546 +0200 @@ -226,3 +226,13 @@ GCC_13.0.0 { __truncxfbf2 __trunchfbf2 } + +%inherit GCC_14.0.0 GCC_13.0.0 +GCC_14.0.0 { + __PFX__fixxfbitint + __PFX__fixtfbitint + __PFX__floatbitintbf + __PFX__floatbitinthf + __PFX__floatbitintxf + __PFX__floatbitinttf +} --- libgcc/config/i386/t-softfp.jj 2023-08-08 15:55:09.819118062 +0200 +++ libgcc/config/i386/t-softfp 2023-08-08 16:12:02.347939546 +0200 @@ -10,7 +10,7 @@ softfp_extensions := hfsf hfdf hftf hfxf softfp_truncations := tfhf xfhf dfhf sfhf tfsf dfsf tfdf tfxf \ tfbf xfbf dfbf sfbf hfbf -softfp_extras += eqhf2 +softfp_extras += eqhf2 fixxfbitint $(foreach m,hf bf xf,floatbitint$(m)) CFLAGS-extendhfsf2.c += -msse2 CFLAGS-extendhfdf2.c += -msse2 @@ -28,6 +28,9 @@ CFLAGS-truncxfbf2.c += -msse2 CFLAGS-trunctfbf2.c += -msse2 CFLAGS-trunchfbf2.c += -msse2 +CFLAGS-floatbitintbf.c += -msse2 +CFLAGS-floatbitinthf.c += -msse2 + CFLAGS-eqhf2.c += -msse2 CFLAGS-_divhc3.c += -msse2 CFLAGS-_mulhc3.c += -msse2 --- libgcc/config/riscv/t-softfp32.jj 2023-08-08 15:54:35.920592780 +0200 +++ libgcc/config/riscv/t-softfp32 2023-08-08 16:12:02.347939546 +0200 @@ -13,7 +13,7 @@ softfp_extensions := sftf dftf softfp_truncations := tfsf tfdf # Enable divide routines to make -mno-fdiv work. -softfp_extras := divsf3 divdf3 +softfp_extras += divsf3 divdf3 else # !ABI_DOUBLE @@ -28,7 +28,7 @@ else # ABI_SINGLE # Enable divide routines to make -mno-fdiv work. -softfp_extras := divsf3 +softfp_extras += divsf3 endif @@ -38,7 +38,7 @@ else # ABI_QUAD # Enable divide routines to make -mno-fdiv work. -softfp_extras := divsf3 divdf3 divtf3 +softfp_extras += divsf3 divdf3 divtf3 endif --- libgcc/config/rs6000/t-e500v1-fp.jj 2023-08-08 15:54:35.965592150 +0200 +++ libgcc/config/rs6000/t-e500v1-fp 2023-08-08 16:12:02.347939546 +0200 @@ -29,4 +29,4 @@ softfp_int_modes := si di softfp_extensions := sfdf softfp_truncations := dfsf softfp_exclude_libgcc2 := n -softfp_extras := unordsf2 +softfp_extras += unordsf2 --- libgcc/config/rs6000/t-e500v2-fp.jj 2023-08-08 15:54:35.965592150 +0200 +++ libgcc/config/rs6000/t-e500v2-fp 2023-08-08 16:12:02.347939546 +0200 @@ -23,4 +23,4 @@ softfp_int_modes := softfp_extensions := softfp_truncations := softfp_exclude_libgcc2 := n -softfp_extras := unordsf2 unorddf2 +softfp_extras += unordsf2 unorddf2 --- libgcc/config/t-softfp.jj 2023-08-08 15:54:35.992591772 +0200 +++ libgcc/config/t-softfp 2023-08-08 16:22:09.404440148 +0200 @@ -64,12 +64,21 @@ softfp_float_funcs = add$(m)3 div$(m)3 e neg$(m)2 sub$(m)3 unord$(m)2 softfp_floatint_funcs = fix$(m)$(i) fixuns$(m)$(i) \ float$(i)$(m) floatun$(i)$(m) +softfp_floatbitint_funcs = fix$(m)bitint floatbitint$(m) +softfp_bid_list := +ifeq ($(decimal_float),yes) +ifeq ($(enable_decimal_float),bid) +softfp_bid_list += bitintpow10 \ + $(foreach m,sd dd td,fix$(m)bitint floatbitint$(m)) +endif +endif softfp_func_list := \ $(foreach m,$(softfp_float_modes), \ $(softfp_float_funcs) \ $(foreach i,$(softfp_int_modes), \ $(softfp_floatint_funcs))) \ + $(foreach m,sf df,$(softfp_floatbitint_funcs)) \ $(foreach e,$(softfp_extensions),extend$(e)2) \ $(foreach t,$(softfp_truncations),trunc$(t)2) \ $(softfp_extras) @@ -116,6 +125,8 @@ softfp_file_list := \ $(addsuffix .c,$(addprefix $(srcdir)/soft-fp/,$(softfp_func_list))) endif endif +softfp_bid_file_list := \ + $(addsuffix .c,$(addprefix $(srcdir)/soft-fp/,$(softfp_bid_list))) # Disable missing prototype and type limit warnings. The prototypes # for the functions in the soft-fp files have not been brought across @@ -129,6 +140,7 @@ soft-fp-objects = $(addsuffix $(objext), $(soft-fp-objects) : INTERNAL_CFLAGS += -Wno-missing-prototypes -Wno-type-limits LIB2ADD += $(softfp_file_list) +LIB2ADD_ST += $(softfp_bid_file_list) ifneq ($(softfp_exclude_libgcc2),y) # Functions in libgcc2.c are excluded for each soft-float mode (a --- libgcc/config/t-softfp-sfdftf.jj 2023-08-08 15:54:35.992591772 +0200 +++ libgcc/config/t-softfp-sfdftf 2023-08-08 16:12:02.347939546 +0200 @@ -2,4 +2,5 @@ softfp_float_modes := sf df tf softfp_int_modes := si di softfp_extensions := sfdf sftf dftf xftf softfp_truncations := dfsf tfsf tfdf tfxf +softfp_extras += fixtfbitint floatbitinttf softfp_exclude_libgcc2 := n --- libgcc/config/t-softfp-tf.jj 2023-08-08 15:54:36.011591506 +0200 +++ libgcc/config/t-softfp-tf 2023-08-08 16:12:02.347939546 +0200 @@ -2,4 +2,5 @@ softfp_float_modes := tf softfp_int_modes := si di ti softfp_extensions := sftf dftf xftf softfp_truncations := tfsf tfdf tfxf +softfp_extras += fixtfbitint floatbitinttf softfp_exclude_libgcc2 := n --- libgcc/libgcc2.c.jj 2023-08-08 15:54:36.059590834 +0200 +++ libgcc/libgcc2.c 2023-08-08 16:12:02.348939532 +0200 @@ -1301,6 +1301,687 @@ __udivdi3 (UDWtype n, UDWtype d) } #endif +#if (defined(__BITINT_MAXWIDTH__) \ + && (defined(L_mulbitint3) || defined(L_divmodbitint4))) +/* _BitInt support. */ + +/* If *P is zero or sign extended (the latter only for PREC < 0) from + some narrower _BitInt value, reduce precision. */ + +static inline __attribute__((__always_inline__)) SItype +bitint_reduce_prec (const UWtype **p, SItype prec) +{ + UWtype mslimb; + SItype i; + if (prec < 0) + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + i = 0; +#else + i = ((USItype) -1 - prec) / W_TYPE_SIZE; +#endif + mslimb = (*p)[i]; + if (mslimb & ((UWtype) 1 << (((USItype) -1 - prec) % W_TYPE_SIZE))) + { + SItype n = ((USItype) -prec) % W_TYPE_SIZE; + if (n) + { + mslimb |= ((UWtype) -1 << (((USItype) -1 - prec) % W_TYPE_SIZE)); + if (mslimb == (UWtype) -1) + { + prec += n; + if (prec >= -1) + return -2; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + n = 0; + } + } + while (mslimb == (UWtype) -1) + { + prec += W_TYPE_SIZE; + if (prec >= -1) + return -2; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + if (n == 0) + { + if ((Wtype) mslimb >= 0) + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + --p; +#endif + return prec - 1; + } + } + return prec; + } + else + prec = -prec; + } + else + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + i = 0; +#else + i = ((USItype) prec - 1) / W_TYPE_SIZE; +#endif + mslimb = (*p)[i]; + } + SItype n = ((USItype) prec) % W_TYPE_SIZE; + if (n) + { + mslimb &= ((UWtype) 1 << (((USItype) prec) % W_TYPE_SIZE)) - 1; + if (mslimb == 0) + { + prec -= n; + if (prec == 0) + return 1; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + } + while (mslimb == 0) + { + prec -= W_TYPE_SIZE; + if (prec == 0) + return 1; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + return prec; +} + +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ +# define BITINT_INC -1 +# define BITINT_END(be, le) (be) +#else +# define BITINT_INC 1 +# define BITINT_END(be, le) (le) +#endif + +#ifdef L_mulbitint3 +/* D = S * L. */ + +static UWtype +bitint_mul_1 (UWtype *d, const UWtype *s, UWtype l, SItype n) +{ + UWtype sv, hi, lo, c = 0; + do + { + sv = *s; + s += BITINT_INC; + umul_ppmm (hi, lo, sv, l); + c = __builtin_add_overflow (lo, c, &lo) + hi; + *d = lo; + d += BITINT_INC; + } + while (--n); + return c; +} + +/* D += S * L. */ + +static UWtype +bitint_addmul_1 (UWtype *d, const UWtype *s, UWtype l, SItype n) +{ + UWtype sv, hi, lo, c = 0; + do + { + sv = *s; + s += BITINT_INC; + umul_ppmm (hi, lo, sv, l); + hi += __builtin_add_overflow (lo, *d, &lo); + c = __builtin_add_overflow (lo, c, &lo) + hi; + *d = lo; + d += BITINT_INC; + } + while (--n); + return c; +} + +/* If XPREC is positive, it is precision in bits + of an unsigned _BitInt operand (which has XPREC/W_TYPE_SIZE + full limbs and if Xprec%W_TYPE_SIZE one partial limb. + If Xprec is negative, -XPREC is precision in bits + of a signed _BitInt operand. RETPREC should be always + positive. */ + +void +__mulbitint3 (UWtype *ret, SItype retprec, + const UWtype *u, SItype uprec, + const UWtype *v, SItype vprec) +{ + uprec = bitint_reduce_prec (&u, uprec); + vprec = bitint_reduce_prec (&v, vprec); + USItype auprec = uprec < 0 ? -uprec : uprec; + USItype avprec = vprec < 0 ? -vprec : vprec; + + /* Prefer non-negative U. + Otherwise make sure V doesn't have higher precision than U. */ + if ((uprec < 0 && vprec >= 0) + || (avprec > auprec && !(uprec >= 0 && vprec < 0))) + { + SItype p; + const UWtype *t; + p = uprec; uprec = vprec; vprec = p; + p = auprec; auprec = avprec; avprec = p; + t = u; u = v; v = t; + } + + USItype un = auprec / W_TYPE_SIZE; + USItype un2 = (auprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype vn = avprec / W_TYPE_SIZE; + USItype vn2 = (avprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype retn = ((USItype) retprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype retidx, uidx, vidx; + UWtype vv; + /* Indexes of least significant limb. */ +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + retidx = retn - 1; + uidx = un2 - 1; + vidx = vn2 - 1; +#else + retidx = 0; + uidx = 0; + vidx = 0; +#endif + if (__builtin_expect (auprec <= W_TYPE_SIZE, 0) && vprec < 0) + { + UWtype uu = u[uidx]; + if (__builtin_expect (auprec < W_TYPE_SIZE, 0)) + uu &= ((UWtype) 1 << (auprec % W_TYPE_SIZE)) - 1; + if (uu == 0) + { + /* 0 * negative would be otherwise mishandled below, so + handle it specially. */ + __builtin_memset (ret, 0, retn * sizeof (UWtype)); + return; + } + } + vv = v[vidx]; + if (__builtin_expect (avprec < W_TYPE_SIZE, 0)) + { + if (vprec > 0) + vv &= ((UWtype) 1 << (avprec % W_TYPE_SIZE)) - 1; + else + vv |= (UWtype) -1 << (avprec % W_TYPE_SIZE); + } + + USItype n = un > retn ? retn : un; + USItype n2 = n; + USItype retidx2 = retidx + n * BITINT_INC; + UWtype c = 0, uv = 0; + if (n) + c = bitint_mul_1 (ret + retidx, u + uidx, vv, n); + if (retn > un && un2 != un) + { + UWtype hi, lo; + uv = u[uidx + n * BITINT_INC]; + if (uprec > 0) + uv &= ((UWtype) 1 << (auprec % W_TYPE_SIZE)) - 1; + else + uv |= (UWtype) -1 << (auprec % W_TYPE_SIZE); + umul_ppmm (hi, lo, uv, vv); + c = __builtin_add_overflow (lo, c, &lo) + hi; + ret[retidx2] = lo; + retidx2 += BITINT_INC; + ++n2; + } + if (retn > un2) + { + if (uprec < 0) + { + while (n2 < retn) + { + if (n2 >= un2 + vn2) + break; + UWtype hi, lo; + umul_ppmm (hi, lo, (UWtype) -1, vv); + c = __builtin_add_overflow (lo, c, &lo) + hi; + ret[retidx2] = lo; + retidx2 += BITINT_INC; + ++n2; + } + } + else + { + ret[retidx2] = c; + retidx2 += BITINT_INC; + ++n2; + } + /* If RET has more limbs than U after precision reduction, + fill in the remaining limbs. */ + while (n2 < retn) + { + if (n2 < un2 + vn2 || (uprec ^ vprec) >= 0) + c = 0; + else + c = (UWtype) -1; + ret[retidx2] = c; + retidx2 += BITINT_INC; + ++n2; + } + } + /* N is now number of possibly non-zero limbs in RET (ignoring + limbs above UN2 + VN2 which if any have been finalized already). */ + USItype end = vprec < 0 ? un2 + vn2 : vn2; + if (retn > un2 + vn2) retn = un2 + vn2; + if (end > retn) end = retn; + for (USItype m = 1; m < end; ++m) + { + retidx += BITINT_INC; + vidx += BITINT_INC; + if (m < vn2) + { + vv = v[vidx]; + if (__builtin_expect (m == vn, 0)) + { + if (vprec > 0) + vv &= ((UWtype) 1 << (avprec % W_TYPE_SIZE)) - 1; + else + vv |= (UWtype) -1 << (avprec % W_TYPE_SIZE); + } + } + else + vv = (UWtype) -1; + if (m + n > retn) + n = retn - m; + c = 0; + if (n) + c = bitint_addmul_1 (ret + retidx, u + uidx, vv, n); + n2 = m + n; + retidx2 = retidx + n * BITINT_INC; + if (n2 < retn && un2 != un) + { + UWtype hi, lo; + umul_ppmm (hi, lo, uv, vv); + hi += __builtin_add_overflow (lo, ret[retidx2], &lo); + c = __builtin_add_overflow (lo, c, &lo) + hi; + ret[retidx2] = lo; + retidx2 += BITINT_INC; + ++n2; + } + if (uprec < 0) + while (n2 < retn) + { + UWtype hi, lo; + umul_ppmm (hi, lo, (UWtype) -1, vv); + hi += __builtin_add_overflow (lo, ret[retidx2], &lo); + c = __builtin_add_overflow (lo, c, &lo) + hi; + ret[retidx2] = lo; + retidx2 += BITINT_INC; + ++n2; + } + else if (n2 < retn) + { + ret[retidx2] = c; + retidx2 += BITINT_INC; + } + } +} +#endif + +#ifdef L_divmodbitint4 +static void +bitint_negate (UWtype *d, const UWtype *s, SItype n) +{ + UWtype c = 1; + do + { + UWtype sv = *s, lo; + s += BITINT_INC; + c = __builtin_add_overflow (~sv, c, &lo); + *d = lo; + d += BITINT_INC; + } + while (--n); +} + +/* D -= S * L. */ + +static UWtype +bitint_submul_1 (UWtype *d, const UWtype *s, UWtype l, SItype n) +{ + UWtype sv, hi, lo, c = 0; + do + { + sv = *s; + s += BITINT_INC; + umul_ppmm (hi, lo, sv, l); + hi += __builtin_sub_overflow (*d, lo, &lo); + c = __builtin_sub_overflow (lo, c, &lo) + hi; + *d = lo; + d += BITINT_INC; + } + while (--n); + return c; +} + +/* If XPREC is positive, it is precision in bits + of an unsigned _BitInt operand (which has XPREC/W_TYPE_SIZE + full limbs and if Xprec%W_TYPE_SIZE one partial limb. + If Xprec is negative, -XPREC is precision in bits + of a signed _BitInt operand. QPREC and RPREC should be + always non-negative. If either Q or R is NULL (at least + one should be non-NULL), then corresponding QPREC or RPREC + should be 0. */ + +void +__divmodbitint4 (UWtype *q, SItype qprec, + UWtype *r, SItype rprec, + const UWtype *u, SItype uprec, + const UWtype *v, SItype vprec) +{ + uprec = bitint_reduce_prec (&u, uprec); + vprec = bitint_reduce_prec (&v, vprec); + USItype auprec = uprec < 0 ? -uprec : uprec; + USItype avprec = vprec < 0 ? -vprec : vprec; + USItype un = (auprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype vn = (avprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype qn = ((USItype) qprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype rn = ((USItype) rprec + W_TYPE_SIZE - 1) / W_TYPE_SIZE; + USItype up = auprec % W_TYPE_SIZE; + USItype vp = avprec % W_TYPE_SIZE; + if (__builtin_expect (un < vn, 0)) + { + /* If abs(v) > abs(u), then q is 0 and r is u. */ + if (q) + __builtin_memset (q, 0, qn * sizeof (UWtype)); + if (r == NULL) + return; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + r += rn - 1; + u += un - 1; +#endif + if (up) + --un; + if (rn < un) + un = rn; + for (rn -= un; un; --un) + { + *r = *u; + r += BITINT_INC; + u += BITINT_INC; + } + if (!rn) + return; + if (up) + { + if (uprec > 0) + *r = *u & (((UWtype) 1 << up) - 1); + else + *r = *u | ((UWtype) -1 << up); + r += BITINT_INC; + if (!--rn) + return; + } + UWtype c = uprec < 0 ? (UWtype) -1 : (UWtype) 0; + for (; rn; --rn) + { + *r = c; + r += BITINT_INC; + } + return; + } + USItype qn2 = un - vn + 1; + if (qn >= qn2) + qn2 = 0; + USItype sz = un + 1 + vn + qn2; + UWtype *buf = __builtin_alloca (sz * sizeof (UWtype)); + USItype uidx, vidx; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + uidx = un - 1; + vidx = vn - 1; +#else + uidx = 0; + vidx = 0; +#endif + if (uprec < 0) + bitint_negate (buf + BITINT_END (uidx + 1, 0), u + uidx, un); + else + __builtin_memcpy (buf + BITINT_END (1, 0), u, un * sizeof (UWtype)); + if (up) + buf[BITINT_END (1, un - 1)] &= (((UWtype) 1 << up) - 1); + if (vprec < 0) + bitint_negate (buf + un + 1 + vidx, v + vidx, vn); + else + __builtin_memcpy (buf + un + 1, v, vn * sizeof (UWtype)); + if (vp) + buf[un + 1 + BITINT_END (0, vn - 1)] &= (((UWtype) 1 << vp) - 1); + UWtype *u2 = buf; + UWtype *v2 = u2 + un + 1; + UWtype *q2 = v2 + vn; + if (!qn2) + q2 = q + BITINT_END (qn - (un - vn + 1), 0); + + /* Knuth's algorithm. See also ../gcc/wide-int.cc (divmod_internal_2). */ + +#ifndef UDIV_NEEDS_NORMALIZATION + /* Handle single limb divisor first. */ + if (vn == 1) + { + UWtype vv = v2[0]; + if (vv == 0) + vv = 1 / vv; /* Divide intentionally by zero. */ + UWtype k = 0; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + for (SItype i = 0; i <= un - 1; ++i) +#else + for (SItype i = un - 1; i >= 0; --i) +#endif + udiv_qrnnd (q2[i], k, k, u2[BITINT_END (i + 1, i)], vv); + if (r != NULL) + r[BITINT_END (rn - 1, 0)] = k; + } + else +#endif + { + SItype s; +#ifdef UDIV_NEEDS_NORMALIZATION + if (vn == 1 && v2[0] == 0) + s = 0; + else +#endif + if (sizeof (0U) == sizeof (UWtype)) + s = __builtin_clz (v2[BITINT_END (0, vn - 1)]); + else if (sizeof (0UL) == sizeof (UWtype)) + s = __builtin_clzl (v2[BITINT_END (0, vn - 1)]); + else + s = __builtin_clzll (v2[BITINT_END (0, vn - 1)]); + if (s) + { + /* Normalize by shifting v2 left so that it has msb set. */ + const SItype n = sizeof (UWtype) * __CHAR_BIT__; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + for (SItype i = 0; i < vn - 1; ++i) +#else + for (SItype i = vn - 1; i > 0; --i) +#endif + v2[i] = (v2[i] << s) | (v2[i - BITINT_INC] >> (n - s)); + v2[vidx] = v2[vidx] << s; + /* And shift u2 left by the same amount. */ + u2[BITINT_END (0, un)] = u2[BITINT_END (1, un - 1)] >> (n - s); +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + for (SItype i = 1; i < un; ++i) +#else + for (SItype i = un - 1; i > 0; --i) +#endif + u2[i] = (u2[i] << s) | (u2[i - BITINT_INC] >> (n - s)); + u2[BITINT_END (un, 0)] = u2[BITINT_END (un, 0)] << s; + } + else + u2[BITINT_END (0, un)] = 0; +#ifdef UDIV_NEEDS_NORMALIZATION + /* Handle single limb divisor first. */ + if (vn == 1) + { + UWtype vv = v2[0]; + if (vv == 0) + vv = 1 / vv; /* Divide intentionally by zero. */ + UWtype k = u2[BITINT_END (0, un)]; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + for (SItype i = 0; i <= un - 1; ++i) +#else + for (SItype i = un - 1; i >= 0; --i) +#endif + udiv_qrnnd (q2[i], k, k, u2[BITINT_END (i + 1, i)], vv); + if (r != NULL) + r[BITINT_END (rn - 1, 0)] = k >> s; + } + else +#endif + { + UWtype vv1 = v2[BITINT_END (0, vn - 1)]; + UWtype vv0 = v2[BITINT_END (1, vn - 2)]; + /* Main loop. */ + for (SItype j = un - vn; j >= 0; --j) + { + /* Compute estimate in qhat. */ + UWtype uv1 = u2[BITINT_END (un - j - vn, j + vn)]; + UWtype uv0 = u2[BITINT_END (un - j - vn + 1, j + vn - 1)]; + UWtype qhat, rhat, hi, lo, c; + if (uv1 >= vv1) + { + /* udiv_qrnnd doesn't support quotients which don't + fit into UWtype, so subtract from uv1:uv0 vv1 + first. */ + uv1 -= vv1 + __builtin_sub_overflow (uv0, vv1, &uv0); + udiv_qrnnd (qhat, rhat, uv1, uv0, vv1); + if (!__builtin_add_overflow (rhat, vv1, &rhat)) + goto again; + } + else + { + udiv_qrnnd (qhat, rhat, uv1, uv0, vv1); + again: + umul_ppmm (hi, lo, qhat, vv0); + if (hi > rhat + || (hi == rhat + && lo > u2[BITINT_END (un - j - vn + 2, + j + vn - 2)])) + { + --qhat; + if (!__builtin_add_overflow (rhat, vv1, &rhat)) + goto again; + } + } + + c = bitint_submul_1 (u2 + BITINT_END (un - j, j), + v2 + BITINT_END (vn - 1, 0), qhat, vn); + u2[BITINT_END (un - j - vn, j + vn)] -= c; + /* If we've subtracted too much, decrease qhat and + and add back. */ + if ((Wtype) u2[BITINT_END (un - j - vn, j + vn)] < 0) + { + --qhat; + c = 0; + for (USItype i = 0; i < vn; ++i) + { + UWtype s = v2[BITINT_END (vn - 1 - i, i)]; + UWtype d = u2[BITINT_END (un - i - j, i + j)]; + UWtype c1 = __builtin_add_overflow (d, s, &d); + UWtype c2 = __builtin_add_overflow (d, c, &d); + c = c1 + c2; + u2[BITINT_END (un - i - j, i + j)] = d; + } + u2[BITINT_END (un - j - vn, j + vn)] += c; + } + q2[BITINT_END (un - vn - j, j)] = qhat; + } + if (r != NULL) + { + if (s) + { + const SItype n = sizeof (UWtype) * __CHAR_BIT__; + /* Unnormalize remainder. */ + USItype i; + for (i = 0; i < vn && i < rn; ++i) + r[BITINT_END (rn - 1 - i, i)] + = ((u2[BITINT_END (un - i, i)] >> s) + | (u2[BITINT_END (un - i - 1, i + 1)] << (n - s))); + if (i < rn) + r[BITINT_END (rn - vn, vn - 1)] + = u2[BITINT_END (un - vn + 1, vn - 1)] >> s; + } + else if (rn > vn) + __builtin_memcpy (&r[BITINT_END (rn - vn, 0)], + &u2[BITINT_END (un + 1 - vn, 0)], + vn * sizeof (UWtype)); + else + __builtin_memcpy (&r[0], &u2[BITINT_END (un + 1 - rn, 0)], + rn * sizeof (UWtype)); + } + } + } + if (q != NULL) + { + if ((uprec < 0) ^ (vprec < 0)) + { + /* Negative quotient. */ + USItype n; + if (un - vn + 1 > qn) + n = qn; + else + n = un - vn + 1; + bitint_negate (q + BITINT_END (qn - 1, 0), + q2 + BITINT_END (un - vn, 0), n); + if (qn > n) + __builtin_memset (q + BITINT_END (0, n), -1, + (qn - n) * sizeof (UWtype)); + } + else + { + /* Positive quotient. */ + if (qn2) + __builtin_memcpy (q, q2 + BITINT_END (un - vn + 1 - qn, 0), + qn * sizeof (UWtype)); + else if (qn > un - vn + 1) + __builtin_memset (q + BITINT_END (0, un - vn + 1), 0, + (qn - (un - vn + 1)) * sizeof (UWtype)); + } + } + if (r != NULL) + { + if (uprec < 0) + { + /* Negative remainder. */ + bitint_negate (r + BITINT_END (rn - 1, 0), + r + BITINT_END (rn - 1, 0), + rn > vn ? vn : rn); + if (rn > vn) + __builtin_memset (r + BITINT_END (0, vn), -1, + (rn - vn) * sizeof (UWtype)); + } + else + { + /* Positive remainder. */ + if (rn > vn) + __builtin_memset (r + BITINT_END (0, vn), 0, + (rn - vn) * sizeof (UWtype)); + } + } +} +#endif +#endif + #ifdef L_cmpdi2 cmp_return_type __cmpdi2 (DWtype a, DWtype b) --- libgcc/libgcc2.h.jj 2023-08-08 15:54:36.075590609 +0200 +++ libgcc/libgcc2.h 2023-08-08 16:12:02.348939532 +0200 @@ -181,6 +181,12 @@ typedef int shift_count_type __attribute #define float bogus_type #define double bogus_type +#if (defined(__BITINT_MAXWIDTH__) \ + && (defined(L_mulbitint3) || defined(L_divmodbitint4))) +#undef LIBGCC2_UNITS_PER_WORD +#define LIBGCC2_UNITS_PER_WORD (__LIBGCC_BITINT_LIMB_WIDTH__ / __CHAR_BIT__) +#endif + /* Versions prior to 3.4.4 were not taking into account the word size for the 5 trapping arithmetic functions absv, addv, subv, mulv and negv. As a consequence, the si and di variants were always and the only ones emitted. @@ -390,6 +396,15 @@ extern DWtype __divmoddi4 (DWtype, DWtyp extern UDWtype __udivmoddi4 (UDWtype, UDWtype, UDWtype *); #endif +#if (defined(__BITINT_MAXWIDTH__) \ + && (defined(L_mulbitint3) || defined(L_divmodbitint4))) +/* _BitInt support. */ +extern void __mulbitint3 (UWtype *, SItype, const UWtype *, SItype, + const UWtype *, SItype); +extern void __divmodbitint4 (UWtype *, SItype, UWtype *, SItype, + const UWtype *, SItype, const UWtype *, SItype); +#endif + /* __negdi2 is static inline when building other libgcc2 portions. */ #if !defined(L_divdi3) && !defined(L_moddi3) extern DWtype __negdi2 (DWtype); --- libgcc/libgcc-std.ver.in.jj 2023-08-08 15:54:36.029591253 +0200 +++ libgcc/libgcc-std.ver.in 2023-08-08 16:12:02.348939532 +0200 @@ -1944,3 +1944,13 @@ GCC_7.0.0 { __PFX__divmoddi4 __PFX__divmodti4 } + +%inherit GCC_14.0.0 GCC_7.0.0 +GCC_14.0.0 { + __PFX__mulbitint3 + __PFX__divmodbitint4 + __PFX__fixsfbitint + __PFX__fixdfbitint + __PFX__floatbitintsf + __PFX__floatbitintdf +} --- libgcc/Makefile.in.jj 2023-08-08 15:54:35.711595707 +0200 +++ libgcc/Makefile.in 2023-08-08 16:12:02.348939532 +0200 @@ -446,7 +446,7 @@ lib2funcs = _muldi3 _negdi2 _lshrdi3 _as _paritysi2 _paritydi2 _powisf2 _powidf2 _powixf2 _powitf2 \ _mulhc3 _mulsc3 _muldc3 _mulxc3 _multc3 _divhc3 _divsc3 \ _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2 _clrsbsi2 \ - _clrsbdi2 + _clrsbdi2 _mulbitint3 # The floating-point conversion routines that involve a single-word integer. # XX stands for the integer mode. @@ -466,7 +466,8 @@ endif # These might cause a divide overflow trap and so are compiled with # unwinder info. LIB2_DIVMOD_FUNCS = _divdi3 _moddi3 _divmoddi4 \ - _udivdi3 _umoddi3 _udivmoddi4 _udiv_w_sdiv + _udivdi3 _umoddi3 _udivmoddi4 _udiv_w_sdiv \ + _divmodbitint4 # Remove any objects from lib2funcs and LIB2_DIVMOD_FUNCS that are # defined as optimized assembly code in LIB1ASMFUNCS or as C code --- libgcc/soft-fp/bitint.h.jj 2023-08-08 16:12:02.348939532 +0200 +++ libgcc/soft-fp/bitint.h 2023-08-08 16:21:45.953768373 +0200 @@ -0,0 +1,329 @@ +/* Software floating-point emulation. + Definitions for _BitInt implementation details. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#ifndef GCC_SOFT_FP_BITINT_H +#define GCC_SOFT_FP_BITINT_H + +#ifdef __BITINT_MAXWIDTH__ +#define BIL_UNITS_PER_WORD (__LIBGCC_BITINT_LIMB_WIDTH__ / __CHAR_BIT__) + +#if BIL_UNITS_PER_WORD == 8 +#define BIL_TYPE_SIZE (8 * __CHAR_BIT__) +#define BILtype DItype +#define UBILtype UDItype +#elif BIL_UNITS_PER_WORD == 4 +#define BIL_TYPE_SIZE (4 * __CHAR_BIT__) +#define BILtype SItype +#define UBILtype USItype +#elif BIL_UNITS_PER_WORD == 2 +#define BIL_TYPE_SIZE (2 * __CHAR_BIT__) +#define BILtype HItype +#define UBILtype UHItype +#else +#define BIL_TYPE_SIZE __CHAR_BIT__ +#define BILtype QItype +#define UBILtype UQItype +#endif + +/* If *P is zero or sign extended (the latter only for PREC < 0) from + some narrower _BitInt value, reduce precision. */ + +static inline __attribute__((__always_inline__)) SItype +bitint_reduce_prec (const UBILtype **p, SItype prec) +{ + UBILtype mslimb; + SItype i; + if (prec < 0) + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + i = 0; +#else + i = ((USItype) -1 - prec) / BIL_TYPE_SIZE; +#endif + mslimb = (*p)[i]; + if (mslimb & ((UBILtype) 1 << (((USItype) -1 - prec) % BIL_TYPE_SIZE))) + { + SItype n = ((USItype) -prec) % BIL_TYPE_SIZE; + if (n) + { + mslimb |= ((UBILtype) -1 << (((USItype) -1 - prec) % BIL_TYPE_SIZE)); + if (mslimb == (UBILtype) -1) + { + prec += n; + if (prec >= -1) + return -2; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + n = 0; + } + } + while (mslimb == (UBILtype) -1) + { + prec += BIL_TYPE_SIZE; + if (prec >= -1) + return -2; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + if (n == 0) + { + if ((BILtype) mslimb >= 0) + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + --p; +#endif + return prec - 1; + } + } + return prec; + } + else + prec = -prec; + } + else + { +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + i = 0; +#else + i = ((USItype) prec - 1) / BIL_TYPE_SIZE; +#endif + mslimb = (*p)[i]; + } + SItype n = ((USItype) prec) % BIL_TYPE_SIZE; + if (n) + { + mslimb &= ((UBILtype) 1 << (((USItype) prec) % BIL_TYPE_SIZE)) - 1; + if (mslimb == 0) + { + prec -= n; + if (prec == 0) + return 1; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + } + while (mslimb == 0) + { + prec -= BIL_TYPE_SIZE; + if (prec == 0) + return 1; +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ + ++p; +#else + --i; +#endif + mslimb = (*p)[i]; + } + return prec; +} + +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ +# define BITINT_INC -1 +# define BITINT_END(be, le) (be) +#else +# define BITINT_INC 1 +# define BITINT_END(be, le) (le) +#endif + +static inline __attribute__((__always_inline__)) void +bitint_negate (UBILtype *d, const UBILtype *s, SItype n) +{ + UBILtype c = 1; + do + { + UBILtype sv = *s, lo; + s += BITINT_INC; + c = __builtin_add_overflow (~sv, c, &lo); + *d = lo; + d += BITINT_INC; + } + while (--n); +} + +#define FP_TO_BITINT(r, rn, arprec, shift, rv, rsize, rsigned, ovf, DI) \ + if (ovf) \ + { \ + if ((rv & 1) != 0) \ + __builtin_memset (r, -1, rn * sizeof (UBILtype)); \ + else \ + __builtin_memset (r, 0, rn * sizeof (UBILtype)); \ + if (rv & (((U##DI##type) 1) << (rsize - 1))) \ + r[BITINT_END (0, rn - 1)] \ + |= (UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE); \ + else \ + r[BITINT_END (0, rn - 1)] \ + &= ~((UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE)); \ + } \ + else \ + { \ + USItype shiftl = shift / BIL_TYPE_SIZE; \ + rsize = DI##_BITS; \ + if (rsigned && (DI##type) rv >= 0) \ + rsigned = 0; \ + if (shift + DI##_BITS > arprec) \ + rsize = arprec - shift; \ + USItype shiftr = shift % BIL_TYPE_SIZE; \ + if (shiftl) \ + __builtin_memset (r + BITINT_END (rn - shiftl, 0), 0, \ + shiftl * sizeof (UBILtype)); \ + USItype idx = BITINT_END (rn - shiftl - 1, shiftl); \ + DI##type rvs = rv; \ + if (shiftr) \ + { \ + r[idx] = (rsigned ? (UBILtype) rvs : (UBILtype) rv) << shiftr;\ + idx += BITINT_INC; \ + if (rsize > BIL_TYPE_SIZE - shiftr) \ + { \ + rv >>= BIL_TYPE_SIZE - shiftr; \ + rvs >>= BIL_TYPE_SIZE - shiftr; \ + rsize -= BIL_TYPE_SIZE - shiftr; \ + } \ + else \ + rsize = 0; \ + } \ + while (rsize) \ + { \ + r[idx] = rsigned ? (UBILtype) rvs : (UBILtype) rv; \ + idx += BITINT_INC; \ + if (rsize <= BIL_TYPE_SIZE) \ + break; \ + rv >>= (DI##_BITS > BIL_TYPE_SIZE ? BIL_TYPE_SIZE : 0); \ + rvs >>= (DI##_BITS > BIL_TYPE_SIZE ? BIL_TYPE_SIZE : 0); \ + rsize -= BIL_TYPE_SIZE; \ + } \ + if (idx < rn) \ + __builtin_memset (r + BITINT_END (0, idx), rsigned ? -1 : 0, \ + BITINT_END (idx + 1, rn - idx) \ + * sizeof (UBILtype)); \ + } + +#define FP_FROM_BITINT(i, iprec, iv, shift, DI) \ + do \ + { \ + iprec = bitint_reduce_prec (&i, iprec); \ + USItype aiprec = iprec < 0 ? -iprec : iprec; \ + USItype in = (aiprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; \ + USItype idx = BITINT_END (0, in - 1); \ + UBILtype msb = i[idx]; \ + SItype n = 0; \ + if (aiprec % BIL_TYPE_SIZE) \ + { \ + if (iprec > 0) \ + msb &= ((UBILtype) 1 << (aiprec % BIL_TYPE_SIZE)) - 1; \ + else \ + msb |= (UBILtype) -1 << (aiprec % BIL_TYPE_SIZE); \ + } \ + if (iprec < 0) \ + { \ + n = sizeof (0ULL) * __CHAR_BIT__ + 1 - __builtin_clzll (~msb);\ + if (BIL_TYPE_SIZE > DI##_BITS && n > DI##_BITS) \ + { \ + iv = msb >> (n - DI##_BITS); \ + shift = n - DI##_BITS; \ + n = 0; \ + } \ + else \ + { \ + iv = (BILtype) msb; \ + n = DI##_BITS - n; \ + } \ + } \ + /* bitint_reduce_prec guarantees that if msb is 0, then whole \ + i must be zero, otherwise it would have reduced the \ + precision. */ \ + else if (msb == 0) \ + iv = 0; \ + else \ + { \ + n = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (msb); \ + if (BIL_TYPE_SIZE >= DI##_BITS && n >= DI##_BITS) \ + { \ + iv = msb >> (n - DI##_BITS + 1); \ + shift = n - DI##_BITS + 1; \ + n = 0; \ + } \ + else \ + { \ + iv = msb; \ + n = DI##_BITS - 1 - n; \ + } \ + } \ + while (n && BITINT_END (idx < in - 1, idx)) \ + { \ + idx -= BITINT_INC; \ + msb = i[idx]; \ + if (BIL_TYPE_SIZE < DI##_BITS && n >= BIL_TYPE_SIZE) \ + { \ + iv = (U##DI##type) iv << (BIL_TYPE_SIZE < DI##_BITS \ + ? BIL_TYPE_SIZE : 0); \ + iv |= msb; \ + n -= BIL_TYPE_SIZE; \ + } \ + else \ + { \ + iv = (U##DI##type) iv << n; \ + iv |= msb >> (BIL_TYPE_SIZE - n); \ + shift = BIL_TYPE_SIZE - n; \ + break; \ + } \ + } \ + \ + UBILtype low_bits = 0; \ + if (shift) \ + low_bits = msb & (((UBILtype) 1 << shift) - 1); \ + shift += BITINT_END (in - 1 - idx, idx) * BIL_TYPE_SIZE; \ + while (!low_bits && BITINT_END (idx < in - 1, idx)) \ + { \ + idx -= BITINT_INC; \ + low_bits |= i[idx]; \ + } \ + iv |= (low_bits != 0); \ + } \ + while (0) + +extern void __mulbitint3 (UBILtype *, SItype, const UBILtype *, SItype, + const UBILtype *, SItype); +extern void __divmodbitint4 (UBILtype *, SItype, UBILtype *, SItype, + const UBILtype *, SItype, + const UBILtype *, SItype); + +extern USItype __bid_pow10bitint (UBILtype *, SItype, USItype); + +#endif /* __BITINT_MAXWIDTH__ */ + +#endif /* GCC_SOFT_FP_BITINT_H */ --- libgcc/soft-fp/fixdfbitint.c.jj 2023-08-08 16:12:02.348939532 +0200 +++ libgcc/soft-fp/fixdfbitint.c 2023-08-08 16:12:02.348939532 +0200 @@ -0,0 +1,71 @@ +/* Software floating-point emulation. + Convert IEEE double to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "double.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +void +__fixdfbitint (UBILtype *r, SItype rprec, DFtype a) +{ + FP_DECL_EX; + FP_DECL_D (A); + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = ((USItype) arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + UDItype rv; + USItype rsize = arprec > DI_BITS ? DI_BITS : arprec; + USItype rsigned = rprec < 0; + USItype ovf = 0; + USItype shift = 0; + + FP_INIT_EXCEPTIONS; + FP_UNPACK_RAW_D (A, a); + if (arprec > DI_BITS) + { + if (A_e < _FP_EXPBIAS_D || (A_s && !rsigned)) + ovf = 1; + else if (A_e >= (_FP_EXPMAX_D < _FP_EXPBIAS_D + arprec + ? _FP_EXPMAX_D + : _FP_EXPBIAS_D + arprec - rsigned)) + { + ovf = 1; + if (A_s + && A_e == _FP_EXPBIAS_D + arprec - 1 + && A_e < _FP_EXPMAX_D) + A_e -= arprec - DI_BITS; + } + else if (A_e >= _FP_EXPBIAS_D + DI_BITS - rsigned) + { + shift = A_e - (_FP_EXPBIAS_D + DI_BITS - rsigned - 1); + A_e -= shift; + } + } + FP_TO_INT_D (rv, A, rsize, rsigned); + FP_HANDLE_EXCEPTIONS; + FP_TO_BITINT (r, rn, arprec, shift, rv, rsize, rsigned, ovf, DI); +} +#endif --- libgcc/soft-fp/fixsfbitint.c.jj 2023-08-08 16:12:02.348939532 +0200 +++ libgcc/soft-fp/fixsfbitint.c 2023-08-08 16:12:02.348939532 +0200 @@ -0,0 +1,71 @@ +/* Software floating-point emulation. + Convert IEEE single to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "single.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +void +__fixsfbitint (UBILtype *r, SItype rprec, SFtype a) +{ + FP_DECL_EX; + FP_DECL_S (A); + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = ((USItype) arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + USItype rv; + USItype rsize = arprec > SI_BITS ? SI_BITS : arprec; + USItype rsigned = rprec < 0; + USItype ovf = 0; + USItype shift = 0; + + FP_INIT_EXCEPTIONS; + FP_UNPACK_RAW_S (A, a); + if (arprec > SI_BITS) + { + if (A_e < _FP_EXPBIAS_S || (A_s && !rsigned)) + ovf = 1; + else if (A_e >= (_FP_EXPMAX_S < _FP_EXPBIAS_S + arprec + ? _FP_EXPMAX_S + : _FP_EXPBIAS_S + arprec - rsigned)) + { + ovf = 1; + if (A_s + && A_e == _FP_EXPBIAS_S + arprec - 1 + && A_e < _FP_EXPMAX_S) + A_e -= arprec - SI_BITS; + } + else if (A_e >= _FP_EXPBIAS_S + SI_BITS - rsigned) + { + shift = A_e - (_FP_EXPBIAS_S + SI_BITS - rsigned - 1); + A_e -= shift; + } + } + FP_TO_INT_S (rv, A, rsize, rsigned); + FP_HANDLE_EXCEPTIONS; + FP_TO_BITINT (r, rn, arprec, shift, rv, rsize, rsigned, ovf, SI); +} +#endif --- libgcc/soft-fp/fixtfbitint.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/fixtfbitint.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,81 @@ +/* Software floating-point emulation. + Convert IEEE quad to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "quad.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ + +#ifndef TI_BITS +/* As mantissa is 112 bits + 1 implicit bit, we need 128-bit + type, but on most 32-bit architectures TImode isn't supported. + Use _BitInt(128) instead. */ +typedef _BitInt(128) TItype; +typedef unsigned _BitInt(128) UTItype; +#define TI_BITS 128 +#endif + +void +__fixtfbitint (UBILtype *r, SItype rprec, TFtype a) +{ + FP_DECL_EX; + FP_DECL_Q (A); + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = ((USItype) arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + UTItype rv; + USItype rsize = arprec > TI_BITS ? TI_BITS : arprec; + USItype rsigned = rprec < 0; + USItype ovf = 0; + USItype shift = 0; + + FP_INIT_EXCEPTIONS; + FP_UNPACK_RAW_Q (A, a); + if (arprec > TI_BITS) + { + if (A_e < _FP_EXPBIAS_Q || (A_s && !rsigned)) + ovf = 1; + else if (A_e >= (_FP_EXPMAX_Q < _FP_EXPBIAS_Q + arprec + ? _FP_EXPMAX_Q + : _FP_EXPBIAS_Q + arprec - rsigned)) + { + ovf = 1; + if (A_s + && A_e == _FP_EXPBIAS_Q + arprec - 1 + && A_e < _FP_EXPMAX_Q) + A_e -= arprec - TI_BITS; + } + else if (A_e >= _FP_EXPBIAS_Q + TI_BITS - rsigned) + { + shift = A_e - (_FP_EXPBIAS_Q + TI_BITS - rsigned - 1); + A_e -= shift; + } + } + FP_TO_INT_Q (rv, A, rsize, rsigned); + FP_HANDLE_EXCEPTIONS; + FP_TO_BITINT (r, rn, arprec, shift, rv, rsize, rsigned, ovf, TI); +} +#endif --- libgcc/soft-fp/fixxfbitint.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/fixxfbitint.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,82 @@ +/* Software floating-point emulation. + Convert IEEE extended to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "extended.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ + +#ifndef TI_BITS +/* While mantissa is 64 bits including 1 explicit bit, extended.h uses + op-2.h for W_TYPE_SIZE 64 and op-4.h for W_TYPE_SIZE 32, so we have + to use 128-bit type here. On most 32-bit architectures TImode isn't + supported, so use _BitInt(128) instead. */ +typedef _BitInt(128) TItype; +typedef unsigned _BitInt(128) UTItype; +#define TI_BITS 128 +#endif + +void +__fixxfbitint (UBILtype *r, SItype rprec, XFtype a) +{ + FP_DECL_EX; + FP_DECL_E (A); + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = ((USItype) arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + UTItype rv; + USItype rsize = arprec > TI_BITS ? TI_BITS : arprec; + USItype rsigned = rprec < 0; + USItype ovf = 0; + USItype shift = 0; + + FP_INIT_EXCEPTIONS; + FP_UNPACK_RAW_E (A, a); + if (arprec > TI_BITS) + { + if (A_e < _FP_EXPBIAS_E || (A_s && !rsigned)) + ovf = 1; + else if (A_e >= (_FP_EXPMAX_E < _FP_EXPBIAS_E + arprec + ? _FP_EXPMAX_E + : _FP_EXPBIAS_E + arprec - rsigned)) + { + ovf = 1; + if (A_s + && A_e == _FP_EXPBIAS_E + arprec - 1 + && A_e < _FP_EXPMAX_E) + A_e -= arprec - TI_BITS; + } + else if (A_e >= _FP_EXPBIAS_E + TI_BITS - rsigned) + { + shift = A_e - (_FP_EXPBIAS_E + TI_BITS - rsigned - 1); + A_e -= shift; + } + } + FP_TO_INT_E (rv, A, rsize, rsigned); + FP_HANDLE_EXCEPTIONS; + FP_TO_BITINT (r, rn, arprec, shift, rv, rsize, rsigned, ovf, TI); +} +#endif --- libgcc/soft-fp/floatbitintbf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitintbf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,59 @@ +/* Software floating-point emulation. + Convert a _BitInt to bfloat16. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "brain.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +BFtype +__floatbitintbf (const UBILtype *i, SItype iprec) +{ + SItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_B (A); + BFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, SI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_B (A, iv, SI_BITS, USItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_B) + { + /* Exponent too big; overflow to infinity. */ + _FP_OVERFLOW_SEMIRAW (B, 1, A); + _FP_PACK_SEMIRAW (B, 1, A); + } + } + FP_PACK_RAW_B (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/floatbitintdf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitintdf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,64 @@ +/* Software floating-point emulation. + Convert a _BitInt to IEEE double. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "double.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +DFtype +__floatbitintdf (const UBILtype *i, SItype iprec) +{ + DItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_D (A); + DFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, DI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_D (A, iv, DI_BITS, UDItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_D) + { + /* Exponent too big; overflow to infinity. */ +#if _FP_W_TYPE_SIZE < 64 + _FP_OVERFLOW_SEMIRAW (D, 2, A); + _FP_PACK_SEMIRAW (D, 2, A); +#else + _FP_OVERFLOW_SEMIRAW (D, 1, A); + _FP_PACK_SEMIRAW (D, 1, A); +#endif + } + } + FP_PACK_RAW_D (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/floatbitinthf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitinthf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,59 @@ +/* Software floating-point emulation. + Convert a _BitInt to IEEE half. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "half.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +HFtype +__floatbitinthf (const UBILtype *i, SItype iprec) +{ + SItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_H (A); + HFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, SI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_H (A, iv, SI_BITS, USItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_H) + { + /* Exponent too big; overflow to infinity. */ + _FP_OVERFLOW_SEMIRAW (H, 1, A); + _FP_PACK_SEMIRAW (H, 1, A); + } + } + FP_PACK_RAW_H (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/floatbitintsf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitintsf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,59 @@ +/* Software floating-point emulation. + Convert a _BitInt to IEEE single. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "single.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +SFtype +__floatbitintsf (const UBILtype *i, SItype iprec) +{ + SItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_S (A); + SFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, SI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_S (A, iv, SI_BITS, USItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_S) + { + /* Exponent too big; overflow to infinity. */ + _FP_OVERFLOW_SEMIRAW (S, 1, A); + _FP_PACK_SEMIRAW (S, 1, A); + } + } + FP_PACK_RAW_S (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/floatbitinttf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitinttf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,73 @@ +/* Software floating-point emulation. + Convert a _BitInt to IEEE quad. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "quad.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +#ifndef TI_BITS +/* As mantissa is 112 bits + 1 implicit bit, we need 128-bit + type, but on most 32-bit architectures TImode isn't supported. + Use _BitInt(128) instead. */ +typedef _BitInt(128) TItype; +typedef unsigned _BitInt(128) UTItype; +#define TI_BITS 128 +#endif + +TFtype +__floatbitinttf (const UBILtype *i, SItype iprec) +{ + TItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_Q (A); + TFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, TI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_Q (A, iv, TI_BITS, UTItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_Q) + { + /* Exponent too big; overflow to infinity. */ +#if _FP_W_TYPE_SIZE < 64 + _FP_OVERFLOW_SEMIRAW (Q, 4, A); + _FP_PACK_SEMIRAW (Q, 4, A); +#else + _FP_OVERFLOW_SEMIRAW (Q, 2, A); + _FP_PACK_SEMIRAW (Q, 2, A); +#endif + } + } + FP_PACK_RAW_Q (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/floatbitintxf.c.jj 2023-08-08 16:12:02.349939518 +0200 +++ libgcc/soft-fp/floatbitintxf.c 2023-08-08 16:12:02.349939518 +0200 @@ -0,0 +1,74 @@ +/* Software floating-point emulation. + Convert a _BitInt to IEEE extended. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "extended.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +#ifndef TI_BITS +/* While mantissa is 64 bits including 1 explicit bit, extended.h uses + op-2.h for W_TYPE_SIZE 64 and op-4.h for W_TYPE_SIZE 32, so we have + to use 128-bit type here. On most 32-bit architectures TImode isn't + supported, so use _BitInt(128) instead. */ +typedef _BitInt(128) TItype; +typedef unsigned _BitInt(128) UTItype; +#define TI_BITS 128 +#endif + +XFtype +__floatbitintxf (const UBILtype *i, SItype iprec) +{ + TItype iv; + USItype shift = 0; + FP_DECL_EX; + FP_DECL_E (A); + XFtype a; + + FP_FROM_BITINT (i, iprec, iv, shift, TI); + FP_INIT_ROUNDMODE; + FP_FROM_INT_E (A, iv, TI_BITS, UTItype); + if (shift) + { + A_e += shift; + if (A_e >= _FP_EXPMAX_E) + { + /* Exponent too big; overflow to infinity. */ +#if _FP_W_TYPE_SIZE < 64 + _FP_OVERFLOW_SEMIRAW (E, 4, A); + _FP_PACK_SEMIRAW (E, 4, A); +#else + _FP_OVERFLOW_SEMIRAW (E, 2, A); + _FP_PACK_SEMIRAW (E, 2, A); +#endif + } + } + FP_PACK_RAW_E (a, A); + FP_HANDLE_EXCEPTIONS; + + return a; +} +#endif --- libgcc/soft-fp/op-common.h.jj 2023-08-08 15:54:36.110590119 +0200 +++ libgcc/soft-fp/op-common.h 2023-08-08 16:12:02.349939518 +0200 @@ -1800,7 +1800,7 @@ if ((X##_s = ((r) < 0))) \ _FP_FROM_INT_ur = -_FP_FROM_INT_ur; \ \ - _FP_STATIC_ASSERT ((rsize) <= 2 * _FP_W_TYPE_SIZE, \ + _FP_STATIC_ASSERT ((rsize) <= 4 * _FP_W_TYPE_SIZE, \ "rsize too large"); \ (void) (((rsize) <= _FP_W_TYPE_SIZE) \ ? ({ \ @@ -1810,13 +1810,38 @@ X##_e = (_FP_EXPBIAS_##fs + _FP_W_TYPE_SIZE - 1 \ - _FP_FROM_INT_lz); \ }) \ - : ({ \ + : ((rsize) <= 2 * _FP_W_TYPE_SIZE) \ + ? ({ \ int _FP_FROM_INT_lz; \ __FP_CLZ_2 (_FP_FROM_INT_lz, \ (_FP_W_TYPE) (_FP_FROM_INT_ur \ >> _FP_W_TYPE_SIZE), \ (_FP_W_TYPE) _FP_FROM_INT_ur); \ - X##_e = (_FP_EXPBIAS_##fs + 2 * _FP_W_TYPE_SIZE - 1 \ + X##_e = (_FP_EXPBIAS_##fs \ + + 2 * _FP_W_TYPE_SIZE - 1 \ + - _FP_FROM_INT_lz); \ + }) \ + : ({ \ + int _FP_FROM_INT_lz; \ + if (_FP_FROM_INT_ur >> (2 * _FP_W_TYPE_SIZE)) \ + { \ + rtype _FP_FROM_INT_uru \ + = _FP_FROM_INT_ur >> (2 * _FP_W_TYPE_SIZE); \ + __FP_CLZ_2 (_FP_FROM_INT_lz, \ + (_FP_W_TYPE) (_FP_FROM_INT_uru \ + >> _FP_W_TYPE_SIZE),\ + (_FP_W_TYPE) _FP_FROM_INT_uru); \ + } \ + else \ + { \ + __FP_CLZ_2 (_FP_FROM_INT_lz, \ + (_FP_W_TYPE) (_FP_FROM_INT_ur \ + >> _FP_W_TYPE_SIZE),\ + (_FP_W_TYPE) _FP_FROM_INT_ur); \ + _FP_FROM_INT_lz += 2 * _FP_W_TYPE_SIZE; \ + } \ + X##_e = (_FP_EXPBIAS_##fs \ + + 4 * _FP_W_TYPE_SIZE - 1 \ - _FP_FROM_INT_lz); \ })); \ \ --- libgcc/soft-fp/bitintpow10.c.jj 2023-08-08 16:21:45.956768331 +0200 +++ libgcc/soft-fp/bitintpow10.c 2023-08-09 15:22:45.519805895 +0200 @@ -0,0 +1,132 @@ +/* Software floating-point emulation. + Compute powers of 10 into _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +# define BIL_VAL(x) ((UBILtype) (x)) +# if BIL_TYPE_SIZE == 64 +# define BIL_PAIR(x, y) ((BIL_VAL (x) << 32) | BIL_VAL (y)) +# define BIL_OFF(x, y) (x) +# elif BIL_TYPE_SIZE == 32 +# if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ +# define BIL_PAIR(x, y) BIL_VAL (x), BIL_VAL (y) +# else +# define BIL_PAIR(x, y) BIL_VAL (y), BIL_VAL (x) +# endif +# define BIL_OFF(x, y) (y) +# else +# error Unsupported _BitInt limb size +# endif +#if __LIBGCC_BITINT_ORDER__ == __ORDER_BIG_ENDIAN__ +# define BIL_SET2(a, b) a, b +# define BIL_SET3(a, b, c) a, b, c +# define BIL_SET4(a, b, c, d) a, b, c, d +# define BIL_SET5(a, b, c, d, e) a, b, c, d, e +# define BIL_SET6(a, b, c, d, e, f) a, b, c, d, e, f +# define BIL_SET7(a, b, c, d, e, f, g) a, b, c, d, e, f, g +# define BIL_SET8(a, b, c, d, e, f, g, h) a, b, c, d, e, f, g, h +# define BIL_SET9(a, b, c, d, e, f, g, h, i) a, b, c, d, e, f, g, h, i +# define BIL_SET10(a, b, c, d, e, f, g, h, i, j) a, b, c, d, e, f, g, h, i, j +# define BIL_SET11(a, b, c, d, e, f, g, h, i, j, k) \ + a, b, c, d, e, f, g, h, i, j, k +# define BIL_SET12(a, b, c, d, e, f, g, h, i, j, k, l) \ + a, b, c, d, e, f, g, h, i, j, k, l +# define BIL_SET13(a, b, c, d, e, f, g, h, i, j, k, l, m) \ + a, b, c, d, e, f, g, h, i, j, k, l, m +# define BIL_SET14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ + a, b, c, d, e, f, g, h, i, j, k, l, m, n +# define BIL_SET15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \ + a, b, c, d, e, f, g, h, i, j, k, l, m, n, o +#else +# define BIL_SET2(a, b) b, a +# define BIL_SET3(a, b, c) c, b, a +# define BIL_SET4(a, b, c, d) d, c, b, a +# define BIL_SET5(a, b, c, d, e) e, d, c, b, a +# define BIL_SET6(a, b, c, d, e, f) f, e, d, c, b, a +# define BIL_SET7(a, b, c, d, e, f, g) g, f, e, d, c, b, a +# define BIL_SET8(a, b, c, d, e, f, g, h) h, g, f, e, d, c, b, a +# define BIL_SET9(a, b, c, d, e, f, g, h, i) i, h, g, f, e, d, c, b, a +# define BIL_SET10(a, b, c, d, e, f, g, h, i, j) j, i, h, g, f, e, d, c, b, a +# define BIL_SET11(a, b, c, d, e, f, g, h, i, j, k) \ + k, j, i, h, g, f, e, d, c, b, a +# define BIL_SET12(a, b, c, d, e, f, g, h, i, j, k, l) \ + l, k, j, i, h, g, f, e, d, c, b, a +# define BIL_SET13(a, b, c, d, e, f, g, h, i, j, k, l, m) \ + m, l, k, j, i, h, g, f, e, d, c, b, a +# define BIL_SET14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \ + n, m, l, k, j, i, h, g, f, e, d, c, b, a +# define BIL_SET15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \ + o, n, m, l, k, j, i, h, g, f, e, d, c, b, a +#endif + +#include "bitintpow10.h" + +/* Set r (_BitInt limbs with rprec bits) to pow10 (n), + where n is in [0, 6111]. Returns number of least significant + limbs with just 0s in it. */ + +USItype +__bid_pow10bitint (UBILtype *r, SItype rprec, USItype n) +{ + USItype rn = ((USItype) rprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + if (n <= 256) + { + /* No need to multiply anything, just copy it from pow10_limbs + array. */ + USItype low_zeros = (n / 64) * (64 / BIL_TYPE_SIZE); + UBILtype *p = &pow10_limbs[pow10_offs[n]]; + USItype cnt = pow10_offs[n + 1] - pow10_offs[n]; + if (low_zeros) + __builtin_memset (r + BITINT_END (rn - low_zeros, 0), '\0', + low_zeros * sizeof (UBILtype)); + __builtin_memcpy (r + BITINT_END (rn - low_zeros - cnt, low_zeros), + p, cnt * sizeof (UBILtype)); + if (rn > low_zeros + cnt) + __builtin_memset (r + BITINT_END (0, low_zeros + cnt), '\0', + (rn - low_zeros - cnt) * sizeof (UBILtype)); + return low_zeros; + } + else + { + USItype m = n / 256; + n &= 255; + USItype low_zeros = ((n / 64) + (m * 4)) * (64 / BIL_TYPE_SIZE); + UBILtype *pm = &pow10_limbs[pow10_offs[m + 255]]; + USItype cntm = pow10_offs[m + 256] - pow10_offs[m + 255]; + UBILtype *pn = &pow10_limbs[pow10_offs[n]]; + USItype cntn = pow10_offs[n + 1] - pow10_offs[n]; + if (low_zeros) + __builtin_memset (r + BITINT_END (rn - low_zeros, 0), '\0', + low_zeros * sizeof (UBILtype)); + __mulbitint3 (r + BITINT_END (0, low_zeros), + rprec - low_zeros * BIL_TYPE_SIZE, + pm, cntm * BIL_TYPE_SIZE, pn, cntn * BIL_TYPE_SIZE); + return low_zeros; + } +} +#endif --- libgcc/soft-fp/fixsdbitint.c.jj 2023-08-08 16:21:45.953768373 +0200 +++ libgcc/soft-fp/fixsdbitint.c 2023-08-08 16:21:45.953768373 +0200 @@ -0,0 +1,196 @@ +/* Software floating-point emulation. + Convert _Decimal32 to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern void __bid_fixsdbitint (UBILtype *, SItype, _Decimal32); + +void +__bid_fixsdbitint (UBILtype *r, SItype rprec, _Decimal32 a) +{ + FP_DECL_EX; + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = (arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + union { _Decimal32 d; USItype u; } u; + USItype mantissa, t; + SItype sgn; + SItype exponent; + USItype exp_bits, mant_bits; + UBILtype *pow10v, *resv; + USItype pow10_limbs, res_limbs, min_limbs, mant_limbs, low_zeros; + + FP_INIT_EXCEPTIONS; + u.d = a; + t = u.u >> 21; + sgn = (SItype) u.u < 0; + if ((t & (3 << 8)) != (3 << 8)) + { + mantissa = u.u & ((((USItype) 1) << 23) - 1); + exponent = (t >> 2) & 0xff; + } + else if ((t & (3 << 6)) != (3 << 6)) + { + mantissa = u.u & ((((USItype) 1) << 21) - 1); + mantissa |= ((USItype) 1) << 23; + exponent = t & 0xff; + if (mantissa > (USItype) 9999999) + mantissa = 0; + } + else + { + FP_SET_EXCEPTION (FP_EX_INVALID + | FP_EX_INVALID_CVI + | ((FP_EX_INVALID_SNAN + && ((t & 0x20)) != 0) + ? FP_EX_INVALID_SNAN : 0)); + ovf: + if (!sgn) + __builtin_memset (r, -1, rn * sizeof (UBILtype)); + else + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + if (sgn ^ (rprec >= 0)) + r[BITINT_END (0, rn - 1)] + |= (UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE); + else + r[BITINT_END (0, rn - 1)] + &= ~((UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE)); + goto done; + } + exponent -= 101; + + if (mantissa == 0) + { + /* Zero (with any exponent). */ + zero: + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + goto done; + } + if (exponent <= -7) + { + FP_SET_EXCEPTION (FP_EX_INEXACT); + goto zero; + } + else if (exponent < 0) + { + UBILtype limbs[64 / BIL_TYPE_SIZE]; + USItype rem; + UDItype d; + __bid_pow10bitint (limbs, 64, -exponent); +#if BIL_TYPE_SIZE == 64 + d = limbs[0]; +#elif BIL_TYPE_SIZE == 32 + d = (limbs[BITINT_END (0, 1)] << 32) | limbs[BITINT_END (1, 0)]; +#else +# error Unsupported BIL_TYPE_SIZE +#endif + rem = mantissa % (USItype) d; + mantissa /= (USItype) d; + if (rem) + FP_SET_EXCEPTION (FP_EX_INEXACT); + if (mantissa == 0) + goto zero; + exponent = 0; + } + + if (rprec >= 0 && sgn) + { + ovf_ex: + FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI); + goto ovf; + } + + /* Lower estimate for number of bits needed for pow10 (exponent). */ + exp_bits = exponent / 3; + exp_bits = exp_bits * 10 - exp_bits / 29; + mant_bits = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (mantissa); + if (exp_bits + mant_bits > arprec + 1) + goto ovf_ex; + /* Upper estimate for number of bits needed for pow10 (exponent). */ + exp_bits = (exponent + 2) / 3; + exp_bits = exp_bits * 10 - exp_bits / 30; + if (exp_bits == 0) + exp_bits = 1; + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + pow10v = __builtin_alloca (pow10_limbs * sizeof (UBILtype)); + low_zeros = __bid_pow10bitint (pow10v, exp_bits, exponent); + + res_limbs = ((exp_bits + mant_bits + BIL_TYPE_SIZE - 1) + / BIL_TYPE_SIZE) - low_zeros; + mant_limbs = 1; + resv = __builtin_alloca ((res_limbs + mant_limbs) * sizeof (UBILtype)); + resv[res_limbs] = mantissa; + __mulbitint3 (resv, exp_bits + mant_bits - low_zeros * BIL_TYPE_SIZE, + resv + res_limbs, mant_bits, + pow10v + BITINT_END (0, low_zeros), + exp_bits - low_zeros * BIL_TYPE_SIZE); + if (res_limbs + low_zeros >= rn) + { + if (res_limbs + low_zeros > rn && resv[BITINT_END (0, res_limbs - 1)]) + goto ovf_ex; + if ((arprec % BIL_TYPE_SIZE) != 0 + && (resv[BITINT_END (rn - res_limbs, rn - 1) - low_zeros] + & ((UBILtype) -1 << (arprec % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + min_limbs = rn - low_zeros; + } + else + min_limbs = res_limbs; + if (low_zeros) + __builtin_memset (r + BITINT_END (rn - low_zeros, 0), '\0', + low_zeros * sizeof (UBILtype)); + if (sgn) + bitint_negate (r + BITINT_END (rn - low_zeros - 1, low_zeros), + resv + BITINT_END (res_limbs - 1, 0), min_limbs); + else + __builtin_memcpy (r + BITINT_END (rn - low_zeros - min_limbs, low_zeros), + resv + BITINT_END (res_limbs - min_limbs, 0), + min_limbs * sizeof (UBILtype)); + if (res_limbs + low_zeros < rn) + { + if (sgn) + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), -1, + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + else + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), '\0', + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + } + else if (sgn) + { + if ((r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) == 0) + goto ovf_ex; + } + else if (rprec < 0 + && (r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + +done: + FP_HANDLE_EXCEPTIONS; +} +#endif --- libgcc/soft-fp/fixddbitint.c.jj 2023-08-08 16:21:45.953768373 +0200 +++ libgcc/soft-fp/fixddbitint.c 2023-08-08 16:21:45.953768373 +0200 @@ -0,0 +1,205 @@ +/* Software floating-point emulation. + Convert _Decimal64 to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern void __bid_fixddbitint (UBILtype *, SItype, _Decimal64); + +void +__bid_fixddbitint (UBILtype *r, SItype rprec, _Decimal64 a) +{ + FP_DECL_EX; + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = (arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + union { _Decimal64 d; UDItype u; } u; + UDItype mantissa, t; + SItype sgn; + SItype exponent; + USItype exp_bits, mant_bits; + UBILtype *pow10v, *resv; + USItype pow10_limbs, res_limbs, min_limbs, mant_limbs, low_zeros; + + FP_INIT_EXCEPTIONS; + u.d = a; + t = u.u >> 51; + sgn = (DItype) u.u < 0; + if ((t & (3 << 10)) != (3 << 10)) + { + mantissa = u.u & ((((UDItype) 1) << 53) - 1); + exponent = (t >> 2) & 0x3ff; + } + else if ((t & (3 << 8)) != (3 << 8)) + { + mantissa = u.u & ((((UDItype) 1) << 51) - 1); + mantissa |= ((UDItype) 1) << 53; + exponent = t & 0x3ff; + if (mantissa > (UDItype) 9999999999999999) + mantissa = 0; + } + else + { + FP_SET_EXCEPTION (FP_EX_INVALID + | FP_EX_INVALID_CVI + | ((FP_EX_INVALID_SNAN + && ((t & 0x80)) != 0) + ? FP_EX_INVALID_SNAN : 0)); + ovf: + if (!sgn) + __builtin_memset (r, -1, rn * sizeof (UBILtype)); + else + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + if (sgn ^ (rprec >= 0)) + r[BITINT_END (0, rn - 1)] + |= (UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE); + else + r[BITINT_END (0, rn - 1)] + &= ~((UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE)); + goto done; + } + exponent -= 398; + + if (mantissa == 0) + { + /* Zero (with any exponent). */ + zero: + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + goto done; + } + if (exponent <= -16) + { + FP_SET_EXCEPTION (FP_EX_INEXACT); + goto zero; + } + else if (exponent < 0) + { + UBILtype limbs[64 / BIL_TYPE_SIZE]; + UDItype d, rem; + __bid_pow10bitint (limbs, 64, -exponent); +#if BIL_TYPE_SIZE == 64 + d = limbs[0]; +#elif BIL_TYPE_SIZE == 32 + d = (limbs[BITINT_END (0, 1)] << 32) | limbs[BITINT_END (1, 0)]; +#else +# error Unsupported BIL_TYPE_SIZE +#endif + rem = mantissa % d; + mantissa /= d; + if (rem) + FP_SET_EXCEPTION (FP_EX_INEXACT); + if (mantissa == 0) + goto zero; + exponent = 0; + } + + if (rprec >= 0 && sgn) + { + ovf_ex: + FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI); + goto ovf; + } + + /* Lower estimate for number of bits needed for pow10 (exponent). */ + exp_bits = exponent / 3; + exp_bits = exp_bits * 10 - exp_bits / 29; + mant_bits = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (mantissa); + if (exp_bits + mant_bits > arprec + 1) + goto ovf_ex; + /* Upper estimate for number of bits needed for pow10 (exponent). */ + exp_bits = (exponent + 2) / 3; + exp_bits = exp_bits * 10 - exp_bits / 30; + if (exp_bits == 0) + exp_bits = 1; + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + pow10v = __builtin_alloca (pow10_limbs * sizeof (UBILtype)); + low_zeros = __bid_pow10bitint (pow10v, exp_bits, exponent); + + res_limbs = ((exp_bits + mant_bits + BIL_TYPE_SIZE - 1) + / BIL_TYPE_SIZE) - low_zeros; + mant_limbs = (mant_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + resv = __builtin_alloca ((res_limbs + mant_limbs) * sizeof (UBILtype)); +#if BIL_TYPE_SIZE >= 64 + resv[res_limbs] = mantissa; +#else + if (mant_limbs == 1) + resv[res_limbs] = mantissa; + else + { + resv[res_limbs + BITINT_END (1, 0)] = mantissa; + resv[res_limbs + BITINT_END (0, 1)] = mantissa >> 32; + } +#endif + __mulbitint3 (resv, exp_bits + mant_bits - low_zeros * BIL_TYPE_SIZE, + resv + res_limbs, mant_bits, + pow10v + BITINT_END (0, low_zeros), + exp_bits - low_zeros * BIL_TYPE_SIZE); + if (res_limbs + low_zeros >= rn) + { + if (res_limbs + low_zeros > rn && resv[BITINT_END (0, res_limbs - 1)]) + goto ovf_ex; + if ((arprec % BIL_TYPE_SIZE) != 0 + && (resv[BITINT_END (rn - res_limbs, rn - 1) - low_zeros] + & ((UBILtype) -1 << (arprec % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + min_limbs = rn - low_zeros; + } + else + min_limbs = res_limbs; + if (low_zeros) + __builtin_memset (r + BITINT_END (rn - low_zeros, 0), '\0', + low_zeros * sizeof (UBILtype)); + if (sgn) + bitint_negate (r + BITINT_END (rn - low_zeros - 1, low_zeros), + resv + BITINT_END (res_limbs - 1, 0), min_limbs); + else + __builtin_memcpy (r + BITINT_END (rn - low_zeros - min_limbs, low_zeros), + resv + BITINT_END (res_limbs - min_limbs, 0), + min_limbs * sizeof (UBILtype)); + if (res_limbs + low_zeros < rn) + { + if (sgn) + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), -1, + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + else + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), '\0', + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + } + else if (sgn) + { + if ((r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) == 0) + goto ovf_ex; + } + else if (rprec < 0 + && (r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + +done: + FP_HANDLE_EXCEPTIONS; +} +#endif --- libgcc/soft-fp/fixtdbitint.c.jj 2023-08-08 16:21:45.953768373 +0200 +++ libgcc/soft-fp/fixtdbitint.c 2023-08-08 16:21:45.953768373 +0200 @@ -0,0 +1,242 @@ +/* Software floating-point emulation. + Convert _Decimal128 to signed or unsigned _BitInt. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern void __bid_fixtdbitint (UBILtype *, SItype, _Decimal128); + +void +__bid_fixtdbitint (UBILtype *r, SItype rprec, _Decimal128 a) +{ + FP_DECL_EX; + USItype arprec = rprec < 0 ? -rprec : rprec; + USItype rn = (arprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + union { _Decimal128 d; UDItype u[2]; } u; + UDItype mantissahi, mantissalo, t; + SItype sgn; + SItype exponent; + USItype exp_bits, mant_bits; + UBILtype *pow10v, *resv; + USItype pow10_limbs, res_limbs, min_limbs, mant_limbs, low_zeros; + + FP_INIT_EXCEPTIONS; + u.d = a; + mantissahi = u.u[__FLOAT_WORD_ORDER__ != __ORDER_BIG_ENDIAN__]; + mantissalo = u.u[__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__]; + t = mantissahi >> 47; + sgn = (DItype) mantissahi < 0; + if ((t & (3 << 14)) != (3 << 14)) + { + mantissahi &= ((((UDItype) 1) << 49) - 1); + exponent = (t >> 2) & 0x3fff; + } + else if ((t & (3 << 12)) != (3 << 12)) + { + mantissahi &= ((((UDItype) 1) << 47) - 1); + mantissahi |= ((UDItype) 1) << 49; + exponent = t & 0x3fff; + if (mantissahi > (UDItype) 0x1ed09bead87c0 + || (mantissahi == (UDItype) 0x1ed09bead87c0 + && mantissalo > 0x378d8e63ffffffff)) + { + mantissahi = 0; + mantissalo = 0; + } + } + else + { + FP_SET_EXCEPTION (FP_EX_INVALID + | FP_EX_INVALID_CVI + | ((FP_EX_INVALID_SNAN + && ((t & 0x800)) != 0) + ? FP_EX_INVALID_SNAN : 0)); + ovf: + if (!sgn) + __builtin_memset (r, -1, rn * sizeof (UBILtype)); + else + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + if (sgn ^ (rprec >= 0)) + r[BITINT_END (0, rn - 1)] + |= (UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE); + else + r[BITINT_END (0, rn - 1)] + &= ~((UBILtype) -1 << ((arprec - 1) % BIL_TYPE_SIZE)); + goto done; + } + exponent -= 6176; + + if (mantissahi == 0 && mantissalo == 0) + { + /* Zero (with any exponent). */ + zero: + __builtin_memset (r, 0, rn * sizeof (UBILtype)); + goto done; + } + if (exponent <= -34) + { + FP_SET_EXCEPTION (FP_EX_INEXACT); + goto zero; + } + if (exponent < 0) + { + UBILtype limbs[4 * 128 / BIL_TYPE_SIZE]; +#if BIL_TYPE_SIZE == 64 + limbs[BITINT_END (0, 1)] = mantissahi; + limbs[BITINT_END (1, 0)] = mantissalo; +#elif BIL_TYPE_SIZE == 32 + limbs[BITINT_END (0, 3)] = mantissahi >> 32; + limbs[BITINT_END (1, 2)] = mantissahi; + limbs[BITINT_END (2, 1)] = mantissalo >> 32; + limbs[BITINT_END (3, 0)] = mantissalo; +#elif +# error Unhandled BIL_TYPE_SIZE +#endif + __bid_pow10bitint (&limbs[128 / BIL_TYPE_SIZE], 128, -exponent); + __divmodbitint4 (&limbs[2 * 128 / BIL_TYPE_SIZE], 128, + &limbs[3 * 128 / BIL_TYPE_SIZE], 128, + &limbs[0], 128, &limbs[128 / BIL_TYPE_SIZE], 128); + UDItype rem; +#if BIL_TYPE_SIZE == 64 + mantissahi = limbs[BITINT_END (4, 5)]; + mantissalo = limbs[BITINT_END (5, 4)]; + rem = limbs[6] | limbs[7]; +#elif BIL_TYPE_SIZE == 32 + mantissahi = limbs[BITINT_END (8, 11)] << 32; + mantissahi |= limbs[BITINT_END (9, 10)]; + mantissalo = limbs[BITINT_END (10, 9)] << 32; + mantissalo |= limbs[BITINT_END (11, 8)]; + rem = limbs[12] | limbs[13] | limbs[14] | limbs[15]; +#endif + if (rem) + FP_SET_EXCEPTION (FP_EX_INEXACT); + if (mantissahi == 0 && mantissalo == 0) + goto zero; + exponent = 0; + } + + if (rprec >= 0 && sgn) + { + ovf_ex: + FP_SET_EXCEPTION (FP_EX_INVALID | FP_EX_INVALID_CVI); + goto ovf; + } + + /* Lower estimate for number of bits needed for pow10 (exponent). */ + exp_bits = exponent / 3; + exp_bits = exp_bits * 10 - exp_bits / 29; + if (mantissahi) + mant_bits = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (mantissahi) + + 64; + else + mant_bits = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (mantissalo); + if (exp_bits + mant_bits > arprec + 1) + goto ovf_ex; + /* Upper estimate for number of bits needed for pow10 (exponent). */ + exp_bits = (exponent + 2) / 3; + exp_bits = exp_bits * 10 - exp_bits / 30; + if (exp_bits == 0) + exp_bits = 1; + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + pow10v = __builtin_alloca (pow10_limbs * sizeof (UBILtype)); + low_zeros = __bid_pow10bitint (pow10v, exp_bits, exponent); + + res_limbs = ((exp_bits + mant_bits + BIL_TYPE_SIZE - 1) + / BIL_TYPE_SIZE) - low_zeros; + mant_limbs = (mant_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + resv = __builtin_alloca ((res_limbs + mant_limbs) * sizeof (UBILtype)); +#if BIL_TYPE_SIZE >= 64 + if (mant_limbs == 1) + resv[res_limbs] = mantissalo; + else + { + resv[res_limbs + BITINT_END (1, 0)] = mantissalo; + resv[res_limbs + BITINT_END (0, 1)] = mantissahi; + } +#else + resv[res_limbs + BITINT_END (mant_limbs - 1, 0)] = mantissalo; + if (mant_limbs >= 2) + { + resv[res_limbs + BITINT_END (mant_limbs - 2, 1)] = mantissalo >> 32; + if (mant_limbs >= 3) + { + resv[res_limbs + BITINT_END (mant_limbs - 3, 2)] = mantissahi; + if (mant_limbs == 4) + resv[res_limbs + BITINT_END (0, 3)] = mantissahi >> 32; + } + } +#endif + __mulbitint3 (resv, exp_bits + mant_bits - low_zeros * BIL_TYPE_SIZE, + resv + res_limbs, mant_bits, + pow10v + BITINT_END (0, low_zeros), + exp_bits - low_zeros * BIL_TYPE_SIZE); + if (res_limbs + low_zeros >= rn) + { + if (res_limbs + low_zeros > rn && resv[BITINT_END (0, res_limbs - 1)]) + goto ovf_ex; + if ((arprec % BIL_TYPE_SIZE) != 0 + && (resv[BITINT_END (rn - res_limbs, rn - 1) - low_zeros] + & ((UBILtype) -1 << (arprec % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + min_limbs = rn - low_zeros; + } + else + min_limbs = res_limbs; + if (low_zeros) + __builtin_memset (r + BITINT_END (rn - low_zeros, 0), '\0', + low_zeros * sizeof (UBILtype)); + if (sgn) + bitint_negate (r + BITINT_END (rn - low_zeros - 1, low_zeros), + resv + BITINT_END (res_limbs - 1, 0), min_limbs); + else + __builtin_memcpy (r + BITINT_END (rn - low_zeros - min_limbs, low_zeros), + resv + BITINT_END (res_limbs - min_limbs, 0), + min_limbs * sizeof (UBILtype)); + if (res_limbs + low_zeros < rn) + { + if (sgn) + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), -1, + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + else + __builtin_memset (r + BITINT_END (0, res_limbs + low_zeros), '\0', + (rn - res_limbs - low_zeros) * sizeof (UBILtype)); + } + else if (sgn) + { + if ((r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) == 0) + goto ovf_ex; + } + else if (rprec < 0 + && (r[BITINT_END (0, rn - 1)] + & ((UBILtype) 1 << ((arprec - 1) % BIL_TYPE_SIZE))) != 0) + goto ovf_ex; + +done: + FP_HANDLE_EXCEPTIONS; +} +#endif --- libgcc/soft-fp/floatbitintsd.c.jj 2023-08-08 16:22:09.405440134 +0200 +++ libgcc/soft-fp/floatbitintsd.c 2023-08-08 16:22:09.405440134 +0200 @@ -0,0 +1,235 @@ +/* Software floating-point emulation. + Convert a _BitInt to _Decimal32. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern _Decimal32 __bid_floatbitintsd (const UBILtype *, SItype); + +_Decimal32 +__bid_floatbitintsd (const UBILtype *i, SItype iprec) +{ + iprec = bitint_reduce_prec (&i, iprec); + USItype aiprec = iprec < 0 ? -iprec : iprec; + USItype in = (aiprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + USItype idx = BITINT_END (0, in - 1); + UBILtype msb = i[idx]; + USItype mantissa; + SItype exponent = 0; + UBILtype inexact = 0; + union { _Decimal32 d; USItype u; } u, ui; + if (aiprec % BIL_TYPE_SIZE) + { + if (iprec > 0) + msb &= ((UBILtype) 1 << (aiprec % BIL_TYPE_SIZE)) - 1; + else + msb |= (UBILtype) -1 << (aiprec % BIL_TYPE_SIZE); + } + if (iprec < 0) + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ + 1 - __builtin_clzll (~msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + else if (msb == 0) + aiprec = 1; + else + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + /* Number of bits in (_BitInt(2048)) 9999999e+90DF. */ + if (aiprec > 323 + (iprec < 0)) + { + ovf: + if (iprec < 0) + u.d = -9000000e+90DF; + else + u.d = 9000000e+90DF; + __asm ("" : "+g" (u.d)); + u.d += u.d; + __asm ("" : "+g" (u.d)); + goto done; + } + /* Bit precision of 9999999uwb. */ + if (aiprec >= 24) + { + USItype pow10_limbs, q_limbs, q2_limbs, j; + USItype exp_bits = 0, e; + UDItype m; + UBILtype *buf; + /* First do a possibly large divide smaller enough such that + we only need to check remainder for 0 or non-0 and then + we'll do further division. */ + if (aiprec >= 24 + 4 + 10) + { + exp_bits = (aiprec - 24 - 4) / 10; + exponent = exp_bits * 3; + /* Upper estimate for pow10 (exponent) bits. */ + exp_bits = exp_bits * 10 - exp_bits / 30; + } + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + /* 38 is the highest number of quotient bits needed on + aiprec range of [38, 323]. E.g. if aiprec is 317, + exponent will be 84 and exp_bits 280. 317 - 280 + 1 + is 38. */ + q_limbs = (38 + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + q2_limbs = (32 + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + buf = __builtin_alloca ((q_limbs + pow10_limbs * 2 + q2_limbs + 2) + * sizeof (UBILtype)); + if (exponent) + { + __bid_pow10bitint (buf + q_limbs, exp_bits, exponent); + __divmodbitint4 (buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs, + pow10_limbs * BIL_TYPE_SIZE, + i, iprec < 0 ? -aiprec : aiprec, + buf + q_limbs, exp_bits); + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), q_limbs); + inexact = buf[q_limbs + pow10_limbs]; + for (j = 1; j < pow10_limbs; ++j) + inexact |= buf[q_limbs + pow10_limbs + 1]; + } + else + { + __builtin_memcpy (buf + BITINT_END (q_limbs - in + 1, 0), i, + (in - 1) * sizeof (UBILtype)); + buf[BITINT_END (q_limbs - in, in - 1)] = msb; + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), in); + if (q_limbs > in) + __builtin_memset (buf + BITINT_END (0, in), '\0', + (q_limbs - in) * sizeof (UBILtype)); + } + e = 0; +#if BIL_TYPE_SIZE == 64 + m = buf[0]; +#elif BIL_TYPE_SIZE == 32 + m = ((UDItype) buf[BITINT_END (0, 1)] << 32) | buf[BITINT_END (1, 0)]; +#else +# error Unsupported BIL_TYPE_SIZE +#endif + if (m >= (UDItype) 10000000000) + { + if (m >= (UDItype) 100000000000) + e = 5; + else + e = 4; + } + else if (m >= (UDItype) 100000000) + { + if (m >= (UDItype) 1000000000) + e = 3; + else + e = 2; + } + else if (m >= (UDItype) 10000000) + e = 1; + exponent += e; + if (exponent > 90) + goto ovf; + if (e) + { + UBILtype rem, half; + __bid_pow10bitint (buf + q_limbs + pow10_limbs * 2, + BIL_TYPE_SIZE, e); + __divmodbitint4 (buf + q_limbs + pow10_limbs * 2 + 1, + q2_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2 + 1 + q2_limbs, + BIL_TYPE_SIZE, + buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2, BIL_TYPE_SIZE); + half = buf[q_limbs + pow10_limbs * 2] / 2; + rem = buf[q_limbs + pow10_limbs * 2 + 1 + q2_limbs]; + if (inexact) + { + /* If first division discovered some non-0 digits + and this second division is by 10, e.g. + for XXXXXX5499999999999 or XXXXXX5000000000001 + if first division is by 10^12 and second by 10^1, + doing rem |= 1 wouldn't change the 5. Similarly + for rem 4 doing rem |= 1 would change it to 5, + but we don't want to change it in that case. */ + if (e == 1) + { + if (rem == 5) + rem = 6; + else if (rem != 4) + rem |= 1; + } + else + rem |= 1; + } + /* Set inexact to 0, 1, 2, 3 depending on if remainder + of the divisions is exact 0, smaller than 10^exponent / 2, + exactly 10^exponent / 2 or greater than that. */ + if (rem >= half) + inexact = 2 + (rem > half); + else + inexact = (rem != 0); + mantissa = buf[q_limbs + pow10_limbs * 2 + 1]; + } + else +#if BIL_TYPE_SIZE == 64 + mantissa = buf[0]; +#else + mantissa = buf[BITINT_END (1, 0)]; +#endif + } + else + { + mantissa = msb; + if (iprec < 0) + mantissa = -mantissa; + } + + exponent += 101; + if (mantissa >= (USItype) 0x800000) + u.u = (((((iprec < 0) << 2) | (USItype) 3) << 29) + | (((USItype) exponent) << 21) + | (mantissa ^ (USItype) 0x800000)); + else + u.u = ((((USItype) (iprec < 0)) << 31) + | (((USItype) exponent) << 23) + | mantissa); + if (inexact) + { + ui.u = ((((USItype) (iprec < 0)) << 31) + | (((USItype) (exponent - 1)) << 23) + | (inexact + 3)); + __asm ("" : "+g" (u.d)); + __asm ("" : "+g" (ui.d)); + u.d += ui.d; + __asm ("" : "+g" (u.d)); + } + +done: + return u.d; +} +#endif --- libgcc/soft-fp/floatbitintdd.c.jj 2023-08-08 16:22:09.405440134 +0200 +++ libgcc/soft-fp/floatbitintdd.c 2023-08-08 16:22:09.405440134 +0200 @@ -0,0 +1,264 @@ +/* Software floating-point emulation. + Convert a _BitInt to _Decimal64. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern _Decimal64 __bid_floatbitintdd (const UBILtype *, SItype); + +_Decimal64 +__bid_floatbitintdd (const UBILtype *i, SItype iprec) +{ + iprec = bitint_reduce_prec (&i, iprec); + USItype aiprec = iprec < 0 ? -iprec : iprec; + USItype in = (aiprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + USItype idx = BITINT_END (0, in - 1); + UBILtype msb = i[idx]; + UDItype mantissa; + SItype exponent = 0; + UBILtype inexact = 0; + union { _Decimal64 d; UDItype u; } u, ui; + if (aiprec % BIL_TYPE_SIZE) + { + if (iprec > 0) + msb &= ((UBILtype) 1 << (aiprec % BIL_TYPE_SIZE)) - 1; + else + msb |= (UBILtype) -1 << (aiprec % BIL_TYPE_SIZE); + } + if (iprec < 0) + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ + 1 - __builtin_clzll (~msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + else if (msb == 0) + aiprec = 1; + else + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + /* Number of bits in (_BitInt(2048)) 9999999999999999e+369DD. */ + if (aiprec > 1279 + (iprec < 0)) + { + ovf: + if (iprec < 0) + u.d = -9000000000000000e+369DD; + else + u.d = 9000000000000000e+369DD; + __asm ("" : "+g" (u.d)); + u.d += u.d; + __asm ("" : "+g" (u.d)); + goto done; + } + /* Bit precision of 9999999999999999uwb. */ + if (aiprec >= 54) + { + USItype pow10_limbs, q_limbs, q2_limbs, j; + USItype exp_bits = 0, e; + UDItype m; + UBILtype *buf; + /* First do a possibly large divide smaller enough such that + we only need to check remainder for 0 or non-0 and then + we'll do further division. */ + if (aiprec >= 54 + 4 + 10) + { + exp_bits = (aiprec - 54 - 4) / 10; + exponent = exp_bits * 3; + /* Upper estimate for pow10 (exponent) bits. */ + exp_bits = exp_bits * 10 - exp_bits / 30; + } + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + /* 72 is the highest number of quotient bits needed on + aiprec range of [68, 1279]. E.g. if aiprec is 1277, + exponent will be 363 and exp_bits 1206. 1277 - 1206 + 1 + is 72. Unfortunately that means the result doesn't fit into + UDItype... */ + q_limbs = (72 + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + q2_limbs = 64 / BIL_TYPE_SIZE; + buf = __builtin_alloca ((q_limbs + pow10_limbs * 2 + q2_limbs + 2) + * sizeof (UBILtype)); + if (exponent) + { + __bid_pow10bitint (buf + q_limbs, exp_bits, exponent); + __divmodbitint4 (buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs, + pow10_limbs * BIL_TYPE_SIZE, + i, iprec < 0 ? -aiprec : aiprec, + buf + q_limbs, exp_bits); + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), q_limbs); + inexact = buf[q_limbs + pow10_limbs]; + for (j = 1; j < pow10_limbs; ++j) + inexact |= buf[q_limbs + pow10_limbs + 1]; + } + else + { + __builtin_memcpy (buf + BITINT_END (q_limbs - in + 1, 0), i, + (in - 1) * sizeof (UBILtype)); + buf[BITINT_END (q_limbs - in, in - 1)] = msb; + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), in); + if (q_limbs > in) + __builtin_memset (buf + BITINT_END (0, in), '\0', + (q_limbs - in) * sizeof (UBILtype)); + } + e = 0; +#if BIL_TYPE_SIZE == 64 + m = buf[BITINT_END (1, 0)]; +#elif BIL_TYPE_SIZE == 32 + m = ((UDItype) buf[1] << 32) | buf[BITINT_END (2, 0)]; +#else +# error Unsupported BIL_TYPE_SIZE +#endif + if (buf[BITINT_END (0, q_limbs - 1)]) + { + if (buf[BITINT_END (0, q_limbs - 1)] > 0x5) + { + /* 1000000000000000000000wb */ + if (buf[BITINT_END (0, q_limbs - 1)] > 0x36 + || (buf[BITINT_END (0, q_limbs - 1)] == 0x36 + && m >= (UDItype) 0x35c9adc5dea00000)) + e = 6; + else + e = 5; + } + /* 100000000000000000000wb */ + else if (buf[BITINT_END (0, q_limbs - 1)] == 0x5 + && m >= (UDItype) 0x6bc75e2d63100000) + e = 5; + else + e = 4; + } + else if (m >= (UDItype) 1000000000000000000) + { + if (m >= (UDItype) 10000000000000000000ULL) + e = 4; + else + e = 3; + } + else if (m >= (UDItype) 100000000000000000) + e = 2; + else if (m >= (UDItype) 10000000000000000) + e = 1; + exponent += e; + if (exponent > 369) + goto ovf; + if (e) + { + UBILtype rem, half; + __bid_pow10bitint (buf + q_limbs + pow10_limbs * 2, + BIL_TYPE_SIZE, e); + __divmodbitint4 (buf + q_limbs + pow10_limbs * 2 + 1, + q2_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2 + 1 + q2_limbs, + BIL_TYPE_SIZE, + buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2, BIL_TYPE_SIZE); + half = buf[q_limbs + pow10_limbs * 2] / 2; + rem = buf[q_limbs + pow10_limbs * 2 + 1 + q2_limbs]; + if (inexact) + { + /* If first division discovered some non-0 digits + and this second division is by 10, e.g. + for XXXXXX5499999999999 or XXXXXX5000000000001 + if first division is by 10^12 and second by 10^1, + doing rem |= 1 wouldn't change the 5. Similarly + for rem 4 doing rem |= 1 would change it to 5, + but we don't want to change it in that case. */ + if (e == 1) + { + if (rem == 5) + rem = 6; + else if (rem != 4) + rem |= 1; + } + else + rem |= 1; + } + /* Set inexact to 0, 1, 2, 3 depending on if remainder + of the divisions is exact 0, smaller than 10^exponent / 2, + exactly 10^exponent / 2 or greater than that. */ + if (rem >= half) + inexact = 2 + (rem > half); + else + inexact = (rem != 0); +#if BIL_TYPE_SIZE == 64 + mantissa = buf[q_limbs + pow10_limbs * 2 + 1]; +#else + mantissa + = ((buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (0, 1)] << 32) + | buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (1, 0)]); +#endif + } + else +#if BIL_TYPE_SIZE == 64 + mantissa = buf[BITINT_END (1, 0)]; +#else + mantissa + = ((buf[1] << 32) | buf[BITINT_END (2, 0)]); +#endif + } + else + { +#if BIL_TYPE_SIZE == 64 + mantissa = msb; +#else + if (in == 1) + mantissa = iprec < 0 ? (UDItype) (BILtype) msb : (UDItype) msb; + else + mantissa = ((msb << 32) | i[BITINT_END (1, 0)]); +#endif + if (iprec < 0) + mantissa = -mantissa; + } + + exponent += 398; + if (mantissa >= (UDItype) 0x20000000000000) + u.u = (((((iprec < 0) << 2) | (UDItype) 3) << 61) + | (((UDItype) exponent) << 51) + | (mantissa ^ (UDItype) 0x20000000000000)); + else + u.u = ((((UDItype) (iprec < 0)) << 63) + | (((UDItype) exponent) << 53) + | mantissa); + if (inexact) + { + ui.u = ((((UDItype) (iprec < 0)) << 63) + | (((UDItype) (exponent - 1)) << 53) + | (inexact + 3)); + __asm ("" : "+g" (u.d)); + __asm ("" : "+g" (ui.d)); + u.d += ui.d; + __asm ("" : "+g" (u.d)); + } + +done: + return u.d; +} +#endif --- libgcc/soft-fp/floatbitinttd.c.jj 2023-08-08 16:22:09.405440134 +0200 +++ libgcc/soft-fp/floatbitinttd.c 2023-08-08 16:22:09.405440134 +0200 @@ -0,0 +1,271 @@ +/* Software floating-point emulation. + Convert a _BitInt to _Decimal128. + + Copyright (C) 2023 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +. */ + +#include "soft-fp.h" +#include "bitint.h" + +#ifdef __BITINT_MAXWIDTH__ +extern _Decimal128 __bid_floatbitinttd (const UBILtype *, SItype); + +_Decimal128 +__bid_floatbitinttd (const UBILtype *i, SItype iprec) +{ + iprec = bitint_reduce_prec (&i, iprec); + USItype aiprec = iprec < 0 ? -iprec : iprec; + USItype in = (aiprec + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + USItype idx = BITINT_END (0, in - 1); + UBILtype msb = i[idx]; + UDItype mantissahi, mantissalo; + SItype exponent = 0; + UBILtype inexact = 0; + union { _Decimal128 d; UDItype u[2]; } u, ui; + if (aiprec % BIL_TYPE_SIZE) + { + if (iprec > 0) + msb &= ((UBILtype) 1 << (aiprec % BIL_TYPE_SIZE)) - 1; + else + msb |= (UBILtype) -1 << (aiprec % BIL_TYPE_SIZE); + } + if (iprec < 0) + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ + 1 - __builtin_clzll (~msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + else if (msb == 0) + aiprec = 1; + else + { + SItype n = sizeof (0ULL) * __CHAR_BIT__ - __builtin_clzll (msb); + aiprec = (in - 1) * BIL_TYPE_SIZE + n; + } + /* Number of bits in + (_BitInt(32768)) 9999999999999999999999999999999999e+6111DL. */ + if (aiprec > 20414 + (iprec < 0)) + { + ovf: + if (iprec < 0) + u.d = -9000000000000000000000000000000000e+6111DL; + else + u.d = 9000000000000000000000000000000000e+6111DL; + __asm ("" : "+g" (u.d)); + u.d += u.d; + __asm ("" : "+g" (u.d)); + goto done; + } + /* Bit precision of 9999999999999999999999999999999999uwb. */ + if (aiprec >= 113) + { + USItype pow10_limbs, q_limbs, q2_limbs, j, k; + USItype exp_bits = 0, e; + UBILtype *buf; + /* First do a possibly large divide smaller enough such that + we only need to check remainder for 0 or non-0 and then + we'll do further division. */ + if (aiprec >= 113 + 4 + 10) + { + exp_bits = ((aiprec - 113 - 4) * (UDItype) 30) / 299; + exponent = exp_bits * 3; + /* Upper estimate for pow10 (exponent) bits. */ + exp_bits = exp_bits * 10 - exp_bits / 30; + } + pow10_limbs = (exp_bits + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + /* 127 is the highest number of quotient bits needed on + aiprec range of [127, 20414]. E.g. if aiprec is 20409, + exponent will be 6105 and exp_bits 20283. 20409 - 20283 + 1 + is 127. */ + q_limbs = (127 + BIL_TYPE_SIZE - 1) / BIL_TYPE_SIZE; + q2_limbs = 128 / BIL_TYPE_SIZE; + buf = __builtin_alloca ((q_limbs + pow10_limbs * 2 + q2_limbs + 2) + * sizeof (UBILtype)); + if (exponent) + { + __bid_pow10bitint (buf + q_limbs, exp_bits, exponent); + __divmodbitint4 (buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs, + pow10_limbs * BIL_TYPE_SIZE, + i, iprec < 0 ? -aiprec : aiprec, + buf + q_limbs, exp_bits); + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), q_limbs); + inexact = buf[q_limbs + pow10_limbs]; + for (j = 1; j < pow10_limbs; ++j) + inexact |= buf[q_limbs + pow10_limbs + 1]; + } + else + { + __builtin_memcpy (buf + BITINT_END (q_limbs - in + 1, 0), i, + (in - 1) * sizeof (UBILtype)); + buf[BITINT_END (q_limbs - in, in - 1)] = msb; + if (iprec < 0) + bitint_negate (buf + BITINT_END (q_limbs - 1, 0), + buf + BITINT_END (q_limbs - 1, 0), in); + if (q_limbs > in) + __builtin_memset (buf + BITINT_END (0, in), '\0', + (q_limbs - in) * sizeof (UBILtype)); + } + e = 0; + for (j = 3; j; ) + { + USItype eprev = e; + __bid_pow10bitint (buf + q_limbs + pow10_limbs * 2 + 1, + 128, 33 + e + j); + for (k = BITINT_END (0, q_limbs - 1); + k != BITINT_END (q_limbs, (USItype) -1); k -= BITINT_INC) + if (buf[k] > buf[q_limbs + pow10_limbs * 2 + 1 + k]) + { + e += j; + break; + } + else if (buf[k] < buf[q_limbs + pow10_limbs * 2 + 1 + k]) + break; + if (k == BITINT_END (q_limbs, (USItype) -1)) + e += j; + if (j == 2 && e != eprev) + break; + else + --j; + } + exponent += e; + if (exponent > 6111) + goto ovf; + if (e) + { + UBILtype rem, half; + __bid_pow10bitint (buf + q_limbs + pow10_limbs * 2, + BIL_TYPE_SIZE, e); + __divmodbitint4 (buf + q_limbs + pow10_limbs * 2 + 1, + q2_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2 + 1 + q2_limbs, + BIL_TYPE_SIZE, + buf, q_limbs * BIL_TYPE_SIZE, + buf + q_limbs + pow10_limbs * 2, BIL_TYPE_SIZE); + half = buf[q_limbs + pow10_limbs * 2] / 2; + rem = buf[q_limbs + pow10_limbs * 2 + 1 + q2_limbs]; + if (inexact) + { + /* If first division discovered some non-0 digits + and this second division is by 10, e.g. + for XXXXXX5499999999999 or XXXXXX5000000000001 + if first division is by 10^12 and second by 10^1, + doing rem |= 1 wouldn't change the 5. Similarly + for rem 4 doing rem |= 1 would change it to 5, + but we don't want to change it in that case. */ + if (e == 1) + { + if (rem == 5) + rem = 6; + else if (rem != 4) + rem |= 1; + } + else + rem |= 1; + } + /* Set inexact to 0, 1, 2, 3 depending on if remainder + of the divisions is exact 0, smaller than 10^exponent / 2, + exactly 10^exponent / 2 or greater than that. */ + if (rem >= half) + inexact = 2 + (rem > half); + else + inexact = (rem != 0); +#if BIL_TYPE_SIZE == 64 + mantissahi = buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (0, 1)]; + mantissalo = buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (1, 0)]; +#else + mantissahi + = ((buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (0, 3)] << 32) + | buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (1, 2)]); + mantissalo + = ((buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (2, 1)] << 32) + | buf[q_limbs + pow10_limbs * 2 + 1 + BITINT_END (3, 0)]); +#endif + } + else + { +#if BIL_TYPE_SIZE == 64 + mantissahi = buf[BITINT_END (0, 1)]; + mantissalo = buf[BITINT_END (1, 0)]; +#else + mantissahi = (buf[BITINT_END (0, 3)] << 32) | buf[BITINT_END (1, 2)]; + mantissalo = (buf[BITINT_END (2, 1)] << 32) | buf[BITINT_END (3, 0)]; +#endif + } + } + else + { + mantissahi = iprec < 0 ? -1 : 0; +#if BIL_TYPE_SIZE == 64 + if (in == 1) + mantissalo = msb; + else + { + mantissahi = msb; + mantissalo = i[BITINT_END (1, 0)]; + } +#else + if (in <= 2) + { + if (in == 1) + mantissalo = iprec < 0 ? (UDItype) (BILtype) msb : (UDItype) msb; + else + mantissalo = (msb << 32) | i[BITINT_END (1, 0)]; + } + else + { + if (in == 3) + mantissahi = iprec < 0 ? (UDItype) (BILtype) msb : (UDItype) msb; + else + mantissahi = (msb << 32) | i[BITINT_END (1, 2)]; + mantissalo = ((i[BITINT_END (in - 2, 1)] << 32) + | i[BITINT_END (in - 1, 0)]); + } +#endif + if (iprec < 0) + mantissahi + = ~mantissahi + __builtin_add_overflow (~mantissalo, 1, &mantissalo); + } + + exponent += 6176; + u.u[__FLOAT_WORD_ORDER__ != __ORDER_BIG_ENDIAN__] + = ((((UDItype) (iprec < 0)) << 63) + | (((UDItype) exponent) << 49) + | mantissahi); + u.u[__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__] = mantissalo; + if (inexact) + { + ui.u[__FLOAT_WORD_ORDER__ != __ORDER_BIG_ENDIAN__] + = (((UDItype) (iprec < 0)) << 63) | (((UDItype) exponent - 1) << 49); + ui.u[__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__] = inexact + 3; + __asm ("" : "+g" (u.d)); + __asm ("" : "+g" (ui.d)); + u.d += ui.d; + __asm ("" : "+g" (u.d)); + } + +done: + return u.d; +} +#endif From patchwork Wed Aug 9 18:25:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133413 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2993107vqr; Wed, 9 Aug 2023 11:26:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHO1mVNJIO79KfuD45w3416bj5ExKP7/xvEd6/ZGN5wEyLTRsdt0zQdLZaprPp/6sKlxUkP X-Received: by 2002:adf:f0cd:0:b0:314:15b7:20a5 with SMTP id x13-20020adff0cd000000b0031415b720a5mr130587wro.54.1691605570422; Wed, 09 Aug 2023 11:26:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605570; cv=none; d=google.com; s=arc-20160816; b=ggg7WjL3WUdsCLjV39eGrIvgWWAzG6u0C4Vh7BRfdBG2HTEPctrL1flP0UYlBc9Wcf 4dGedHLsyHuq2OKH5nE1TpMgaG3S012C0aZlyzRpXrU9yz/gwpNRWZGFbPJQYtb3+LOE J2nkee4exKuu47Ih+LSd5V05dzlpQshGH2tU9XwbvwzlE1NOlncUgYchr58jWTaR23OQ PdSlFhMN/+K7gWTLrGEz40wIjEZ64nkwD/PY1IoV3FP4lXd+bnAru7PXVrDEwxLBoFnZ LlaPbN21pEtfi/+kX8rzLSevmILg4ysjPO/FolhhwTbHcAEzO47NsLybgJOtsO8bAlaG to8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=bQiaRRVbcl1kTrvaMMAe0fvJxfvNcgGkVTwCshDsKas=; fh=aeZHQn/lA9+KGzRlDhL1qO9SE/pAMSdkbwH21Dg0FsA=; b=y0WESmQXBD8HyieDpT7GzGUAUlHmutOjQOY4L1Obuwk0vcp5n8gaWjsZJQLXX5RV1n /lKAX0vVnJ8mnQH/SE3sugFd1BHND0y7DujcRk5A21TGA+F9sV14aiJ+vUnHWrXGZfOL gCMmui9q91F/soBgVUncTCrxnhjx+Qo2tVYoCMHiSUPEHcatKCwTlSAfkGXzg0SvioGd ratc45y2bOrTn5WvX538SGhz/1dUxYDRxC8KOLuM0N/ivQx7l5lZOD69Y5j+L3x+mATe 8oFXPL4DNSdaZowwbM5pA9Vknr2ykU96nuF/ptyhr6WpMJ2/uh06WmjE0EpHs6jgrkMo Eexw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="rg/ZdehB"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id r3-20020aa7d143000000b0052336e17244si2863705edo.646.2023.08.09.11.26.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:26:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="rg/ZdehB"; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C19E33857835 for ; Wed, 9 Aug 2023 18:26:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C19E33857835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605568; bh=bQiaRRVbcl1kTrvaMMAe0fvJxfvNcgGkVTwCshDsKas=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=rg/ZdehB//bcGBagI0s1GZT0q/l9fYkKRj9fZ6xD0f5JwWHesEZqrJsXGOATK1LRk xmHosUSoONqhBNF3IsPaC6Z4stms3bUTW54TS0AkA1ntbB5HpSvM4mwDsvS+xADDyu RGprycRye1OF1uM59WRvaJDlTxx+ncpGQk2SC4aI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 2C9A53858D20 for ; Wed, 9 Aug 2023 18:25:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C9A53858D20 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-544-HS8AhfaqP02lT_AWGV5qzA-1; Wed, 09 Aug 2023 14:25:19 -0400 X-MC-Unique: HS8AhfaqP02lT_AWGV5qzA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C1E023C100A8; Wed, 9 Aug 2023 18:25:18 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 362F4492C13; Wed, 9 Aug 2023 18:25:18 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IPFRk2043005 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:25:16 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IPFS52043004; Wed, 9 Aug 2023 20:25:15 +0200 Date: Wed, 9 Aug 2023 20:25:14 +0200 To: "Joseph S. Myers" Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 10/12] C _BitInt support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773777002247056017 X-GMAIL-MSGID: 1773777002247056017 Hi! This patch adds the C FE support, c-family support, small libcpp change so that 123wb and 42uwb suffixes are handled plus glimits.h change to define BITINT_MAXWIDTH macro. The previous patches really do nothing without this, which enables all the support. 2023-08-09 Jakub Jelinek PR c/102989 gcc/ * glimits.h (BITINT_MAXWIDTH): Define if __BITINT_MAXWIDTH__ is predefined. gcc/c-family/ * c-common.cc (c_common_reswords): Add _BitInt as keyword. (c_common_signed_or_unsigned_type): Handle BITINT_TYPE. (check_builtin_function_arguments): Handle BITINT_TYPE like INTEGER_TYPE. (sync_resolve_size): Add ORIG_FORMAT argument. If FETCH && !ORIG_FORMAT, type is BITINT_TYPE, return -1 if size isn't one of 1, 2, 4, 8 or 16 or if it is 16 but TImode is not supported. (atomic_bitint_fetch_using_cas_loop): New function. (resolve_overloaded_builtin): Adjust sync_resolve_size caller. If -1 is returned, use atomic_bitint_fetch_using_cas_loop to lower it. Formatting fix. (keyword_begins_type_specifier): Handle RID_BITINT. * c-common.h (enum rid): Add RID_BITINT enumerator. * c-cppbuiltin.cc (c_cpp_builtins): For C call targetm.c.bitint_type_info and predefine __BITINT_MAXWIDTH__ and for -fbuilding-libgcc also __LIBGCC_BITINT_LIMB_WIDTH__ and __LIBGCC_BITINT_ORDER__ macros if _BitInt is supported. * c-lex.cc (interpret_integer): Handle CPP_N_BITINT. * c-pretty-print.cc (c_pretty_printer::simple_type_specifier, c_pretty_printer::direct_abstract_declarator): Handle BITINT_TYPE. (pp_c_integer_constant): Handle printing of large precision wide_ints which would buffer overflow digit_buffer. gcc/c/ * c-convert.cc (c_convert): Handle BITINT_TYPE like INTEGER_TYPE. * c-decl.cc (check_bitfield_type_and_width): Allow BITINT_TYPE bit-fields. (finish_struct): Prefer to use BITINT_TYPE for BITINT_TYPE bit-fields if possible. (declspecs_add_type): Formatting fixes. Handle cts_bitint. Adjust for added union in *specs. Handle RID_BITINT. (finish_declspecs): Handle cts_bitint. Adjust for added union in *specs. * c-parser.cc (c_keyword_starts_typename, c_token_starts_declspecs, c_parser_declspecs, c_parser_gnu_attribute_any_word): Handle RID_BITINT. * c-tree.h (enum c_typespec_keyword): Mention _BitInt in comment. Add cts_bitint enumerator. (struct c_declspecs): Move int_n_idx and floatn_nx_idx into a union and add bitint_prec there as well. * c-typeck.cc (composite_type, c_common_type, comptypes_internal): Handle BITINT_TYPE. (perform_integral_promotions): Promote BITINT_TYPE bit-fields to their declared type. (build_array_ref, build_unary_op, build_conditional_expr, convert_for_assignment, digest_init, build_binary_op): Likewise. libcpp/ * expr.cc (interpret_int_suffix): Handle wb and WB suffixes. * include/cpplib.h (CPP_N_BITINT): Define. Jakub --- gcc/glimits.h.jj 2023-08-08 15:54:34.481612931 +0200 +++ gcc/glimits.h 2023-08-08 16:12:02.321939910 +0200 @@ -157,6 +157,11 @@ see the files COPYING3 and COPYING.RUNTI # undef BOOL_WIDTH # define BOOL_WIDTH 1 +# ifdef __BITINT_MAXWIDTH__ +# undef BITINT_MAXWIDTH +# define BITINT_MAXWIDTH __BITINT_MAXWIDTH__ +# endif + # define __STDC_VERSION_LIMITS_H__ 202311L #endif --- gcc/c-family/c-common.cc.jj 2023-08-08 15:55:05.243182143 +0200 +++ gcc/c-family/c-common.cc 2023-08-08 16:19:29.102683903 +0200 @@ -349,6 +349,7 @@ const struct c_common_resword c_common_r { "_Alignas", RID_ALIGNAS, D_CONLY }, { "_Alignof", RID_ALIGNOF, D_CONLY }, { "_Atomic", RID_ATOMIC, D_CONLY }, + { "_BitInt", RID_BITINT, D_CONLY }, { "_Bool", RID_BOOL, D_CONLY }, { "_Complex", RID_COMPLEX, 0 }, { "_Imaginary", RID_IMAGINARY, D_CONLY }, @@ -2728,6 +2729,9 @@ c_common_signed_or_unsigned_type (int un || TYPE_UNSIGNED (type) == unsignedp) return type; + if (TREE_CODE (type) == BITINT_TYPE) + return build_bitint_type (TYPE_PRECISION (type), unsignedp); + #define TYPE_OK(node) \ (TYPE_MODE (type) == TYPE_MODE (node) \ && TYPE_PRECISION (type) == TYPE_PRECISION (node)) @@ -6341,8 +6345,10 @@ check_builtin_function_arguments (locati code0 = TREE_CODE (TREE_TYPE (args[0])); code1 = TREE_CODE (TREE_TYPE (args[1])); if (!((code0 == REAL_TYPE && code1 == REAL_TYPE) - || (code0 == REAL_TYPE && code1 == INTEGER_TYPE) - || (code0 == INTEGER_TYPE && code1 == REAL_TYPE))) + || (code0 == REAL_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) + || ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && code1 == REAL_TYPE))) { error_at (loc, "non-floating-point arguments in call to " "function %qE", fndecl); @@ -7185,12 +7191,16 @@ speculation_safe_value_resolve_return (t /* A helper function for resolve_overloaded_builtin in resolving the overloaded __sync_ builtins. Returns a positive power of 2 if the first operand of PARAMS is a pointer to a supported data type. - Returns 0 if an error is encountered. + Returns 0 if an error is encountered. Return -1 for _BitInt + __atomic*fetch* with unsupported type which should be handled by + a cas loop. FETCH is true when FUNCTION is one of the _FETCH_OP_ or _OP_FETCH_ + built-ins. ORIG_FORMAT is for __sync_* rather than __atomic_* built-ins. */ static int -sync_resolve_size (tree function, vec *params, bool fetch) +sync_resolve_size (tree function, vec *params, bool fetch, + bool orig_format) { /* Type of the argument. */ tree argtype; @@ -7225,9 +7235,19 @@ sync_resolve_size (tree function, vec *orig_params) +{ + enum tree_code code = ERROR_MARK; + bool return_old_p = false; + switch (orig_code) + { + case BUILT_IN_ATOMIC_ADD_FETCH_N: + code = PLUS_EXPR; + break; + case BUILT_IN_ATOMIC_SUB_FETCH_N: + code = MINUS_EXPR; + break; + case BUILT_IN_ATOMIC_AND_FETCH_N: + code = BIT_AND_EXPR; + break; + case BUILT_IN_ATOMIC_NAND_FETCH_N: + break; + case BUILT_IN_ATOMIC_XOR_FETCH_N: + code = BIT_XOR_EXPR; + break; + case BUILT_IN_ATOMIC_OR_FETCH_N: + code = BIT_IOR_EXPR; + break; + case BUILT_IN_ATOMIC_FETCH_ADD_N: + code = PLUS_EXPR; + return_old_p = true; + break; + case BUILT_IN_ATOMIC_FETCH_SUB_N: + code = MINUS_EXPR; + return_old_p = true; + break; + case BUILT_IN_ATOMIC_FETCH_AND_N: + code = BIT_AND_EXPR; + return_old_p = true; + break; + case BUILT_IN_ATOMIC_FETCH_NAND_N: + return_old_p = true; + break; + case BUILT_IN_ATOMIC_FETCH_XOR_N: + code = BIT_XOR_EXPR; + return_old_p = true; + break; + case BUILT_IN_ATOMIC_FETCH_OR_N: + code = BIT_IOR_EXPR; + return_old_p = true; + break; + default: + gcc_unreachable (); + } + + if (orig_params->length () != 3) + { + if (orig_params->length () < 3) + error_at (loc, "too few arguments to function %qE", orig_function); + else + error_at (loc, "too many arguments to function %qE", orig_function); + return error_mark_node; + } + + tree stmts = push_stmt_list (); + + tree nonatomic_lhs_type = TREE_TYPE (TREE_TYPE ((*orig_params)[0])); + nonatomic_lhs_type = TYPE_MAIN_VARIANT (nonatomic_lhs_type); + gcc_assert (TREE_CODE (nonatomic_lhs_type) == BITINT_TYPE); + + tree lhs_addr = (*orig_params)[0]; + tree val = convert (nonatomic_lhs_type, (*orig_params)[1]); + tree model = convert (integer_type_node, (*orig_params)[2]); + if (TREE_SIDE_EFFECTS (lhs_addr)) + { + tree var = create_tmp_var_raw (TREE_TYPE (lhs_addr)); + lhs_addr = build4 (TARGET_EXPR, TREE_TYPE (lhs_addr), var, lhs_addr, + NULL_TREE, NULL_TREE); + add_stmt (lhs_addr); + } + if (TREE_SIDE_EFFECTS (val)) + { + tree var = create_tmp_var_raw (nonatomic_lhs_type); + val = build4 (TARGET_EXPR, nonatomic_lhs_type, var, val, NULL_TREE, + NULL_TREE); + add_stmt (val); + } + if (TREE_SIDE_EFFECTS (model)) + { + tree var = create_tmp_var_raw (integer_type_node); + model = build4 (TARGET_EXPR, integer_type_node, var, model, NULL_TREE, + NULL_TREE); + add_stmt (model); + } + + tree old = create_tmp_var_raw (nonatomic_lhs_type); + tree old_addr = build_unary_op (loc, ADDR_EXPR, old, false); + TREE_ADDRESSABLE (old) = 1; + suppress_warning (old); + + tree newval = create_tmp_var_raw (nonatomic_lhs_type); + tree newval_addr = build_unary_op (loc, ADDR_EXPR, newval, false); + TREE_ADDRESSABLE (newval) = 1; + suppress_warning (newval); + + tree loop_decl = create_artificial_label (loc); + tree loop_label = build1 (LABEL_EXPR, void_type_node, loop_decl); + + tree done_decl = create_artificial_label (loc); + tree done_label = build1 (LABEL_EXPR, void_type_node, done_decl); + + vec *params; + vec_alloc (params, 6); + + /* __atomic_load (addr, &old, SEQ_CST). */ + tree fndecl = builtin_decl_explicit (BUILT_IN_ATOMIC_LOAD); + params->quick_push (lhs_addr); + params->quick_push (old_addr); + params->quick_push (build_int_cst (integer_type_node, MEMMODEL_RELAXED)); + tree func_call = resolve_overloaded_builtin (loc, fndecl, params); + if (func_call == NULL_TREE) + func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL); + old = build4 (TARGET_EXPR, nonatomic_lhs_type, old, func_call, NULL_TREE, + NULL_TREE); + add_stmt (old); + params->truncate (0); + + /* loop: */ + add_stmt (loop_label); + + /* newval = old + val; */ + tree rhs; + switch (code) + { + case PLUS_EXPR: + case MINUS_EXPR: + if (!TYPE_OVERFLOW_WRAPS (nonatomic_lhs_type)) + { + tree utype + = build_bitint_type (TYPE_PRECISION (nonatomic_lhs_type), 1); + rhs = convert (nonatomic_lhs_type, + build2_loc (loc, code, utype, + convert (utype, old), + convert (utype, val))); + } + else + rhs = build2_loc (loc, code, nonatomic_lhs_type, old, val); + break; + case BIT_AND_EXPR: + case BIT_IOR_EXPR: + case BIT_XOR_EXPR: + rhs = build2_loc (loc, code, nonatomic_lhs_type, old, val); + break; + case ERROR_MARK: + rhs = build2_loc (loc, BIT_AND_EXPR, nonatomic_lhs_type, + build1_loc (loc, BIT_NOT_EXPR, + nonatomic_lhs_type, old), val); + break; + default: + gcc_unreachable (); + } + rhs = build4 (TARGET_EXPR, nonatomic_lhs_type, newval, rhs, NULL_TREE, + NULL_TREE); + SET_EXPR_LOCATION (rhs, loc); + add_stmt (rhs); + + /* if (__atomic_compare_exchange (addr, &old, &new, false, model, model)) + goto done; */ + fndecl = builtin_decl_explicit (BUILT_IN_ATOMIC_COMPARE_EXCHANGE); + params->quick_push (lhs_addr); + params->quick_push (old_addr); + params->quick_push (newval_addr); + params->quick_push (integer_zero_node); + params->quick_push (model); + if (tree_fits_uhwi_p (model) + && (tree_to_uhwi (model) == MEMMODEL_RELEASE + || tree_to_uhwi (model) == MEMMODEL_ACQ_REL)) + params->quick_push (build_int_cst (integer_type_node, MEMMODEL_RELAXED)); + else + params->quick_push (model); + func_call = resolve_overloaded_builtin (loc, fndecl, params); + if (func_call == NULL_TREE) + func_call = build_function_call_vec (loc, vNULL, fndecl, params, NULL); + + tree goto_stmt = build1 (GOTO_EXPR, void_type_node, done_decl); + SET_EXPR_LOCATION (goto_stmt, loc); + + tree stmt + = build3 (COND_EXPR, void_type_node, func_call, goto_stmt, NULL_TREE); + SET_EXPR_LOCATION (stmt, loc); + add_stmt (stmt); + + /* goto loop; */ + goto_stmt = build1 (GOTO_EXPR, void_type_node, loop_decl); + SET_EXPR_LOCATION (goto_stmt, loc); + add_stmt (goto_stmt); + + /* done: */ + add_stmt (done_label); + + tree ret = create_tmp_var_raw (nonatomic_lhs_type); + stmt = build2_loc (loc, MODIFY_EXPR, void_type_node, ret, + return_old_p ? old : newval); + add_stmt (stmt); + + /* Finish the compound statement. */ + stmts = pop_stmt_list (stmts); + + return build4 (TARGET_EXPR, nonatomic_lhs_type, ret, stmts, NULL_TREE, + NULL_TREE); +} + + /* Some builtin functions are placeholders for other expressions. This function should be called immediately after parsing the call expression before surrounding code has committed to the type of the expression. @@ -8025,19 +8262,22 @@ resolve_overloaded_builtin (location_t l /* The following are not _FETCH_OPs and must be accepted with pointers to _Bool (or C++ bool). */ if (fetch_op) - fetch_op = - (orig_code != BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_N - && orig_code != BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N - && orig_code != BUILT_IN_SYNC_LOCK_TEST_AND_SET_N - && orig_code != BUILT_IN_SYNC_LOCK_RELEASE_N); + fetch_op = (orig_code != BUILT_IN_SYNC_BOOL_COMPARE_AND_SWAP_N + && orig_code != BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_N + && orig_code != BUILT_IN_SYNC_LOCK_TEST_AND_SET_N + && orig_code != BUILT_IN_SYNC_LOCK_RELEASE_N); - int n = sync_resolve_size (function, params, fetch_op); + int n = sync_resolve_size (function, params, fetch_op, orig_format); tree new_function, first_param, result; enum built_in_function fncode; if (n == 0) return error_mark_node; + if (n == -1) + return atomic_bitint_fetch_using_cas_loop (loc, orig_code, + function, params); + fncode = (enum built_in_function)((int)orig_code + exact_log2 (n) + 1); new_function = builtin_decl_explicit (fncode); if (!sync_resolve_params (loc, function, new_function, params, @@ -8402,6 +8642,7 @@ keyword_begins_type_specifier (enum rid case RID_FRACT: case RID_ACCUM: case RID_BOOL: + case RID_BITINT: case RID_WCHAR: case RID_CHAR8: case RID_CHAR16: --- gcc/c-family/c-common.h.jj 2023-08-08 15:55:05.244182129 +0200 +++ gcc/c-family/c-common.h 2023-08-08 16:12:02.331939770 +0200 @@ -101,7 +101,7 @@ enum rid RID_ENUM, RID_STRUCT, RID_UNION, RID_IF, RID_ELSE, RID_WHILE, RID_DO, RID_FOR, RID_SWITCH, RID_CASE, RID_DEFAULT, RID_BREAK, RID_CONTINUE, RID_RETURN, RID_GOTO, - RID_SIZEOF, + RID_SIZEOF, RID_BITINT, /* C extensions */ RID_ASM, RID_TYPEOF, RID_TYPEOF_UNQUAL, RID_ALIGNOF, RID_ATTRIBUTE, --- gcc/c-family/c-cppbuiltin.cc.jj 2023-08-08 15:54:33.448627395 +0200 +++ gcc/c-family/c-cppbuiltin.cc 2023-08-08 16:12:02.331939770 +0200 @@ -1190,6 +1190,29 @@ c_cpp_builtins (cpp_reader *pfile) builtin_define_type_width ("__PTRDIFF_WIDTH__", ptrdiff_type_node, NULL_TREE); builtin_define_type_width ("__SIZE_WIDTH__", size_type_node, NULL_TREE); + if (!c_dialect_cxx ()) + { + struct bitint_info info; + /* For now, restrict __BITINT_MAXWIDTH__ to what can be represented in + wide_int and widest_int. */ + if (targetm.c.bitint_type_info (WIDE_INT_MAX_PRECISION - 1, &info)) + { + cpp_define_formatted (pfile, "__BITINT_MAXWIDTH__=%d", + (int) WIDE_INT_MAX_PRECISION - 1); + if (flag_building_libgcc) + { + scalar_int_mode limb_mode + = as_a (info.limb_mode); + cpp_define_formatted (pfile, "__LIBGCC_BITINT_LIMB_WIDTH__=%d", + (int) GET_MODE_PRECISION (limb_mode)); + cpp_define_formatted (pfile, "__LIBGCC_BITINT_ORDER__=%s", + info.big_endian + ? "__ORDER_BIG_ENDIAN__" + : "__ORDER_LITTLE_ENDIAN__"); + } + } + } + if (c_dialect_cxx ()) for (i = 0; i < NUM_INT_N_ENTS; i ++) if (int_n_enabled_p[i]) --- gcc/c-family/c-lex.cc.jj 2023-08-08 15:55:05.245182116 +0200 +++ gcc/c-family/c-lex.cc 2023-08-08 16:12:02.332939756 +0200 @@ -837,6 +837,170 @@ interpret_integer (const cpp_token *toke *overflow = OT_NONE; + if (UNLIKELY (flags & CPP_N_BITINT)) + { + unsigned int suffix_len = 2 + ((flags & CPP_N_UNSIGNED) ? 1 : 0); + int max_bits_per_digit = 4; // ceil (log2 (10)) + unsigned int prefix_len = 0; + bool hex = false; + const int bitint_maxwidth = WIDE_INT_MAX_PRECISION - 1; + if ((flags & CPP_N_RADIX) == CPP_N_OCTAL) + { + max_bits_per_digit = 3; + prefix_len = 1; + } + else if ((flags & CPP_N_RADIX) == CPP_N_HEX) + { + max_bits_per_digit = 4; + prefix_len = 2; + hex = true; + } + else if ((flags & CPP_N_RADIX) == CPP_N_BINARY) + { + max_bits_per_digit = 1; + prefix_len = 2; + } + int max_digits + = TYPE_PRECISION (intmax_type_node) >> max_bits_per_digit; + const int max_buf = 128; + if (max_digits > max_buf) + max_digits = max_buf; + + widest_int wval; + unsigned int prec; + gcc_checking_assert (token->val.str.len > prefix_len + suffix_len + || token->val.str.len == 1 + suffix_len); + if (token->val.str.len - (prefix_len + suffix_len) + <= (unsigned) max_digits) + { + integer = cpp_interpret_integer (parse_in, token, + (flags & CPP_N_RADIX) + | CPP_N_UNSIGNED); + ival[0] = integer.low; + ival[1] = integer.high; + ival[2] = 0; + wval = widest_int::from_array (ival, 3); + } + else + { + unsigned char buf[3 + max_buf]; + memcpy (buf, token->val.str.text, prefix_len); + wval = 0U; + const unsigned char *p = token->val.str.text + prefix_len; + cpp_token tok = *token; + tok.val.str.text = buf; + if (!prefix_len) + max_digits = 19; + do + { + unsigned char *q = buf + prefix_len; + do + { + unsigned char c = *p++; + if (ISDIGIT (c) || (hex && ISXDIGIT (c))) + { + *q++ = c; + if (q == buf + prefix_len + max_digits) + break; + } + else if (c != '\'') + { + --p; + break; + } + } + while (1); + if (q == buf + prefix_len) + break; + else + { + wi::overflow_type wioverflow; + *q = '\0'; + tok.val.str.len = q - buf; + if (wval == 0) + ; + else if (prefix_len) + { + prec = wi::min_precision (wval, UNSIGNED); + unsigned HOST_WIDE_INT shift + = (tok.val.str.len - prefix_len) * max_bits_per_digit; + if (prec + shift > bitint_maxwidth) + goto bitint_overflow; + wval = wi::lshift (wval, shift); + } + else + { + static unsigned HOST_WIDE_INT tens[] + = { 1U, 10U, 100U, 1000U, + HOST_WIDE_INT_UC (10000), + HOST_WIDE_INT_UC (100000), + HOST_WIDE_INT_UC (1000000), + HOST_WIDE_INT_UC (10000000), + HOST_WIDE_INT_UC (100000000), + HOST_WIDE_INT_UC (1000000000), + HOST_WIDE_INT_UC (10000000000), + HOST_WIDE_INT_UC (100000000000), + HOST_WIDE_INT_UC (1000000000000), + HOST_WIDE_INT_UC (10000000000000), + HOST_WIDE_INT_UC (100000000000000), + HOST_WIDE_INT_UC (1000000000000000), + HOST_WIDE_INT_UC (10000000000000000), + HOST_WIDE_INT_UC (100000000000000000), + HOST_WIDE_INT_UC (1000000000000000000), + HOST_WIDE_INT_UC (10000000000000000000) }; + widest_int ten = tens[q - buf]; + wval = wi::umul (wval, ten, &wioverflow); + if (wioverflow) + goto bitint_overflow; + } + integer = cpp_interpret_integer (parse_in, &tok, + (flags & CPP_N_RADIX) + | CPP_N_UNSIGNED); + ival[0] = integer.low; + ival[1] = integer.high; + ival[2] = 0; + if (prefix_len) + wval = wval + widest_int::from_array (ival, 3); + else + { + widest_int addend = widest_int::from_array (ival, 3); + wval = wi::add (wval, addend, UNSIGNED, &wioverflow); + if (wioverflow) + goto bitint_overflow; + } + } + } + while (1); + } + + prec = wi::min_precision (wval, UNSIGNED); + if (prec == 0) + prec = 1; + if ((flags & CPP_N_UNSIGNED) == 0) + ++prec; + if (prec > bitint_maxwidth) + { + bitint_overflow: + if ((flags & CPP_N_UNSIGNED) != 0) + error ("integer constant is too large for " + "% type", bitint_maxwidth); + else + error ("integer constant is too large for " + "%<_BitInt(%d)%> type", bitint_maxwidth); + return integer_zero_node; + } + + struct bitint_info info; + if (!targetm.c.bitint_type_info (prec, &info)) + { + sorry ("%<_BitInt(%d)%> is not supported on this target", prec); + return integer_zero_node; + } + + type = build_bitint_type (prec, (flags & CPP_N_UNSIGNED) != 0); + return wide_int_to_tree (type, wval); + } + integer = cpp_interpret_integer (parse_in, token, flags); if (integer.overflow) *overflow = OT_OVERFLOW; --- gcc/c-family/c-pretty-print.cc.jj 2023-08-08 15:54:33.553625925 +0200 +++ gcc/c-family/c-pretty-print.cc 2023-08-08 16:12:02.332939756 +0200 @@ -399,6 +399,23 @@ c_pretty_printer::simple_type_specifier } break; + case BITINT_TYPE: + if (TYPE_NAME (t)) + { + t = TYPE_NAME (t); + simple_type_specifier (t); + } + else + { + int prec = TYPE_PRECISION (t); + if (TYPE_UNSIGNED (t)) + pp_c_ws_string (this, "unsigned"); + pp_c_ws_string (this, "_BitInt(");; + pp_decimal_int (this, prec); + pp_right_paren (this); + } + break; + case TYPE_DECL: if (DECL_NAME (t)) id_expression (t); @@ -688,6 +705,7 @@ c_pretty_printer::direct_abstract_declar case REAL_TYPE: case FIXED_POINT_TYPE: case ENUMERAL_TYPE: + case BITINT_TYPE: case RECORD_TYPE: case UNION_TYPE: case VECTOR_TYPE: @@ -1019,8 +1037,18 @@ pp_c_integer_constant (c_pretty_printer pp_minus (pp); wi = -wi; } - print_hex (wi, pp_buffer (pp)->digit_buffer); - pp_string (pp, pp_buffer (pp)->digit_buffer); + unsigned int prec = wi.get_precision (); + if ((prec + 3) / 4 > sizeof (pp_buffer (pp)->digit_buffer) - 3) + { + char *buf = XALLOCAVEC (char, (prec + 3) / 4 + 3); + print_hex (wi, buf); + pp_string (pp, buf); + } + else + { + print_hex (wi, pp_buffer (pp)->digit_buffer); + pp_string (pp, pp_buffer (pp)->digit_buffer); + } } } --- gcc/c/c-convert.cc.jj 2023-08-08 15:54:33.642624678 +0200 +++ gcc/c/c-convert.cc 2023-08-08 16:12:02.332939756 +0200 @@ -117,6 +117,7 @@ c_convert (tree type, tree expr, bool in gcc_fallthrough (); case INTEGER_TYPE: + case BITINT_TYPE: if (sanitize_flags_p (SANITIZE_FLOAT_CAST) && current_function_decl != NULL_TREE && SCALAR_FLOAT_TYPE_P (TREE_TYPE (expr)) --- gcc/c/c-decl.cc.jj 2023-08-08 15:55:05.277181667 +0200 +++ gcc/c/c-decl.cc 2023-08-08 16:15:41.006877794 +0200 @@ -6390,7 +6390,8 @@ check_bitfield_type_and_width (location_ /* Detect invalid bit-field type. */ if (TREE_CODE (*type) != INTEGER_TYPE && TREE_CODE (*type) != BOOLEAN_TYPE - && TREE_CODE (*type) != ENUMERAL_TYPE) + && TREE_CODE (*type) != ENUMERAL_TYPE + && TREE_CODE (*type) != BITINT_TYPE) { error_at (loc, "bit-field %qs has invalid type", name); *type = unsigned_type_node; @@ -9330,8 +9331,14 @@ finish_struct (location_t loc, tree t, t tree type = TREE_TYPE (field); if (width != TYPE_PRECISION (type)) { - TREE_TYPE (field) - = c_build_bitfield_integer_type (width, TYPE_UNSIGNED (type)); + if (TREE_CODE (type) == BITINT_TYPE + && (width > 1 || TYPE_UNSIGNED (type))) + TREE_TYPE (field) + = build_bitint_type (width, TYPE_UNSIGNED (type)); + else + TREE_TYPE (field) + = c_build_bitfield_integer_type (width, + TYPE_UNSIGNED (type)); SET_DECL_MODE (field, TYPE_MODE (TREE_TYPE (field))); } DECL_INITIAL (field) = NULL_TREE; @@ -11546,14 +11553,18 @@ declspecs_add_type (location_t loc, stru ("both % and % in " "declaration specifiers")); else if (specs->typespec_word == cts_int_n) - error_at (loc, - ("both % and %<__int%d%> in " - "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); + error_at (loc, + ("both % and %<__int%d%> in " + "declaration specifiers"), + int_n_data[specs->u.int_n_idx].bitsize); else if (specs->typespec_word == cts_bool) error_at (loc, ("both % and %<_Bool%> in " "declaration specifiers")); + else if (specs->typespec_word == cts_bitint) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); else if (specs->typespec_word == cts_char) error_at (loc, ("both % and % in " @@ -11566,8 +11577,8 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->typespec_word == cts_dfloat32) @@ -11606,11 +11617,15 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<__int%d%> in " "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); else if (specs->typespec_word == cts_bool) error_at (loc, ("both % and %<_Bool%> in " "declaration specifiers")); + else if (specs->typespec_word == cts_bitint) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); else if (specs->typespec_word == cts_char) error_at (loc, ("both % and % in " @@ -11627,8 +11642,8 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->typespec_word == cts_dfloat32) @@ -11679,8 +11694,8 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->typespec_word == cts_dfloat32) @@ -11731,8 +11746,8 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->typespec_word == cts_dfloat32) @@ -11770,6 +11785,10 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Bool%> in " "declaration specifiers")); + else if (specs->typespec_word == cts_bitint) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); else if (specs->typespec_word == cts_dfloat32) error_at (loc, ("both % and %<_Decimal32%> in " @@ -11809,7 +11828,7 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both %<_Sat%> and %<__int%d%> in " "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); } else if (specs->typespec_word == cts_auto_type) error_at (loc, @@ -11823,6 +11842,10 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both %<_Sat%> and %<_Bool%> in " "declaration specifiers")); + else if (specs->typespec_word == cts_bitint) + error_at (loc, + ("both %<_Sat%> and %<_BitInt%> in " + "declaration specifiers")); else if (specs->typespec_word == cts_char) error_at (loc, ("both %<_Sat%> and % in " @@ -11843,8 +11866,8 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both %<_Sat%> and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->typespec_word == cts_dfloat32) @@ -11882,7 +11905,7 @@ declspecs_add_type (location_t loc, stru { /* "void", "_Bool", "char", "int", "float", "double", "_FloatN", "_FloatNx", "_Decimal32", "__intN", - "_Decimal64", "_Decimal128", "_Fract", "_Accum" or + "_Decimal64", "_Decimal128", "_Fract", "_Accum", "_BitInt(N)" or "__auto_type". */ if (specs->typespec_word != cts_none) { @@ -11927,7 +11950,7 @@ declspecs_add_type (location_t loc, stru case RID_INT_N_1: case RID_INT_N_2: case RID_INT_N_3: - specs->int_n_idx = i - RID_INT_N_0; + specs->u.int_n_idx = i - RID_INT_N_0; if (!in_system_header_at (input_location) /* If the INT_N type ends in "__", and so is of the format "__intN__", don't pedwarn. */ @@ -11935,29 +11958,29 @@ declspecs_add_type (location_t loc, stru + (IDENTIFIER_LENGTH (type) - 2), "__", 2) != 0)) pedwarn (loc, OPT_Wpedantic, "ISO C does not support %<__int%d%> types", - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); if (specs->long_p) error_at (loc, ("both %<__int%d%> and % in " "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); else if (specs->saturating_p) error_at (loc, ("both %<_Sat%> and %<__int%d%> in " "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); else if (specs->short_p) error_at (loc, ("both %<__int%d%> and % in " "declaration specifiers"), - int_n_data[specs->int_n_idx].bitsize); - else if (! int_n_enabled_p[specs->int_n_idx]) + int_n_data[specs->u.int_n_idx].bitsize); + else if (! int_n_enabled_p[specs->u.int_n_idx]) { specs->typespec_word = cts_int_n; error_at (loc, "%<__int%d%> is not supported on this target", - int_n_data[specs->int_n_idx].bitsize); + int_n_data[specs->u.int_n_idx].bitsize); } else { @@ -12115,12 +12138,12 @@ declspecs_add_type (location_t loc, stru } return specs; CASE_RID_FLOATN_NX: - specs->floatn_nx_idx = i - RID_FLOATN_NX_FIRST; + specs->u.floatn_nx_idx = i - RID_FLOATN_NX_FIRST; if (!in_system_header_at (input_location)) pedwarn (loc, OPT_Wpedantic, "ISO C does not support the %<_Float%d%s%> type", - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); @@ -12128,49 +12151,49 @@ declspecs_add_type (location_t loc, stru error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->short_p) error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->signed_p) error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->unsigned_p) error_at (loc, ("both % and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); else if (specs->saturating_p) error_at (loc, ("both %<_Sat%> and %<_Float%d%s%> in " "declaration specifiers"), - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); - else if (FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx) == NULL_TREE) + else if (FLOATN_NX_TYPE_NODE (specs->u.floatn_nx_idx) == NULL_TREE) { specs->typespec_word = cts_floatn_nx; error_at (loc, "%<_Float%d%s%> is not supported on this target", - floatn_nx_types[specs->floatn_nx_idx].n, - (floatn_nx_types[specs->floatn_nx_idx].extended + floatn_nx_types[specs->u.floatn_nx_idx].n, + (floatn_nx_types[specs->u.floatn_nx_idx].extended ? "x" : "")); } @@ -12267,6 +12290,63 @@ declspecs_add_type (location_t loc, stru pedwarn (loc, OPT_Wpedantic, "ISO C does not support fixed-point types"); return specs; + case RID_BITINT: + if (specs->long_p) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); + else if (specs->short_p) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); + else if (specs->complex_p) + error_at (loc, + ("both % and %<_BitInt%> in " + "declaration specifiers")); + else if (specs->saturating_p) + error_at (loc, + ("both %<_Sat%> and %<_BitInt%> in " + "declaration specifiers")); + else + { + specs->typespec_word = cts_bitint; + specs->locations[cdw_typespec] = loc; + specs->u.bitint_prec = -1; + if (error_operand_p (spec.expr)) + return specs; + if (TREE_CODE (spec.expr) != INTEGER_CST + || !INTEGRAL_TYPE_P (TREE_TYPE (spec.expr))) + { + error_at (loc, "%<_BitInt%> argument is not an integer " + "constant expression"); + return specs; + } + if (tree_int_cst_sgn (spec.expr) <= 0) + { + error_at (loc, "%<_BitInt%> argument %qE is not " + "positive integer constant expression", + spec.expr); + return specs; + } + if (wi::to_widest (spec.expr) > WIDE_INT_MAX_PRECISION - 1) + { + error_at (loc, "%<_BitInt%> argument %qE is larger than " + "% %qd", + spec.expr, (int) WIDE_INT_MAX_PRECISION - 1); + return specs; + } + specs->u.bitint_prec = tree_to_uhwi (spec.expr); + struct bitint_info info; + if (!targetm.c.bitint_type_info (specs->u.bitint_prec, + &info)) + { + sorry_at (loc, "%<_BitInt(%d)%> is not supported on " + "this target", specs->u.bitint_prec); + specs->u.bitint_prec = -1; + return specs; + } + } + return specs; default: /* ObjC reserved word "id", handled below. */ break; @@ -12668,12 +12748,12 @@ finish_declspecs (struct c_declspecs *sp case cts_int_n: gcc_assert (!specs->long_p && !specs->short_p && !specs->long_long_p); gcc_assert (!(specs->signed_p && specs->unsigned_p)); - if (! int_n_enabled_p[specs->int_n_idx]) + if (! int_n_enabled_p[specs->u.int_n_idx]) specs->type = integer_type_node; else specs->type = (specs->unsigned_p - ? int_n_trees[specs->int_n_idx].unsigned_type - : int_n_trees[specs->int_n_idx].signed_type); + ? int_n_trees[specs->u.int_n_idx].unsigned_type + : int_n_trees[specs->u.int_n_idx].signed_type); if (specs->complex_p) { pedwarn (specs->locations[cdw_complex], OPT_Wpedantic, @@ -12733,12 +12813,12 @@ finish_declspecs (struct c_declspecs *sp case cts_floatn_nx: gcc_assert (!specs->long_p && !specs->short_p && !specs->signed_p && !specs->unsigned_p); - if (FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx) == NULL_TREE) + if (FLOATN_NX_TYPE_NODE (specs->u.floatn_nx_idx) == NULL_TREE) specs->type = integer_type_node; else if (specs->complex_p) - specs->type = COMPLEX_FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx); + specs->type = COMPLEX_FLOATN_NX_TYPE_NODE (specs->u.floatn_nx_idx); else - specs->type = FLOATN_NX_TYPE_NODE (specs->floatn_nx_idx); + specs->type = FLOATN_NX_TYPE_NODE (specs->u.floatn_nx_idx); break; case cts_dfloat32: case cts_dfloat64: @@ -12840,6 +12920,22 @@ finish_declspecs (struct c_declspecs *sp : accum_type_node; } break; + case cts_bitint: + gcc_assert (!specs->long_p && !specs->short_p + && !specs->complex_p); + if (!specs->unsigned_p && specs->u.bitint_prec == 1) + { + error_at (specs->locations[cdw_typespec], + "% argument must be at least 2"); + specs->type = integer_type_node; + break; + } + if (specs->u.bitint_prec == -1) + specs->type = integer_type_node; + else + specs->type = build_bitint_type (specs->u.bitint_prec, + specs->unsigned_p); + break; default: gcc_unreachable (); } --- gcc/c/c-parser.cc.jj 2023-08-08 15:55:05.286181541 +0200 +++ gcc/c/c-parser.cc 2023-08-08 16:12:02.336939700 +0200 @@ -580,6 +580,7 @@ c_keyword_starts_typename (enum rid keyw case RID_DFLOAT128: CASE_RID_FLOATN_NX: case RID_BOOL: + case RID_BITINT: case RID_ENUM: case RID_STRUCT: case RID_UNION: @@ -783,6 +784,7 @@ c_token_starts_declspecs (c_token *token case RID_DFLOAT128: CASE_RID_FLOATN_NX: case RID_BOOL: + case RID_BITINT: case RID_ENUM: case RID_STRUCT: case RID_UNION: @@ -3358,6 +3360,30 @@ c_parser_declspecs (c_parser *parser, st t = c_parser_typeof_specifier (parser); declspecs_add_type (loc, specs, t); break; + case RID_BITINT: + if (!typespec_ok) + goto out; + else + { + attrs_ok = true; + seen_type = true; + t.kind = ctsk_resword; + t.spec = c_parser_peek_token (parser)->value; + t.expr = error_mark_node; + t.expr_const_operands = true; + t.has_enum_type_specifier = false; + c_parser_consume_token (parser); + matching_parens parens; + if (parens.require_open (parser)) + { + c_expr expr = c_parser_expr_no_commas (parser, NULL); + t.expr = convert_lvalue_to_rvalue (loc, expr, true, + true).value; + parens.skip_until_found_close (parser); + } + declspecs_add_type (loc, specs, t); + } + break; case RID_ATOMIC: /* C parser handling of Objective-C constructs needs checking for correct lvalue-to-rvalue conversions, and @@ -5005,6 +5031,7 @@ c_parser_gnu_attribute_any_word (c_parse case RID_DFLOAT128: CASE_RID_FLOATN_NX: case RID_BOOL: + case RID_BITINT: case RID_FRACT: case RID_ACCUM: case RID_SAT: --- gcc/c/c-tree.h.jj 2023-08-08 15:54:33.812622298 +0200 +++ gcc/c/c-tree.h 2023-08-08 16:12:02.336939700 +0200 @@ -270,7 +270,7 @@ enum c_storage_class { /* A type specifier keyword "void", "_Bool", "char", "int", "float", "double", "_Decimal32", "_Decimal64", "_Decimal128", "_Fract", "_Accum", - or none of these. */ + "_BitInt", or none of these. */ enum c_typespec_keyword { cts_none, cts_void, @@ -286,6 +286,7 @@ enum c_typespec_keyword { cts_floatn_nx, cts_fract, cts_accum, + cts_bitint, cts_auto_type }; @@ -366,11 +367,16 @@ struct c_declspecs { specifier, in bytes, or -1 if no such specifiers with nonzero alignment. */ int align_log; - /* For the __intN declspec, this stores the index into the int_n_* arrays. */ - int int_n_idx; - /* For the _FloatN and _FloatNx declspec, this stores the index into - the floatn_nx_types array. */ - int floatn_nx_idx; + union { + /* For the __intN declspec, this stores the index into the int_n_* + arrays. */ + int int_n_idx; + /* For the _FloatN and _FloatNx declspec, this stores the index into + the floatn_nx_types array. */ + int floatn_nx_idx; + /* For _BitInt(N) this stores the N. */ + int bitint_prec; + } u; /* The storage class specifier, or csc_none if none. */ enum c_storage_class storage_class; /* Any type specifier keyword used such as "int", not reflecting --- gcc/c/c-typeck.cc.jj 2023-08-08 15:54:33.822622158 +0200 +++ gcc/c/c-typeck.cc 2023-08-08 16:15:41.008877766 +0200 @@ -413,10 +413,14 @@ composite_type (tree t1, tree t2) the composite type. */ if (code1 == ENUMERAL_TYPE - && (code2 == INTEGER_TYPE || code2 == BOOLEAN_TYPE)) + && (code2 == INTEGER_TYPE + || code2 == BOOLEAN_TYPE + || code2 == BITINT_TYPE)) return t1; if (code2 == ENUMERAL_TYPE - && (code1 == INTEGER_TYPE || code1 == BOOLEAN_TYPE)) + && (code1 == INTEGER_TYPE + || code1 == BOOLEAN_TYPE + || code1 == BITINT_TYPE)) return t2; gcc_assert (code1 == code2); @@ -764,10 +768,10 @@ c_common_type (tree t1, tree t2) gcc_assert (code1 == VECTOR_TYPE || code1 == COMPLEX_TYPE || code1 == FIXED_POINT_TYPE || code1 == REAL_TYPE - || code1 == INTEGER_TYPE); + || code1 == INTEGER_TYPE || code1 == BITINT_TYPE); gcc_assert (code2 == VECTOR_TYPE || code2 == COMPLEX_TYPE || code2 == FIXED_POINT_TYPE || code2 == REAL_TYPE - || code2 == INTEGER_TYPE); + || code2 == INTEGER_TYPE || code2 == BITINT_TYPE); /* When one operand is a decimal float type, the other operand cannot be a generic float type or a complex type. We also disallow vector types @@ -1004,6 +1008,20 @@ c_common_type (tree t1, tree t2) if (mv1 == FLOATNX_TYPE_NODE (i) || mv2 == FLOATNX_TYPE_NODE (i)) return FLOATNX_TYPE_NODE (i); + if ((code1 == BITINT_TYPE || code2 == BITINT_TYPE) && code1 != code2) + { + /* Prefer any other integral types over bit-precise integer types. */ + if (TYPE_UNSIGNED (t1) == TYPE_UNSIGNED (t2)) + return code1 == BITINT_TYPE ? t2 : t1; + /* If BITINT_TYPE is unsigned and the other type is signed + non-BITINT_TYPE with the same precision, the latter has higher rank. + In that case: + Otherwise, both operands are converted to the unsigned integer type + corresponding to the type of the operand with signed integer type. */ + if (TYPE_UNSIGNED (code1 == BITINT_TYPE ? t1 : t2)) + return c_common_unsigned_type (code1 == BITINT_TYPE ? t2 : t1); + } + /* Otherwise prefer the unsigned one. */ if (TYPE_UNSIGNED (t1)) @@ -1177,6 +1195,7 @@ comptypes_internal (const_tree type1, co case INTEGER_TYPE: case FIXED_POINT_TYPE: case REAL_TYPE: + case BITINT_TYPE: /* With these nodes, we can't determine type equivalence by looking at what is stored in the nodes themselves, because two nodes might have different TYPE_MAIN_VARIANTs but still @@ -2260,12 +2279,17 @@ perform_integral_promotions (tree exp) /* ??? This should no longer be needed now bit-fields have their proper types. */ if (TREE_CODE (exp) == COMPONENT_REF - && DECL_C_BIT_FIELD (TREE_OPERAND (exp, 1)) + && DECL_C_BIT_FIELD (TREE_OPERAND (exp, 1))) + { + if (TREE_CODE (DECL_BIT_FIELD_TYPE (TREE_OPERAND (exp, 1))) + == BITINT_TYPE) + return convert (DECL_BIT_FIELD_TYPE (TREE_OPERAND (exp, 1)), exp); /* If it's thinner than an int, promote it like a c_promoting_integer_type_p, otherwise leave it alone. */ - && compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)), - TYPE_PRECISION (integer_type_node)) < 0) - return convert (integer_type_node, exp); + if (compare_tree_int (DECL_SIZE (TREE_OPERAND (exp, 1)), + TYPE_PRECISION (integer_type_node)) < 0) + return convert (integer_type_node, exp); + } if (c_promoting_integer_type_p (type)) { @@ -2790,7 +2814,8 @@ build_array_ref (location_t loc, tree ar if (index == error_mark_node) return error_mark_node; - gcc_assert (TREE_CODE (TREE_TYPE (index)) == INTEGER_TYPE); + gcc_assert (TREE_CODE (TREE_TYPE (index)) == INTEGER_TYPE + || TREE_CODE (TREE_TYPE (index)) == BITINT_TYPE); bool was_vector = VECTOR_TYPE_P (TREE_TYPE (array)); bool non_lvalue = convert_vector_to_array_for_subscript (loc, &array, index); @@ -4558,6 +4583,7 @@ build_unary_op (location_t location, enu associativity, but won't generate any code. */ if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE || typecode == FIXED_POINT_TYPE || typecode == COMPLEX_TYPE + || typecode == BITINT_TYPE || gnu_vector_type_p (TREE_TYPE (arg)))) { error_at (location, "wrong type argument to unary plus"); @@ -4571,6 +4597,7 @@ build_unary_op (location_t location, enu case NEGATE_EXPR: if (!(typecode == INTEGER_TYPE || typecode == REAL_TYPE || typecode == FIXED_POINT_TYPE || typecode == COMPLEX_TYPE + || typecode == BITINT_TYPE || gnu_vector_type_p (TREE_TYPE (arg)))) { error_at (location, "wrong type argument to unary minus"); @@ -4583,6 +4610,7 @@ build_unary_op (location_t location, enu case BIT_NOT_EXPR: /* ~ works on integer types and non float vectors. */ if (typecode == INTEGER_TYPE + || typecode == BITINT_TYPE || (gnu_vector_type_p (TREE_TYPE (arg)) && !VECTOR_FLOAT_TYPE_P (TREE_TYPE (arg)))) { @@ -4657,7 +4685,8 @@ build_unary_op (location_t location, enu case TRUTH_NOT_EXPR: if (typecode != INTEGER_TYPE && typecode != FIXED_POINT_TYPE && typecode != REAL_TYPE && typecode != POINTER_TYPE - && typecode != COMPLEX_TYPE && typecode != NULLPTR_TYPE) + && typecode != COMPLEX_TYPE && typecode != NULLPTR_TYPE + && typecode != BITINT_TYPE) { error_at (location, "wrong type argument to unary exclamation mark"); @@ -4769,7 +4798,7 @@ build_unary_op (location_t location, enu if (typecode != POINTER_TYPE && typecode != FIXED_POINT_TYPE && typecode != INTEGER_TYPE && typecode != REAL_TYPE - && typecode != COMPLEX_TYPE + && typecode != COMPLEX_TYPE && typecode != BITINT_TYPE && !gnu_vector_type_p (TREE_TYPE (arg))) { if (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR) @@ -5394,9 +5423,9 @@ build_conditional_expr (location_t colon result_type = TYPE_MAIN_VARIANT (type1); } else if ((code1 == INTEGER_TYPE || code1 == REAL_TYPE - || code1 == COMPLEX_TYPE) + || code1 == COMPLEX_TYPE || code1 == BITINT_TYPE) && (code2 == INTEGER_TYPE || code2 == REAL_TYPE - || code2 == COMPLEX_TYPE)) + || code2 == COMPLEX_TYPE || code2 == BITINT_TYPE)) { /* In C11, a conditional expression between a floating-point type and an integer type should convert the integer type to @@ -5583,7 +5612,8 @@ build_conditional_expr (location_t colon (build_qualified_type (void_type_node, qual)); } } - else if (code1 == POINTER_TYPE && code2 == INTEGER_TYPE) + else if (code1 == POINTER_TYPE + && (code2 == INTEGER_TYPE || code2 == BITINT_TYPE)) { if (!null_pointer_constant_p (orig_op2)) pedwarn (colon_loc, 0, @@ -5594,7 +5624,8 @@ build_conditional_expr (location_t colon } result_type = type1; } - else if (code2 == POINTER_TYPE && code1 == INTEGER_TYPE) + else if (code2 == POINTER_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { if (!null_pointer_constant_p (orig_op1)) pedwarn (colon_loc, 0, @@ -7131,11 +7162,11 @@ convert_for_assignment (location_t locat else if ((codel == INTEGER_TYPE || codel == REAL_TYPE || codel == FIXED_POINT_TYPE || codel == ENUMERAL_TYPE || codel == COMPLEX_TYPE - || codel == BOOLEAN_TYPE) + || codel == BOOLEAN_TYPE || codel == BITINT_TYPE) && (coder == INTEGER_TYPE || coder == REAL_TYPE || coder == FIXED_POINT_TYPE || coder == ENUMERAL_TYPE || coder == COMPLEX_TYPE - || coder == BOOLEAN_TYPE)) + || coder == BOOLEAN_TYPE || coder == BITINT_TYPE)) { if (warnopt && errtype == ic_argpass) maybe_warn_builtin_no_proto_arg (expr_loc, fundecl, parmnum, type, @@ -8562,7 +8593,8 @@ digest_init (location_t init_loc, tree t if (code == INTEGER_TYPE || code == REAL_TYPE || code == FIXED_POINT_TYPE || code == POINTER_TYPE || code == ENUMERAL_TYPE || code == BOOLEAN_TYPE - || code == COMPLEX_TYPE || code == VECTOR_TYPE || code == NULLPTR_TYPE) + || code == COMPLEX_TYPE || code == VECTOR_TYPE || code == NULLPTR_TYPE + || code == BITINT_TYPE) { tree unconverted_init = inside_init; if (TREE_CODE (TREE_TYPE (init)) == ARRAY_TYPE @@ -12357,12 +12389,14 @@ build_binary_op (location_t location, en { case PLUS_EXPR: /* Handle the pointer + int case. */ - if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) + if (code0 == POINTER_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { ret = pointer_int_sum (location, PLUS_EXPR, op0, op1); goto return_build_binary_op; } - else if (code1 == POINTER_TYPE && code0 == INTEGER_TYPE) + else if (code1 == POINTER_TYPE + && (code0 == INTEGER_TYPE || code0 == BITINT_TYPE)) { ret = pointer_int_sum (location, PLUS_EXPR, op1, op0); goto return_build_binary_op; @@ -12381,7 +12415,8 @@ build_binary_op (location_t location, en goto return_build_binary_op; } /* Handle pointer minus int. Just like pointer plus int. */ - else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) + else if (code0 == POINTER_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { ret = pointer_int_sum (location, MINUS_EXPR, op0, op1); goto return_build_binary_op; @@ -12403,11 +12438,11 @@ build_binary_op (location_t location, en warn_for_div_by_zero (location, op1); if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE - || code0 == FIXED_POINT_TYPE + || code0 == FIXED_POINT_TYPE || code0 == BITINT_TYPE || code0 == COMPLEX_TYPE || gnu_vector_type_p (type0)) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE - || code1 == FIXED_POINT_TYPE + || code1 == FIXED_POINT_TYPE || code1 == BITINT_TYPE || code1 == COMPLEX_TYPE || gnu_vector_type_p (type1))) { @@ -12418,8 +12453,9 @@ build_binary_op (location_t location, en if (code1 == COMPLEX_TYPE || code1 == VECTOR_TYPE) tcode1 = TREE_CODE (TREE_TYPE (TREE_TYPE (op1))); - if (!((tcode0 == INTEGER_TYPE && tcode1 == INTEGER_TYPE) - || (tcode0 == FIXED_POINT_TYPE && tcode1 == FIXED_POINT_TYPE))) + if (!(((tcode0 == INTEGER_TYPE || tcode0 == BITINT_TYPE) + && (tcode1 == INTEGER_TYPE || tcode1 == BITINT_TYPE)) + || (tcode0 == FIXED_POINT_TYPE && tcode1 == FIXED_POINT_TYPE))) resultcode = RDIV_EXPR; else /* Although it would be tempting to shorten always here, that @@ -12435,7 +12471,8 @@ build_binary_op (location_t location, en case BIT_AND_EXPR: case BIT_IOR_EXPR: case BIT_XOR_EXPR: - if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE) + if ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) shorten = -1; /* Allow vector types which are not floating point types. */ else if (gnu_vector_type_p (type0) @@ -12455,7 +12492,8 @@ build_binary_op (location_t location, en && TREE_CODE (TREE_TYPE (type0)) == INTEGER_TYPE && TREE_CODE (TREE_TYPE (type1)) == INTEGER_TYPE) common = 1; - else if (code0 == INTEGER_TYPE && code1 == INTEGER_TYPE) + else if ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { /* Although it would be tempting to shorten always here, that loses on some targets, since the modulo instruction is undefined if the @@ -12473,10 +12511,12 @@ build_binary_op (location_t location, en case TRUTH_XOR_EXPR: if ((code0 == INTEGER_TYPE || code0 == POINTER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE - || code0 == FIXED_POINT_TYPE || code0 == NULLPTR_TYPE) + || code0 == FIXED_POINT_TYPE || code0 == NULLPTR_TYPE + || code0 == BITINT_TYPE) && (code1 == INTEGER_TYPE || code1 == POINTER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE - || code1 == FIXED_POINT_TYPE || code1 == NULLPTR_TYPE)) + || code1 == FIXED_POINT_TYPE || code1 == NULLPTR_TYPE + || code1 == BITINT_TYPE)) { /* Result of these operations is always an int, but that does not mean the operands should be @@ -12539,9 +12579,10 @@ build_binary_op (location_t location, en converted = 1; } else if ((code0 == INTEGER_TYPE || code0 == FIXED_POINT_TYPE + || code0 == BITINT_TYPE || (gnu_vector_type_p (type0) && TREE_CODE (TREE_TYPE (type0)) == INTEGER_TYPE)) - && code1 == INTEGER_TYPE) + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { doing_shift = true; if (TREE_CODE (op1) == INTEGER_CST) @@ -12599,9 +12640,10 @@ build_binary_op (location_t location, en converted = 1; } else if ((code0 == INTEGER_TYPE || code0 == FIXED_POINT_TYPE + || code0 == BITINT_TYPE || (gnu_vector_type_p (type0) && TREE_CODE (TREE_TYPE (type0)) == INTEGER_TYPE)) - && code1 == INTEGER_TYPE) + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { doing_shift = true; if (TREE_CODE (op0) == INTEGER_CST @@ -12715,9 +12757,10 @@ build_binary_op (location_t location, en /* Result of comparison is always int, but don't convert the args to int! */ build_type = integer_type_node; - if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE + if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == BITINT_TYPE || code0 == FIXED_POINT_TYPE || code0 == COMPLEX_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE + || code1 == BITINT_TYPE || code1 == FIXED_POINT_TYPE || code1 == COMPLEX_TYPE)) short_compare = 1; else if (code0 == POINTER_TYPE @@ -12778,12 +12821,14 @@ build_binary_op (location_t location, en (build_qualified_type (void_type_node, qual)); } } - else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) + else if (code0 == POINTER_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { result_type = type0; pedwarn (location, 0, "comparison between pointer and integer"); } - else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) + else if ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && code1 == POINTER_TYPE) { result_type = type1; pedwarn (location, 0, "comparison between pointer and integer"); @@ -12871,9 +12916,9 @@ build_binary_op (location_t location, en } build_type = integer_type_node; if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE - || code0 == FIXED_POINT_TYPE) + || code0 == BITINT_TYPE || code0 == FIXED_POINT_TYPE) && (code1 == INTEGER_TYPE || code1 == REAL_TYPE - || code1 == FIXED_POINT_TYPE)) + || code1 == BITINT_TYPE || code1 == FIXED_POINT_TYPE)) short_compare = 1; else if (code0 == POINTER_TYPE && code1 == POINTER_TYPE) { @@ -12932,12 +12977,14 @@ build_binary_op (location_t location, en warning_at (location, OPT_Wextra, "ordered comparison of pointer with integer zero"); } - else if (code0 == POINTER_TYPE && code1 == INTEGER_TYPE) + else if (code0 == POINTER_TYPE + && (code1 == INTEGER_TYPE || code1 == BITINT_TYPE)) { result_type = type0; pedwarn (location, 0, "comparison between pointer and integer"); } - else if (code0 == INTEGER_TYPE && code1 == POINTER_TYPE) + else if ((code0 == INTEGER_TYPE || code0 == BITINT_TYPE) + && code1 == POINTER_TYPE) { result_type = type1; pedwarn (location, 0, "comparison between pointer and integer"); @@ -12991,12 +13038,11 @@ build_binary_op (location_t location, en } if ((code0 == INTEGER_TYPE || code0 == REAL_TYPE || code0 == COMPLEX_TYPE - || code0 == FIXED_POINT_TYPE + || code0 == FIXED_POINT_TYPE || code0 == BITINT_TYPE || gnu_vector_type_p (type0)) - && - (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE - || code1 == FIXED_POINT_TYPE - || gnu_vector_type_p (type1))) + && (code1 == INTEGER_TYPE || code1 == REAL_TYPE || code1 == COMPLEX_TYPE + || code1 == FIXED_POINT_TYPE || code1 == BITINT_TYPE + || gnu_vector_type_p (type1))) { bool first_complex = (code0 == COMPLEX_TYPE); bool second_complex = (code1 == COMPLEX_TYPE); --- libcpp/expr.cc.jj 2023-08-08 15:54:35.666596337 +0200 +++ libcpp/expr.cc 2023-08-08 16:12:02.346939560 +0200 @@ -327,9 +327,9 @@ static unsigned int interpret_int_suffix (cpp_reader *pfile, const uchar *s, size_t len) { size_t orig_len = len; - size_t u, l, i, z; + size_t u, l, i, z, wb; - u = l = i = z = 0; + u = l = i = z = wb = 0; while (len--) switch (s[len]) @@ -343,11 +343,23 @@ interpret_int_suffix (cpp_reader *pfile, if (l == 2 && s[len] != s[len + 1]) return 0; break; + case 'b': + if (len == 0 || s[len - 1] != 'w') + return 0; + wb++; + len--; + break; + case 'B': + if (len == 0 || s[len - 1] != 'W') + return 0; + wb++; + len--; + break; default: return 0; } - if (l > 2 || u > 1 || i > 1 || z > 1) + if (l > 2 || u > 1 || i > 1 || z > 1 || wb > 1) return 0; if (z) @@ -358,6 +370,14 @@ interpret_int_suffix (cpp_reader *pfile, return 0; } + if (wb) + { + if (CPP_OPTION (pfile, cplusplus)) + return 0; + if (l > 0 || i > 0 || z > 0) + return 0; + } + if (i) { if (!CPP_OPTION (pfile, ext_numeric_literals)) @@ -376,7 +396,8 @@ interpret_int_suffix (cpp_reader *pfile, | (u ? CPP_N_UNSIGNED : 0) | ((l == 0) ? CPP_N_SMALL : (l == 1) ? CPP_N_MEDIUM : CPP_N_LARGE) - | (z ? CPP_N_SIZE_T : 0)); + | (z ? CPP_N_SIZE_T : 0) + | (wb ? CPP_N_BITINT : 0)); } /* Return the classification flags for an int suffix. */ --- libcpp/include/cpplib.h.jj 2023-08-08 15:54:35.691595987 +0200 +++ libcpp/include/cpplib.h 2023-08-08 16:12:02.346939560 +0200 @@ -1284,6 +1284,7 @@ struct cpp_num #define CPP_N_SIZE_T 0x2000000 /* C++23 size_t literal. */ #define CPP_N_BFLOAT16 0x4000000 /* std::bfloat16_t type. */ +#define CPP_N_BITINT 0x8000000 /* C2X _BitInt literal. */ #define CPP_N_WIDTH_FLOATN_NX 0xF0000000 /* _FloatN / _FloatNx value of N, divided by 16. */ From patchwork Wed Aug 9 18:26:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2993736vqr; Wed, 9 Aug 2023 11:27:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzY+SYRbH01xN77NoygvanbfGaXo2uFc46dg4S+mTSwZ8n2TcuR97Sej3TtHJe6iJHZNWM X-Received: by 2002:adf:d4c6:0:b0:317:67bf:3376 with SMTP id w6-20020adfd4c6000000b0031767bf3376mr143906wrk.57.1691605647289; Wed, 09 Aug 2023 11:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605647; cv=none; d=google.com; s=arc-20160816; b=ud2dV3LnwlebZwOAr75Ps5k4bDwfTfJJMtbH3YPGscPQHbKcy4kdHjftGFSGShVrn0 5TATGNVakpOGQ8ChsDhKjaNHKTbiExsrr/ebwr6j4uJlziTpKVBm/ao8tWaDxA+mi8w7 CPUtg1atugIs6+IXNaE/bi0Mxl7TgrKVFrJvxvLF6KVQnRqKS92Owqw3PNhCKv5fTepY KxkLNneqiKjtUNV+9a9sikCR7Soo3xLYu4GvwhEJ5ea2Jpz3013yN2vC7zHBjBiHBJmt vzI/qvJp5RWRmWf9FRe5dBjuvT+xRB4+6BN6ccj4t4BSNGxhily4NHidh3bgNfT0HleY DlNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=nwoO7aasl2RY5xpJMfrL897bxJsMad4i/kCKwudaGCQ=; fh=7ssu/fi36bU4aQaYzNG+jm0+RaedZIlpx6vlii65CBI=; b=jjnVNZ0kkSmevfDqai4mqB/eD7IC8p5BKQHTeSExBu1BX+xYVmd7VOewwKCgb6nzaa F8LxkAM6+GJj7e+Ea3zAvwBhYf3v+eJC8S2/yyoe2EwyuY33w0V9KTcZlGFLkAXyH9kb dLIyf4WsTbOYiT1bRHH6drXfrvFlRs0Ps51ND+kvCwbYzqfacTGmty6+0uCdWf/miAhm +HjnTMJvc3o8+xdnYCOygcR4+Oe/Q41kpAPqEVP5Z+MhqH4ekP8thlY9vtxDOtmDaoZS cfZLMQ/+KESQwEm2+4fzcoAllmjfkWKgDNg6i+Qr5AHoyx0dqo0FeXIcDODoUyXL+Nsp wahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=s3vB5GIU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b11-20020aa7cd0b000000b0052290105ca7si8201340edw.653.2023.08.09.11.27.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=s3vB5GIU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDDA53858032 for ; Wed, 9 Aug 2023 18:27:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CDDA53858032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605645; bh=nwoO7aasl2RY5xpJMfrL897bxJsMad4i/kCKwudaGCQ=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=s3vB5GIUQd00Jkr8WEV0CdD5nVLdvJIqI8a6CkvH2y0GMll2RomEWOX0vHm6/p57e dv6zV8Abu/Pc+M42WLBMyVRVLSOOKwm9EmXzjKjNLQl8A+WnIxTinL3wukvXj/O7wJ ZFApwFbMBgdPhxqvl+yeclsqWo1jHeuAjqM8d1Yg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E24EE3857706 for ; Wed, 9 Aug 2023 18:26:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E24EE3857706 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-62-eY--yAFQNOWqg9k-ApAoCQ-1; Wed, 09 Aug 2023 14:26:17 -0400 X-MC-Unique: eY--yAFQNOWqg9k-ApAoCQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E7EA085CBE2; Wed, 9 Aug 2023 18:26:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 23AC22166B25; Wed, 9 Aug 2023 18:26:16 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IQDmb2043021 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:26:13 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IQCR42043020; Wed, 9 Aug 2023 20:26:12 +0200 Date: Wed, 9 Aug 2023 20:26:12 +0200 To: "Joseph S. Myers" , Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 11/12] testsuite part 1 for _BitInt support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_LOTSOFHASH, PDS_BTC_ID, PDS_BTC_MSGID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773777083145730633 X-GMAIL-MSGID: 1773777083145730633 Hi! This patch adds first part of the testsuite support. When creating the testcases, I've been using https://defuse.ca/big-number-calculator.htm tool, a randombitint tool I wrote (posted as a reply to the first series) plus LLVM trunk on godbolt and the WIP GCC support checking if both compilers agree on stuff (and in case of differences tried constant evaluation etc.). The whole testsuite has been also tested with make -j32 -k check-gcc GCC_TEST_RUN_EXPENSIVE=1 \ RUNTESTFLAGS='GCC_TEST_RUN_EXPENSIVE=1 --target_board=unix\{-m32,-m64\} ubsan.exp=bitint*.c dg.exp=bitint* dg-torture.exp=bitint*' to verify it in all modes, normally I'm limitting the torture tests to just -O0 and -O2 because they are quite large and expensive. Generally it is needed to test different _BitInt precisions because they are lowered differently (the small vs. medium vs. large vs. huge, precision of multiples of limb precision or some other etc.). 2023-08-09 Jakub Jelinek PR c/102989 gcc/testsuite/ * lib/target-supports.exp (check_effective_target_bitint, check_effective_target_bitint128, check_effective_target_bitint575): New effective targets. * gcc.dg/bitint-1.c: New test. * gcc.dg/bitint-2.c: New test. * gcc.dg/bitint-3.c: New test. * gcc.dg/bitint-4.c: New test. * gcc.dg/bitint-5.c: New test. * gcc.dg/bitint-6.c: New test. * gcc.dg/bitint-7.c: New test. * gcc.dg/bitint-8.c: New test. * gcc.dg/bitint-9.c: New test. * gcc.dg/bitint-10.c: New test. * gcc.dg/bitint-11.c: New test. * gcc.dg/bitint-12.c: New test. * gcc.dg/bitint-13.c: New test. * gcc.dg/bitint-14.c: New test. * gcc.dg/bitint-15.c: New test. * gcc.dg/bitint-16.c: New test. * gcc.dg/bitint-17.c: New test. * gcc.dg/bitint-18.c: New test. * gcc.dg/torture/bitint-1.c: New test. * gcc.dg/torture/bitint-2.c: New test. * gcc.dg/torture/bitint-3.c: New test. * gcc.dg/torture/bitint-4.c: New test. * gcc.dg/torture/bitint-5.c: New test. * gcc.dg/torture/bitint-6.c: New test. * gcc.dg/torture/bitint-7.c: New test. * gcc.dg/torture/bitint-8.c: New test. * gcc.dg/torture/bitint-9.c: New test. * gcc.dg/torture/bitint-10.c: New test. * gcc.dg/torture/bitint-11.c: New test. * gcc.dg/torture/bitint-12.c: New test. * gcc.dg/torture/bitint-13.c: New test. * gcc.dg/torture/bitint-14.c: New test. * gcc.dg/torture/bitint-15.c: New test. * gcc.dg/torture/bitint-16.c: New test. * gcc.dg/torture/bitint-17.c: New test. * gcc.dg/torture/bitint-18.c: New test. * gcc.dg/torture/bitint-19.c: New test. Jakub --- gcc/testsuite/lib/target-supports.exp.jj 2023-08-08 15:55:09.381124195 +0200 +++ gcc/testsuite/lib/target-supports.exp 2023-08-08 16:12:02.339939658 +0200 @@ -3581,6 +3581,33 @@ proc check_effective_target_fixed_point }] } +# Return 1 if the target supports _BitInt(N), 0 otherwise. + +proc check_effective_target_bitint { } { + return [check_no_compiler_messages bitint object { + _BitInt (2) a = 1wb; + unsigned _BitInt (__BITINT_MAXWIDTH__) b = 0uwb; + } "-std=c2x"] +} + +# Return 1 if the target supports _BitInt(128), 0 otherwise. + +proc check_effective_target_bitint128 { } { + return [check_no_compiler_messages bitint128 object { + _BitInt (2) a = 1wb; + unsigned _BitInt (128) b = 0uwb; + } "-std=c2x"] +} + +# Return 1 if the target supports _BitInt(575), 0 otherwise. + +proc check_effective_target_bitint575 { } { + return [check_no_compiler_messages bitint575 object { + _BitInt (2) a = 1wb; + unsigned _BitInt (575) b = 0uwb; + } "-std=c2x"] +} + # Return 1 if the target supports compiling decimal floating point, # 0 otherwise. --- gcc/testsuite/gcc.dg/bitint-1.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-1.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,26 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x" } */ + +void +foo (int x) +{ + _BitInt (1) a; /* { dg-error "'signed _BitInt' argument must be at least 2" } */ + signed _BitInt (1) b; /* { dg-error "'signed _BitInt' argument must be at least 2" } */ + _BitInt (0) c; /* { dg-error "'_BitInt' argument '0' is not positive integer constant expression" } */ + unsigned _BitInt (0) d; /* { dg-error "'_BitInt' argument '0' is not positive integer constant expression" } */ + _BitInt (-42) e; /* { dg-error "'_BitInt' argument '-42' is not positive integer constant expression" } */ + _BitInt (-5) unsigned f; /* { dg-error "'_BitInt' argument '-5' is not positive integer constant expression" } */ + _BitInt (4294967295ULL) g; /* { dg-error "'_BitInt' argument '4294967295' is larger than 'BITINT_MAXWIDTH' '\[0-9]+'" } */ + long _BitInt (42) h; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */ + long long _BitInt (42) i; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */ + _BitInt (42) long j; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */ + _BitInt (42) long long k; /* { dg-error "both 'long' and '_BitInt' in declaration specifiers" } */ + short _BitInt (42) l; /* { dg-error "both 'short' and '_BitInt' in declaration specifiers" } */ + _BitInt (42) short m; /* { dg-error "both 'short' and '_BitInt' in declaration specifiers" } */ + _Complex _BitInt (42) n; /* { dg-error "both 'complex' and '_BitInt' in declaration specifiers" } */ + _BitInt (42) _Complex o; /* { dg-error "both 'complex' and '_BitInt' in declaration specifiers" } */ + int _BitInt (42) p; /* { dg-error "two or more data types in declaration specifiers" } */ + _BitInt (42) int q; /* { dg-error "two or more data types in declaration specifiers" } */ + _BitInt (x) r; /* { dg-error "'_BitInt' argument is not an integer constant expression" } */ +} --- gcc/testsuite/gcc.dg/bitint-2.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-2.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,116 @@ +/* PR c/102989 */ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +#define expr_has_type(e, t) _Generic (e, default : 0, t : 1) + +#ifdef __BITINT_MAXWIDTH__ +void +foo (void) +{ + _BitInt(42) a = (_BitInt(42)) 1; + _BitInt(42) unsigned b = (unsigned _BitInt(42)) 2; + _BitInt(5) c = (_BitInt(5)) 3; + _BitInt(5) unsigned d = (unsigned _BitInt(5)) 4; + _BitInt(32) e = (_BitInt(32)) 5; + _BitInt(32) unsigned f = (unsigned _BitInt(32)) 6; + static_assert (expr_has_type (a, signed _BitInt(42)), ""); + static_assert (expr_has_type (a, _BitInt(42)), ""); + static_assert (!expr_has_type (a, unsigned _BitInt(42)), ""); + static_assert (!expr_has_type (b, signed _BitInt(42)), ""); + static_assert (!expr_has_type (b, _BitInt(42)), ""); + static_assert (expr_has_type (b, unsigned _BitInt(42)), ""); + static_assert (expr_has_type (a + b, unsigned _BitInt(42)), ""); + static_assert (expr_has_type (a * b, unsigned _BitInt(42)), ""); + static_assert (expr_has_type (a - b, unsigned _BitInt(42)), ""); + static_assert (expr_has_type (a * a, _BitInt(42)), ""); + static_assert (expr_has_type (a / b, unsigned _BitInt(42)), ""); + static_assert (expr_has_type (c, signed _BitInt(5)), ""); + static_assert (expr_has_type (c, _BitInt(5)), ""); + static_assert (!expr_has_type (c, unsigned _BitInt(5)), ""); + static_assert (!expr_has_type (d, signed _BitInt(5)), ""); + static_assert (!expr_has_type (d, _BitInt(5)), ""); + static_assert (expr_has_type (d, unsigned _BitInt(5)), ""); + static_assert (expr_has_type (c + d, unsigned _BitInt(5)), ""); + static_assert (expr_has_type (c * d, unsigned _BitInt(5)), ""); + static_assert (expr_has_type (c - d, unsigned _BitInt(5)), ""); + static_assert (expr_has_type (c * c, _BitInt(5)), ""); + static_assert (expr_has_type (c / d, unsigned _BitInt(5)), ""); + static_assert (expr_has_type (e, signed _BitInt(32)), ""); + static_assert (expr_has_type (e, _BitInt(32)), ""); + static_assert (!expr_has_type (e, unsigned _BitInt(32)), ""); + static_assert (!expr_has_type (f, signed _BitInt(32)), ""); + static_assert (!expr_has_type (f, _BitInt(32)), ""); + static_assert (expr_has_type (f, unsigned _BitInt(32)), ""); + static_assert (expr_has_type (e + f, unsigned _BitInt(32)), ""); + static_assert (expr_has_type (e * f, unsigned _BitInt(32)), ""); + static_assert (expr_has_type (e - f, unsigned _BitInt(32)), ""); + static_assert (expr_has_type (e * e, _BitInt(32)), ""); + static_assert (expr_has_type (e / f, unsigned _BitInt(32)), ""); +#if __CHAR_BIT__ * __SIZEOF_INT__ == 32 + static_assert (expr_has_type (e + 1, int), ""); + static_assert (expr_has_type (f + 1, unsigned int), ""); + static_assert (expr_has_type (e + 1U, unsigned int), ""); + static_assert (expr_has_type (f + 1U, unsigned int), ""); + static_assert (expr_has_type (1 - e, int), ""); + static_assert (expr_has_type (1 - f, unsigned int), ""); + static_assert (expr_has_type (1U * e, unsigned int), ""); + static_assert (expr_has_type (1U / f, unsigned int), ""); +#endif + static_assert (expr_has_type (0wb, _BitInt(2)), ""); + static_assert (expr_has_type (-1WB, _BitInt(2)), ""); + static_assert (expr_has_type (-1wb - 1wb, _BitInt(2)), ""); + static_assert (expr_has_type (1wb, _BitInt(2)), ""); + static_assert (expr_has_type (2wb, _BitInt(3)), ""); + static_assert (expr_has_type (0wbu, unsigned _BitInt(1)), ""); + static_assert (expr_has_type (-1UWB, unsigned _BitInt(1)), ""); + static_assert (expr_has_type (1uWB, unsigned _BitInt(1)), ""); + static_assert (expr_has_type (2Uwb, unsigned _BitInt(2)), ""); + static_assert (0wb == 0, ""); + static_assert (-1wb == -1, ""); + static_assert (0xffffffffwb == 4294967295wb, ""); + static_assert (0xffffffffwb == 000000000000000000000000000037777777777wb, ""); + static_assert (0x0000000000000000000000000ffffffffwb == 0b00011111111111111111111111111111111wb, ""); +#if __BITINT_MAXWIDTH__ >= 128 + static_assert (expr_has_type (0xffffffffffffffffffffffffffffffffuwb, unsigned _BitInt(128)), ""); + static_assert (0xffffffffffffffffffffffffffffffffuwb == 340282366920938463463374607431768211455uwb, ""); + static_assert (200000000000000000000000000000000000000wb == 0x96769950b50d88f41314448000000000WB, ""); + static_assert (02263551452055206610750114242110000000000000wb == 200000000000000000000000000000000000000wb, ""); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static_assert (expr_has_type (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567UWB, unsigned _BitInt(575)), ""); + static_assert (expr_has_type (0x00000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwbu, unsigned _BitInt(575)), ""); + static_assert (expr_has_type (0377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777uwb, unsigned _BitInt(575)), ""); + static_assert (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb == 0x00000007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwbu, ""); + static_assert (0377777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777WBU == 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffuWB, ""); + static_assert (100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb == 0X67815961'0903F797'4A7CB3F2'2F01FA5D'9A2CD603'9DE4A7A6'0F713676'CE7D7113'FF1A499D'9BFD0FDC'D2999652'EB4C7F39'8DE2A000'00000000'00000000'00000000'00000000'00000000UWB, ""); + static_assert (expr_has_type (-61'832600368'276133515'125630254'911797508'782837275'302959978'515764023'224306276'632966792'579100265'310761247'399417856'504034834'837841258'576687802'491886538'775473291'979151693'037174783wb, _BitInt(575)), ""); + static_assert (expr_has_type (0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwb, signed _BitInt(575)), ""); + static_assert (expr_has_type (0177777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777wb, _BitInt(575)), ""); + static_assert (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783WB == -0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwb, ""); + static_assert (0177777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777wb / 2wb * 2wb + 1wb == 0x3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffwb, ""); +#endif +#if (0wb != 0) || (0wbU != 0U) || (1wb != 1) || (1uWB != 1u) \ + || (-1wb >= 0) || (-1UWB < 0) || (4294967295uwb != 4294967295U) \ + || 18446744073709551615wbu != 18446744073709551615ULL +#error "" +#endif +} + +void +bar (void) +{ + _BitInt(2) a = (_BitInt(2)) 1; + unsigned _BitInt(1) b = 1uwb; + _BitInt(4) c; + c = 7; + _BitInt(2) d = 1; + _BitInt(5) e = 2wb; + unsigned _BitInt(6) f = 3uwb; +} +#endif + +int +main () +{ +} --- gcc/testsuite/gcc.dg/bitint-3.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-3.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,40 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +_BitInt(32) a, b = 2147483647wb; +_BitInt(64) c, d = 9223372036854775807wb; +struct S { + _BitInt(2) a; + _BitInt(6) b; +} s, t = { -1wb - 1wb, 31wb }; + +void +foo (void) +{ + a = b; + c = d; + s.a = t.a; + s.b = t.b; +} + +void +bar (void) +{ + a += b; + c += d; + s.a += t.a; + s.b += t.b; +} + +#if __BITINT_MAXWIDTH__ >= 128 +unsigned _BitInt(128) e = 340282366920938463463374607431768211455uwb; +_BitInt(128) f = 20000000000000000000000000000000000000wb; +_BitInt(128) g = -20000000000000000000000000000000000000wb; +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +unsigned _BitInt(575) h = 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb; +_BitInt(575) i = 2000000000000000000000000000000000000000000wb; +_BitInt(575) j = -2000000000000000000000000000000000000000000wb; +#endif --- gcc/testsuite/gcc.dg/bitint-4.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-4.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,39 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +_BitInt(2) +foo (_BitInt(2) x, _BitInt(15) y) +{ + return x + y; +} + +_BitInt(64) +bar (_BitInt(64) x, _BitInt(64) y) +{ + return x + y; +} + +#if __BITINT_MAXWIDTH__ >= 128 +_BitInt(128) a, b, c; + +_BitInt(128) +baz (_BitInt(128) x, _BitInt(128) y) +{ + a = x; + b = y; + return c; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +_BitInt(575) d, e, f; + +_BitInt(575) +qux (_BitInt(575) x, _BitInt(575) y) +{ + d = x; + e = y; + return f; +} +#endif --- gcc/testsuite/gcc.dg/bitint-5.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-5.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,63 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +#include +#include + +#if __BITINT_MAXWIDTH__ >= 128 +unsigned _BitInt(128) b, c; +#endif +#if __BITINT_MAXWIDTH__ >= 575 +signed _BitInt(575) d, e; +#endif + +void +foo (int a, ...) +{ + va_list ap; + va_start (ap, a); + if (a == 1) + { + if (va_arg (ap, _BitInt(2)) != 1wb) + abort (); + if (va_arg (ap, _BitInt(3)) != 3wb) + abort (); + if (va_arg (ap, _BitInt(15)) != 16383wb) + abort (); + if (va_arg (ap, unsigned _BitInt(32)) != 4294967295uwb) + abort (); + if (va_arg (ap, _BitInt(64)) != 0x7fffffffffffffffwb) + abort (); + } +#if __BITINT_MAXWIDTH__ >= 128 + b = va_arg (ap, unsigned _BitInt(128)); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + d = va_arg (ap, _BitInt(575)); +#endif + if (va_arg (ap, int) != 42) + abort (); + va_end (ap); +} + +void +bar (void) +{ + foo (1, 1wb, 3wb, 16383wb, 4294967295uwb, 9223372036854775807wb, +#if __BITINT_MAXWIDTH__ >= 128 + c, +#endif +#if __BITINT_MAXWIDTH__ >= 575 + e, +#endif + 42); + foo (2, +#if __BITINT_MAXWIDTH__ >= 128 + c, +#endif +#if __BITINT_MAXWIDTH__ >= 575 + e, +#endif + 42); +} --- gcc/testsuite/gcc.dg/bitint-6.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-6.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,15 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +int *q, *r, *s; + +void +foo (int *p) +{ + p[4wb] = 0; + 6wb[p] = 0; + q = p + 8wb; + r = 10uwb + q; + s = r - 2wb; +} --- gcc/testsuite/gcc.dg/bitint-7.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-7.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,16 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 257 +void +foo (_BitInt(135) *p, _BitInt(193) *q, _BitInt(257) *r) +{ + r[0] = (((p[0] + p[1] + p[2]) + q[0] + (p[3] + p[4] + p[5])) + q[1]) + r[1] + (((p[6] + p[7] + p[8]) + q[2] + (p[9] + p[10] + p[11])) + q[3]) + r[2]; +} +#else +void +foo (void) +{ +} +#endif --- gcc/testsuite/gcc.dg/bitint-8.c.jj 2023-08-08 16:12:02.339939658 +0200 +++ gcc/testsuite/gcc.dg/bitint-8.c 2023-08-08 16:12:02.339939658 +0200 @@ -0,0 +1,34 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=c2x -Wno-uninitialized" } */ + +#if __BITINT_MAXWIDTH__ >= 135 +_BitInt(135) +foo (void) +{ + _BitInt(135) d; + _BitInt(135) e = d + 2wb; + return e; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +_BitInt(575) +bar (void) +{ + _BitInt(575) d; + _BitInt(575) e = d * 42wb; + return e; +} + +_BitInt(575) +baz (int x) +{ + _BitInt(575) d; + if (x) + return 59843758943759843574wb; + return d; +} +#endif + +int x; --- gcc/testsuite/gcc.dg/bitint-9.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-9.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,52 @@ +/* PR c/102989 */ +/* { dg-do compile { target { bitint && exceptions } } } */ +/* { dg-options "-O2 -std=gnu2x -fnon-call-exceptions -fexceptions" } */ + +__attribute__((noipa)) void +baz (int *p) +{ +} + +#if __BITINT_MAXWIDTH__ >= 575 +void +foo (volatile _BitInt(575) *p, _BitInt(575) q) +{ + int a __attribute__((cleanup (baz))) = 1; + *p = q; +} + +_BitInt(575) +bar (volatile _BitInt(575) *p) +{ + int a __attribute__((cleanup (baz))) = 1; + return *p; +} + +_BitInt(575) +qux (long double l) +{ + int a __attribute__((cleanup (baz))) = 1; + return l; +} + +long double +corge (_BitInt(575) b) +{ + int a __attribute__((cleanup (baz))) = 1; + return b; +} + +_BitInt(575) +garply (_BitInt(575) x, _BitInt(575) y) +{ + int a __attribute__((cleanup (baz))) = 1; + return x / y; +} + +_BitInt(575) +waldo (_BitInt(575) x, _BitInt(575) y) +{ + int a __attribute__((cleanup (baz))) = 1; + return x % y; +} +#endif --- gcc/testsuite/gcc.dg/bitint-10.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-10.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,15 @@ +/* PR c/102989 */ +/* { dg-do compile { target { bitint && dfp } } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 129 +void +foo (_BitInt(129) *x, _Decimal64 *y) +{ + x[0] = y[0]; + y[1] = x[1]; +} +#endif + +/* _Decimal* <-> _BitInt conversions are unsupported for now. */ +/* { dg-prune-output "unsupported conversion between" } */ --- gcc/testsuite/gcc.dg/bitint-11.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-11.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,9 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +int +foo (_BitInt(127) x, _BitInt(127) y) +{ + return x < y; +} --- gcc/testsuite/gcc.dg/bitint-12.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-12.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,31 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=gnu2x -w" } */ + +_BitInt(37) +foo (_BitInt(37) x, _BitInt(37) y) +{ + _BitInt(37) w; + __asm ("# %0 %1 %2 %3" : "=r" (w) : "r" (x), "r" (x + y), "g" (68719476735wb)); + return w; +} + +#if __BITINT_MAXWIDTH__ >= 125 +_BitInt(125) +bar (_BitInt(125) x, _BitInt(125) y) +{ + _BitInt(125) w; + __asm ("# %0 %1 %2 %3" : "=g" (w) : "g" (x), "g" (x + y), "g" (21267647932558653966460912964485513215wb)); + return w; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +_BitInt(575) +baz (_BitInt(575) x, _BitInt(575) y) +{ + _BitInt(575) w; + __asm ("# %0 %1 %2 %3" : "=g" (w) : "g" (x), "g" (x + y), "g" (61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb)); + return w; +} +#endif --- gcc/testsuite/gcc.dg/bitint-13.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-13.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,17 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 315 +_Bool +foo (_BitInt (315) a, _BitInt (315) b, unsigned *c) +{ + if (a < -8 || a > 7) + __builtin_unreachable (); + if (b < 0 || b > 63) + __builtin_unreachable (); + return __builtin_add_overflow (a, b, c); +} +#else +int i; +#endif --- gcc/testsuite/gcc.dg/bitint-14.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-14.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,11 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint575 } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +enum A : _BitInt(15) { A0 = 0, A1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */ +enum B : unsigned _BitInt(575) { B0 = 0, B1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */ +enum C { C0 = 459875743wb, C1 = 3298437354uwb }; +enum D { D0 = 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb, D1 }; +/* { dg-error "enumerator value outside the range of 'intmax_t'" "" { target *-*-* } .-1 } */ +/* { dg-error "overflow in enumeration values" "" { target *-*-* } .-2 } */ +/* { dg-error "enumeration values exceed range of largest integer" "" { target *-*-* } .-3 } */ --- gcc/testsuite/gcc.dg/bitint-15.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/bitint-15.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,10 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint575 } } */ +/* { dg-options "-std=gnu2x" } */ + +enum A : _BitInt(15) { A0 = 0, A1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */ +enum B : unsigned _BitInt(575) { B0 = 0, B1 = 1 }; /* { dg-error "invalid 'enum' underlying type" } */ +enum C { C0 = 459875743wb, C1 = 3298437354uwb }; +enum D { D0 = 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb, D1 }; +/* { dg-error "overflow in enumeration values" "" { target *-*-* } .-1 } */ +/* { dg-warning "enumeration values exceed range of largest integer" "" { target *-*-* } .-2 } */ --- gcc/testsuite/gcc.dg/bitint-16.c.jj 2023-08-08 16:18:44.828303852 +0200 +++ gcc/testsuite/gcc.dg/bitint-16.c 2023-08-08 16:18:44.828303852 +0200 @@ -0,0 +1,31 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +_BitInt(15) a; +_BitInt(42) b; +#if __BITINT_MAXWIDTH__ >= 115 +_BitInt(115) c; +#endif +#if __BITINT_MAXWIDTH__ >= 192 +_BitInt(192) d; +#endif +#if __BITINT_MAXWIDTH__ >= 575 +_BitInt(575) e; +#endif + +int +main () +{ + __builtin_clear_padding (&a); + __builtin_clear_padding (&b); +#if __BITINT_MAXWIDTH__ >= 115 + __builtin_clear_padding (&c); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + __builtin_clear_padding (&d); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + __builtin_clear_padding (&e); +#endif +} --- gcc/testsuite/gcc.dg/bitint-17.c.jj 2023-08-08 16:15:41.008877766 +0200 +++ gcc/testsuite/gcc.dg/bitint-17.c 2023-08-08 16:15:41.008877766 +0200 @@ -0,0 +1,47 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#define expr_has_type(e, t) _Generic (e, default : 0, t : 1) + +struct S1 { char x; char : 0; char y; }; +struct S2 { char x; int : 0; char y; }; +#if __BITINT_MAXWIDTH__ >= 575 +struct S3 { char x; _BitInt(575) : 0; char y; }; +#endif +#if __BITINT_MAXWIDTH__ >= 389 +struct S4 { char x; _BitInt(195) a : 63; _BitInt(282) b : 280; _BitInt(389) c : 23; _BitInt(2) d : 1; char y; }; +#endif +#if __BITINT_MAXWIDTH__ >= 192 +struct S5 { char x; _BitInt(192) a : 191; unsigned _BitInt(192) b : 190; _BitInt(192) c : 189; char y; }; +#endif +struct S6 { _BitInt(2) a : 1; }; +#if __BITINT_MAXWIDTH__ >= 389 +struct S4 s4; +static_assert (expr_has_type (s4.a + 1uwb, _BitInt(195))); +static_assert (expr_has_type (s4.b + 1uwb, _BitInt(282))); +static_assert (expr_has_type (s4.c + 1uwb, _BitInt(389))); +static_assert (expr_has_type (s4.d * 0wb, _BitInt(2))); +#endif +#if __BITINT_MAXWIDTH__ >= 192 +struct S5 s5; +static_assert (expr_has_type (s5.a + 1uwb, _BitInt(192))); +static_assert (expr_has_type (s5.b + 1wb, unsigned _BitInt(192))); +static_assert (expr_has_type (s5.c + 1uwb, _BitInt(192))); +#endif +struct S6 s6; +static_assert (expr_has_type (s6.a + 0wb, _BitInt(2))); +#if defined(__x86_64__) && __LP64__ && __BITINT_MAXWIDTH__ >= 575 +static_assert (sizeof (struct S1) == 2); +static_assert (sizeof (struct S2) == 5); +static_assert (sizeof (struct S3) == 9); +static_assert (sizeof (struct S4) == 48); +static_assert (sizeof (struct S5) == 88); +static_assert (sizeof (struct S6) == 1); +static_assert (alignof (struct S1) == 1); +static_assert (alignof (struct S2) == 1); +static_assert (alignof (struct S3) == 1); +static_assert (alignof (struct S4) == 8); +static_assert (alignof (struct S5) == 8); +static_assert (alignof (struct S6) == 1); +#endif --- gcc/testsuite/gcc.dg/bitint-18.c.jj 2023-08-08 16:19:29.103683889 +0200 +++ gcc/testsuite/gcc.dg/bitint-18.c 2023-08-08 16:19:29.103683889 +0200 @@ -0,0 +1,44 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +_Atomic _BitInt(15) a; +_Atomic(_BitInt(15)) b; +_Atomic _BitInt(115) c; +_Atomic _BitInt(192) d; +_Atomic _BitInt(575) e; +unsigned _BitInt(575) f; + +__attribute__((noipa)) _BitInt(575) +foo (_BitInt(575) x) +{ + return x; +} + +__attribute__((noipa)) int +bar (int x) +{ + return x; +} + +__attribute__((noipa)) _Atomic _BitInt(575) * +baz (_Atomic _BitInt(575) *x) +{ + return x; +} + +int +main () +{ + a += 1wb; + b -= 2wb; + c *= 3wb; + d /= 4wb; + e -= 5wb; + f = __atomic_fetch_add (&e, 54342985743985743985743895743834298574985734895743895734895wb, __ATOMIC_SEQ_CST); + f += __atomic_sub_fetch (&e, 13110356772307144130089534440127211568864891923061809853784155727841516341877716905506658630804426134644404380556711020290072702485839594283061059349912463486203837251238365wb, __ATOMIC_SEQ_CST); + f += __atomic_fetch_and (&e, -33740418462630594385361724744395454079240140931656245750192534103967695265126850678980088699287669565365078793986191778469857714756111026776864987769580622009237241167211461wb, __ATOMIC_RELAXED); + f += __atomic_xor_fetch (&e, 30799001892772360282132495459823194445423296347702377756575214695893559890977912003055702776548378201752339680602420936304294728688029412276600086349055079523071860836114234wb, __ATOMIC_SEQ_CST); + f += __atomic_fetch_or (baz (&e), foo (-6581969867283727911005990155704642154324773504588160884865628865547696324844988049982401783508268917375066790729408659617189350524019843499435572226770089390885472550659255wb), bar (__ATOMIC_RELAXED)); + f += __atomic_nand_fetch (&e, 55047840194947228224723671648125013926111290688378416557548660662319034233151051252215595447712248992759177463741832904590457754423713378627482465906620631734790561114905369wb, __ATOMIC_ACQ_REL); +} --- gcc/testsuite/gcc.dg/torture/bitint-1.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-1.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,114 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +__attribute__((noipa)) void +foo (_BitInt(6) a, _BitInt(27) b, _BitInt(6) *p, _BitInt(27) *q, float c) +{ + p[0] = b; + q[0] = a; + q[1] = (unsigned _BitInt(6)) a; + q[2] = (unsigned _BitInt(9)) a; + q[3] = c; + q[4] += a; + q[5] = a + b; + q[6] = a - b; + q[7] = a * b; + q[8] = a / b; + q[9] = a % b; + q[10] = b << (-20wb - a); + q[11] = (b * 131wb) >> (-20wb - a); + q[12]++; + ++q[13]; + q[14]--; + --q[15]; + q[16] = a == b; + q[17] = a != b; + q[18] = a > b; + q[19] = a < b; + q[20] = a >= b; + q[21] = a <= b; + q[22] = a && b; + q[23] = a || b; + q[24] = !a; + q[25] = a & b; + q[26] = a | b; + q[27] = a ^ b; + q[28] = ~a; + q[29] -= a; + q[30] *= b; + q[31] /= b; + q[32] %= a; + q[33] <<= b; + q[34] >>= b; + q[35] &= a; + q[36] |= b; + q[37] ^= a; + q[38] = sizeof (a); + q[39] = q[39] ? a : b; + q[40] = 12345wb; + switch (a) + { + case 31wb: + if (b != 8wb) + __builtin_abort (); + break; + case -18wb: + if (b != 9wb) + __builtin_abort (); + break; + case 26wb: + if (b != 12wb) + __builtin_abort (); + break; + case -25wb: + if (b != 6wb) + __builtin_abort (); + break; + case -19wb: + if (b != 15wb) + __builtin_abort (); + break; + default: + __builtin_abort (); + } +} + +int +main () +{ + _BitInt(6) p; + _BitInt(27) q[41]; + static _BitInt(27) qe[41] = { + -25wb, 39wb, 487wb, 17wb, -7wb, -19wb, -31wb, -150wb, -4wb, -1, + 192wb, 24wb, 8wb, 10wb, 10wb, 12wb, 0, 1wb, 0wb, 1, + 0, 1, 1, 1wbu, 0, 6wb, -25wb, -31wb, 24wb, 32wb, + -6wb, -2wb, 2uwb, 320wb, 192wb, 7wb, 30wb, -30wb, 1, -25wb, + 12345wb + }; + q[4] = 18wb; + q[12] = 7wb; + q[13] = 9wb; + q[14] = 11wb; + q[15] = 13wb; + q[29] = 7wb; + q[30] = -1wb; + q[31] = -13wb; + q[32] = 52wb; + q[33] = 5wb; + q[34] = 12345wb; + q[35] = 15wb; + q[36] = 28wb; + q[37] = 5wb; + q[39] = 2wb; + foo (-25wb, 6wb, &p, q, 17.0f); + if (p != 6wb) + __builtin_abort (); + q[38] -= sizeof (p) - 1; + for (int i = 0; i < 41; ++i) + if (q[i] != qe[i]) + __builtin_abort (); + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-2.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-2.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,118 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +__attribute__((noipa)) void +foo (unsigned _BitInt(25) a, unsigned _BitInt(27) b, unsigned _BitInt(25) *p, unsigned _BitInt(27) *q, float c) +{ + p[0] = b; + q[0] = a; + q[1] = (signed _BitInt(25)) a; + q[2] = (_BitInt(12)) a; + q[3] = c; + q[4] += a; + q[5] = a + b; + q[6] = a - b; + q[7] = a * b; + q[8] = a / b; + q[9] = a % b; + q[10] = b << (24320393uwb - a); + q[11] = (b * 131uwb) >> (24320393uwb - a); + q[12]++; + ++q[13]; + q[14]--; + --q[15]; + q[16] = a == b; + q[17] = a != b; + q[18] = a > b; + q[19] = a < b; + q[20] = a >= b; + q[21] = a <= b; + q[22] = a && b; + q[23] = a || b; + q[24] = !a; + q[25] = a & b; + q[26] = a | b; + q[27] = a ^ b; + q[28] = ~a; + q[29] -= a; + q[30] *= b; + q[31] /= b; + q[32] %= a; + q[33] <<= (125900uwb - b); + q[34] >>= (125901uwb - b); + q[35] &= a; + q[36] |= b; + q[37] ^= a; + q[38] = sizeof (a); + q[39] = q[39] ? a : b; + q[40] = 24196214uwb; + switch (a) + { + case 12345641uwb: + if (b != 1244wb) + __builtin_abort (); + break; + case 11821400uwb: + if (b != 133445uwb) + __builtin_abort (); + break; + case 12145uwb: + if (b != 1212uwb) + __builtin_abort (); + break; + case 24320389uwb: + if (b != 125897uwb) + __builtin_abort (); + break; + case 7128412uwb: + if (b != 150uwb) + __builtin_abort (); + break; + default: + __builtin_abort (); + } +} + +int +main () +{ + unsigned _BitInt(25) p; + unsigned _BitInt(27) q[41]; + static unsigned _BitInt(27) qe[41] = { + 24320389uwb, 124983685uwb, 134216069uwb, 42uwb, 24320407uwb, + 24446286uwb, 24194492uwb, 89202797uwb, 193uwb, 22268uwb, + 2014352uwb, 1030781uwb, 8uwb, 10uwb, 10uwb, + 12uwb, 0uwb, 1uwb, 1uwb, 0uwb, + 1uwb, 0uwb, 1uwb, 1uwb, 0uwb, + 67969uwb, 24378317uwb, 24310348uwb, 9234042uwb, 109897346uwb, + 125897uwb, 0uwb, 52uwb, 40uwb, 771uwb, + 5uwb, 125917uwb, 24320384uwb, 1uwb, 24320389uwb, + 24196214uwb + }; + q[4] = 18uwb; + q[12] = 7uwb; + q[13] = 9uwb; + q[14] = 11uwb; + q[15] = 13uwb; + q[29] = 7uwb; + q[30] = -1uwb; + q[31] = -13uwb; + q[32] = 52uwb; + q[33] = 5uwb; + q[34] = 12345uwb; + q[35] = 15uwb; + q[36] = 28uwb; + q[37] = 5uwb; + q[39] = 2uwb; + foo (24320389uwb, 125897uwb, &p, q, 42.0f); + if (p != 125897uwb) + __builtin_abort (); + q[38] -= sizeof (p) - 1; + for (int i = 0; i < 41; ++i) + if (q[i] != qe[i]) + __builtin_abort (); + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-3.c.jj 2023-08-08 16:12:02.340939644 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-3.c 2023-08-08 16:12:02.340939644 +0200 @@ -0,0 +1,134 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 128 +__attribute__((noipa)) void +foo (_BitInt(125) a, _BitInt(128) b, _BitInt(125) *p, _BitInt(128) *q, float c) +{ + p[0] = b; + q[0] = a; + q[1] = (unsigned _BitInt(125)) a; + q[2] = (unsigned _BitInt(68)) a; + q[3] = c; + q[4] += a; + q[5] = a + b; + q[6] = a - b; + q[7] = a * b; + q[8] = a / b; + q[9] = a % b; + q[10] = b << (-80694244678005661015504159217709wb - a); + q[11] = a >> (-80694244678005661015504159217709wb - a); + q[12]++; + ++q[13]; + q[14]--; + --q[15]; + q[16] = a == b; + q[17] = a != b; + q[18] = a > b; + q[19] = a < b; + q[20] = a >= b; + q[21] = a <= b; + q[22] = a && b; + q[23] = a || b; + q[24] = !a; + q[25] = a & b; + q[26] = a | b; + q[27] = a ^ b; + q[28] = ~a; + q[29] -= a; + q[30] *= b; + q[31] /= b; + q[32] %= a; + q[33] <<= (b - 468021wb); + q[34] >>= (b - 468021wb); + q[35] &= a; + q[36] |= b; + q[37] ^= a; + q[38] = sizeof (a); + q[39] = q[39] ? a : b; + q[40] = 80694244678005661015504159217732wb; + switch (a) + { + case 313298472398574896574578475487548wb: + if (b != 813298738947385454wb) + __builtin_abort (); + break; + case -18198347584784758927893783748374wb: + if (b != 9439847384738wb) + __builtin_abort (); + break; + case 261243875485748189278344574857484wb: + if (b != 12549857489574wb) + __builtin_abort (); + break; + case -80694244678005661015504159217733wb: + if (b != 468071wb) + __builtin_abort (); + break; + case -193984372895748547584754854wb: + if (b != 15549857489574wb) + __builtin_abort (); + break; + default: + __builtin_abort (); + } +} + +int +main () +{ + _BitInt(125) p; + _BitInt(128) q[41]; + static _BitInt(128) qe[41] = { + -80694244678005661015504159217733wb, 42535215170872629927260810424811808699wb, + 211591633426360068027wb, -42wb, + -80694244678005661015504143312912wb, -80694244678005661015504158749662wb, + -80694244678005661015504159685804wb, -37770635800678787757188047309203503043wb, + -172397445426026523786998466wb, -238647wb, + 7852928270336wb, -4809751789450982869595538wb, + 821095840985901334959wb, 13895798174897154898wb, + 1465897921835729857453wb, 154987847598437549873142wb, + 0, 1, 0, 1, 0, 1, 1, 1, 0, + 271395wb, -80694244678005661015504159021057wb, + -80694244678005661015504159292452wb, 80694244678005661015504159217732wb, + 80694244678240648474427914115297wb, -5822736520666880936123wb, + 9818355413803wb, 54398547589478975845wb, + 39390147499089156967386811811758080wb, 30486wb, + 5910462358441918751905wb, 1342984375894755194479wb, + -80694244535621434450947930710749wb, 1, -80694244678005661015504159217733wb, + 80694244678005661015504159217732wb + }; + q[4] = 15904821wb; + q[12] = 821095840985901334958wb; + q[13] = 13895798174897154897wb; + q[14] = 1465897921835729857454wb; + q[15] = 154987847598437549873143wb; + q[29] = 234987458923754897564wb; + q[30] = -12439857458947213wb; + q[31] = 4595687436894573685wb; + q[32] = 54398547589478975845wb; + q[33] = 34985478957495847545wb; + q[34] = 34324329847328473343wb; + q[35] = 5984758947589437584545wb; + q[36] = 1342984375894754857545wb; + q[37] = 159847589475894768597656wb; + q[39] = 394857584wb; + foo (-80694244678005661015504159217733wb, 468071wb, &p, q, -42.0f); + if (p != 468071wb) + __builtin_abort (); + q[38] -= sizeof (p) - 1; + for (int i = 0; i < 41; ++i) + if (q[i] != qe[i]) + __builtin_abort (); + return 0; +} +#else +int +main () +{ + return 0; +} +#endif --- gcc/testsuite/gcc.dg/torture/bitint-4.c.jj 2023-08-08 16:12:02.341939630 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-4.c 2023-08-08 16:12:02.341939630 +0200 @@ -0,0 +1,134 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 128 +__attribute__((noipa)) void +foo (unsigned _BitInt(125) a, unsigned _BitInt(127) b, unsigned _BitInt(125) *p, unsigned _BitInt(127) *q, float c) +{ + p[0] = b; + q[0] = a; + q[1] = (signed _BitInt(125)) a; + q[2] = (_BitInt(73)) a; + q[3] = c; + q[4] += a; + q[5] = a + b; + q[6] = a - b; + q[7] = a * b; + q[8] = a / b; + q[9] = a % b; + q[10] = b << (26105549790521884176764218952781428833uwb - a); + q[11] = (a * 131uwb) >> (26105549790521884176764218952781428833uwb - a); + q[12]++; + ++q[13]; + q[14]--; + --q[15]; + q[16] = a == b; + q[17] = a != b; + q[18] = a > b; + q[19] = a < b; + q[20] = a >= b; + q[21] = a <= b; + q[22] = a && b; + q[23] = a || b; + q[24] = !a; + q[25] = a & b; + q[26] = a | b; + q[27] = a ^ b; + q[28] = ~a; + q[29] -= a; + q[30] *= b; + q[31] /= b; + q[32] %= a; + q[33] <<= (12589712345465422uwb - b); + q[34] >>= (12589712345465417uwb - b); + q[35] &= a; + q[36] |= b; + q[37] ^= a; + q[38] = sizeof (a); + q[39] = q[39] ? a : b; + q[40] = 26105549790654675897348954738956342847uwb; + switch (a) + { + case 26105549790521884176764218952781428772uwb: + if (b != 1244154958745894754wb) + __builtin_abort (); + break; + case 11821400154985748973289734545487uwb: + if (b != 133445145984759847584574uwb) + __builtin_abort (); + break; + case 12145uwb: + if (b != 12121243985745894732uwb) + __builtin_abort (); + break; + case 26105549790521884176764218952781428771uwb: + if (b != 12589712345465342uwb) + __builtin_abort (); + break; + case 71284121548547895457123873874452345uwb: + if (b != 150123439857459847uwb) + __builtin_abort (); + break; + default: + __builtin_abort (); + } +} + +int +main () +{ + unsigned _BitInt(125) p; + unsigned _BitInt(127) q[41]; + static unsigned _BitInt(127) qe[41] = { + 26105549790521884176764218952781428771uwb, 153711437385873807975529696739694508067uwb, + 2816339038065666848803uwb, 97uwb, + 26105549790521884178598517527767103757uwb, 26105549790521884176776808665126894113uwb, + 26105549790521884176751629240435963429uwb, 49552990805035300718174502183957321146uwb, + 2073562054015060870989uwb, 8076837748665533uwb, + 58059800399605194176279512422023168uwb, 3687014528101034113uwb, + 7439587439856743895438uwb, 95435435436uwb, + 112349587439856746858975446545uwb, 13145398574895748967847348972322uwb, + 0, 1, 1, 0, 1, 0, 1, 1, 0, + 3439290896351266uwb, 26105549790521884176773369374230542847uwb, + 26105549790521884176769930083334191581uwb, 16429746074595423756157606976189597660uwb, + 144035633670022787123399980532060335632uwb, 63332113050644322882197117954233460326uwb, + 27442uwb, 3245984754897548957498574895745uwb, + 14236875428959659760604435112230125568uwb, 326775104184uwb, + 1170981383577634uwb, 2843243404090270511102uwb, + 26313477358277918295486482038303331024uwb, 1, 26105549790521884176764218952781428771uwb, + 26105549790654675897348954738956342847uwb + }; + q[4] = 1834298574985674986uwb; + q[12] = 7439587439856743895437uwb; + q[13] = 95435435435uwb; + q[14] = 112349587439856746858975446546uwb; + q[15] = 13145398574895748967847348972323uwb; + q[29] = 75439568476895768957658675uwb; + q[30] = 455984375894754983574895745485uwb; + q[31] = 345495847589475847548uwb; + q[32] = 3245984754897548957498574895745uwb; + q[33] = 32594875648957489754854664897464uwb; + q[34] = 12345214395483754897548574857485748uwb; + q[35] = 1523143544545454uwb; + q[36] = 2843243245456456576876uwb; + q[37] = 542359486759867589675986576895765235uwb; + q[39] = 5498657685976587653uwb; + foo (26105549790521884176764218952781428771UWB, 12589712345465342uwb, &p, q, 97.0f); + if (p != 12589712345465342uwb) + __builtin_abort (); + q[38] -= sizeof (p) - 1; + for (int i = 0; i < 41; ++i) + if (q[i] != qe[i]) + __builtin_abort (); + return 0; +} +#else +int +main () +{ + return 0; +} +#endif --- gcc/testsuite/gcc.dg/torture/bitint-5.c.jj 2023-08-08 16:12:02.341939630 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-5.c 2023-08-08 16:12:02.341939630 +0200 @@ -0,0 +1,359 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +struct S135 { unsigned _BitInt(135) c, d; } s135[2]; +unsigned _BitInt(135) v135; + +__attribute__((noipa)) void +test135 (unsigned _BitInt(135) a, unsigned _BitInt(135) *b, int i, int *j) +{ + s135[0].c = a + (b[0] - b[i + 1]) + (b[2] << 7) - (b[3] + 42); + s135[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s135[1 - i].d == 0; + j[1] = b[7] == 41066216447087484049564603714591595841626uwb; + if (b[8] != (b[9] << 25)) + b[10] = -1; + v135 = b[11] + 42953568208323086417402824216666875252142uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check135 (void) +{ + static unsigned _BitInt(135) b[] = { + 8463654185126215364154304684888703364649uwb, + 13658636853650784933344312223424772115066uwb, + 18390507727765446703890200284988625150777uwb, + 39889350586873865111357164950780819590308uwb, + 33022475220127125972541408550886872946157uwb, + 11333291582071369827887273502665555805026uwb, + 3902203683482045798302423557190uwb, + 41066216447087484049564603714591595841626uwb, + 16784965627356370497109555127280042979599uwb, + 7643716056186238617582842123439581326016uwb, + 19836147734043931654921333860970539101678uwb, + 12432610573803574406235637996243202359232uwb, + 21082105046139319624321070809125021432333uwb, + 4451745762839330307043673589610uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(135) a + = 31187320352518101815881924683645645881322uwb; + s135[1].d = 11834999377838661704814127001992153922683uwb; + test135 (a, b, 0, &j[0]); + if (s135[0].c != 31612399059450309097747051855757230322507uwb + || s135[0].d != 42086989921663500164906031508060611173292uwb + || j[0] != 0 + || j[1] != 1 + || v135 != 11830035816246537500326512461643746545006uwb + || b[10] != (unsigned _BitInt(135)) -1wb + || b[12] != 43556142961428377560472619444222657476757uwb + || b[14] != 43556142961428377560472619444222657476758uwb) + __builtin_abort (); + static unsigned _BitInt(135) c[] = { + 1551285959809994210151290388254024769929uwb, + 9215997233892929635003694907344971975862uwb, + 39194975204437258458997572112485704553492uwb, + 30855703323230132032090704189294312024903uwb, + 21369469779496743410402906224964849075932uwb, + 14841665908022079679702934181971886622844uwb, + 19630534803796254511661738870561125391241uwb, + 43019675483091641860333234580998356788381uwb, + 39970634580048249544562112517644333613056uwb, + 1191217737795360372798505798508058uwb, + 37946572714876419093215575675176896482623uwb, + 4232750244223021640360996638731476646770uwb, + 4052758609491127849063467754379555742566uwb, + 39722275064055273051470447567883559006300uwb, + 0uwb + }; + a = 24657112304265243122405775577311943535949uwb; + s135[1].d = 0; + test135 (a, c, 0, &j[0]); + if (s135[0].c != 37693225764587199559589625622735125586095uwb + || s135[0].d != 28346681648428908942498835305586873104084uwb + || j[0] != 1 + || j[1] != 0 + || v135 != 3630175486665984734451871104132020832544uwb + || c[10] != 37946572714876419093215575675176896482623uwb + || c[12] != 3833867901824850271841502183382772060067uwb + || c[14] != 3833867901824850271841502183382772060068uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +struct S192 { unsigned _BitInt(192) c, d; } s192[2]; +unsigned _BitInt(192) v192; + +__attribute__((noipa)) void +test192 (unsigned _BitInt(192) a, unsigned _BitInt(192) *b, int i, int *j) +{ + s192[0].c = a + (b[0] - b[i + 1]) + (b[2] << 7) - (b[3] + 42); + s192[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s192[1 - i].d == (unsigned _BitInt(192)) -1; + j[1] = (b[7] - b[6]) == 255187001951392025884741936737034599050205342889367592965uwb; + if (b[8] != (b[9] << 25)) + b[10] = -1; + v192 = b[11] + 2163738967454769289750177070635481073128375537642482578981uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check192 (void) +{ + static unsigned _BitInt(192) b[] = { + 3228866936540682691868394180939247213045089209876303887643uwb, + 3908758529346495655434258047388434965374712986050611884354uwb, + 1851532482363341717513713701170081412289228794495066903175uwb, + 5975293786133775194483789296663647337052708600272963495919uwb, + 2820057475559560607299380550839942093606275933232105346229uwb, + 5362817792426405848910790868188776921236918437924704229050uwb, + 979877290520863780830672004560233786791511895586353138705uwb, + 1235064292472255806715413941297268385841717238475720731670uwb, + 5829209170873343132786365572649959801760991694267006189140uwb, + 3298265737098071024465207026022448799296008756143231498035uwb, + 940670103332613157768642186014034108249816638700548072517uwb, + 2237128221585286673265910175884786455449703050136766895084uwb, + 5343797638430338971087457378870861887867024738000778783665uwb, + 2529390643742992876667887597532819348219532837015437654241uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(192) a + = 2618661874473674031833709426402867675358124955059180091771uwb; + s192[1].d = 3240880288967057869631914892069482190385384187140994012855uwb; + test192 (a, b, 0, &j[0]); + if (s192[0].c != 706870028734637453615201354376795963209926828811195228347uwb + || s192[0].d != 2285738979037264170090375369163685923831632419516523901418uwb + || j[0] != 0 + || j[1] != 1 + || v192 != 4400867189040055963016087246520267528578078587779249474065uwb + || b[10] != 6277101735386680763835789423207666416102355444464034512895uwb + || b[12] != 3747711091643687887167901825674847067882822607448596858654uwb + || b[14] != 3747711091643687887167901825674847067882822607448596858655uwb) + __builtin_abort (); + static unsigned _BitInt(192) c[] = { + 5056545299578942817419004982927444283363838129353580295745uwb, + 3531417693480247808623806953213145420554761387079781845903uwb, + 344995382910742860278210827312297947555943126346350032667uwb, + 1665878021517466104406447387862080652541968946313097848513uwb, + 3702336991937894056852499403052128743722086447309795810459uwb, + 3047176269106908247893091430981158526415914935872745232818uwb, + 5837808927599143324365016946161962633699774149391236391641uwb, + 616230573526655023040079960385747061734409792273035529358uwb, + 4899745987387470009167824739532983626288828402149586108416uwb, + 146023809533937871729368708715825784989858520095038uwb, + 1818078651877174878773673167465776979421635253130676590402uwb, + 708253875247724856385503140762213862078700660051492170198uwb, + 1918646725296468312732447651696775312079697668357127231420uwb, + 3407896467949241097221562008023866460487016701943186636216uwb, + 0uwb + }; + a = 4334425031127766761089651540568319387961460796342206894467uwb; + s192[1].d = -1; + test192 (a, c, 0, &j[0]); + if (s192[0].c != 4413371480577316434238862115941009972672800653387470086858uwb + || s192[0].d != 2226914616394806622299956064802345362767073196810043931466uwb + || j[0] != 1 + || j[1] != 0 + || v192 != 2871992842702494146135680211397694935207076197693974749179uwb + || c[10] != 1818078651877174878773673167465776979421635253130676590402uwb + || c[12] != 2869205267437439666614227415183799955615338742520847876679uwb + || c[14] != 2869205267437439666614227415183799955615338742520847876680uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 255 +struct S255 { unsigned _BitInt(255) c, d; } s255[2]; +unsigned _BitInt(255) v255; + +__attribute__((noipa)) void +test255 (unsigned _BitInt(255) a, unsigned _BitInt(255) *b, int i, int *j) +{ + s255[0].c = a + (b[0] - b[i + 1]) + (b[2] << 12) - (b[3] + 42); + s255[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s255[1 - i].d == 255187001951392025884741936737034599050205342889367592965uwb; + j[1] = (b[7] - b[6]) == 35079516404010817908112229771536766101092256322770268596592519563335917296247uwb; + if (b[8] != (b[9] << 42)) + b[10] = -1; + v255 = b[11] + 9589198606702369375056479928174941699714421508271337355764754830579779054882uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check255 (void) +{ + static unsigned _BitInt(255) b[] = { + 3861714047960214860503769476754636024261469188339866686856553775336008577557uwb, + 51175255900783946984470019707544472774211315503709121319713624735134204561369uwb, + 17345603833958095509660462595097262634109622426516669177449315775424443341657uwb, + 42823701374562019745772585881781652129981403461863690469883912594099541433080uwb, + 51319674321995616727877469124404951867658380853042706770000900262120757183208uwb, + 52906636245432908656398520278306560145122955700637871390327152110192649720972uwb, + 17358815113825560149028333410813032121665286465083593038209986169266901681646uwb, + 52438331517836378057140563182349798222757542787853861634802505732602818977893uwb, + 2788004462553513100609800852000190119799062917794460119684836482863393638874uwb, + 1371934028037182110859712841210549299053627214483532073119322938817156900802uwb, + 27446425677305660137811201333992510946884519570968084003836788091973600281223uwb, + 26953886320773144921523720569352939441073773759009802807981124464100414571230uwb, + 4136701104931368824349366292837727313467036617036788061778000290667287672703uwb, + 16284209316703094594160217903483772091891615489911326105642136930965810318850uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(255) a + = 43671209527014657031076032832534182807479171149570250544322965577348390656271uwb; + s255[1].d = 255187001951392025884741936737034599050205342889367592965uwb; + test255 (a, b, 0, &j[0]); + if (s255[0].c != 20576567717160318081578175912662929186060780346948500086480401311222111385641uwb + || s255[0].d != 39177534735914878791230670587295539597881897796949856541813587771063479852129uwb + || j[0] != 1 + || j[1] != 1 + || v255 != 36543084927475514296580200497527881140788195267281140163745879294680193626112uwb + || b[10] != 57896044618658097711785492504343953926634992332820282019728792003956564819967uwb + || b[12] != 41611835301955003117625274600860181834743376842908955914086655072990754501117uwb + || b[14] != 41611835301955003117625274600860181834743376842908955914086655072990754501118uwb) + __builtin_abort (); + static unsigned _BitInt(255) c[] = { + 7981769630282326956199854914771456697123750044016665635797085873395082876412uwb, + 53388853971156757275720047407967538568298021437528793620790412040317130403689uwb, + 26701828432251973964608431737798795253412436987727543352462415534788835630812uwb, + 5440780860746561756714149436754163126067503344036226572647314943619048388690uwb, + 33986332817169953208946609849689345925961381637863140695485139248791268070886uwb, + 4100939267210968649446715463008507186522717252282546996073651959494281461390uwb, + 51781097727624204498405281053756240112648760803686514440326944560679935060229uwb, + 39871871446047940023148355012724181415135167919226806605949531421611900671463uwb, + 22669501989113495379481452050938385508947296877470428714787872701608093548544uwb, + 5154447987732395490520832948036146605988346181554886405771838486uwb, + 22291959629998533921508247788279156576466986919969930954212934913917085206989uwb, + 1961549937179049997528355604457213261448618818592679790977249627688612403787uwb, + 41836060567948575115843842705609341074148894754978250388257622994608010108015uwb, + 21250627322648087754897420116830444064785267321586891615233932456372363316960uwb, + 0uwb + }; + a = 4334425031127766761089651540568319387961460796342206894467uwb; + s255[1].d = 41611835301955003117625274600860181834743376842908955914086655072990754501117uwb; + test255 (a, c, 0, &j[0]); + if (s255[0].c != 12109153275975887113226632923657866254324254170345083268415546710877474684826uwb + || s255[0].d != 55850175013735185955402882706756822737483750660992935334535260602616242125954uwb + || j[0] != 0 + || j[1] != 0 + || v255 != 11550748543881419372584835532632154961163040326864017146742004458268391458669uwb + || c[10] != 22291959629998533921508247788279156576466986919969930954212934913917085206989uwb + || c[12] != 36645417296010009956888072387513509861849725011233390404494859547584201503007uwb + || c[14] != 36645417296010009956888072387513509861849725011233390404494859547584201503008uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 256 +struct S256 { unsigned _BitInt(256) c, d; } s256[2]; +unsigned _BitInt(256) v256; + +__attribute__((noipa)) void +test256 (unsigned _BitInt(256) a, unsigned _BitInt(256) *b, int i, int *j) +{ + s256[0].c = a + (b[0] - b[i + 1]) + (b[2] << 15) - (b[3] - 135wb); + s256[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s256[1 - i].d == 53206656141818470791424256353006269277597513345110510288076840335108990485400uwb; + j[1] = (b[7] - b[6]) == 100099038883167575868168369054142100716577408309486879759875338591874183239821uwb; + if (b[8] != (b[9] << 63)) + b[10] = -1; + v256 = b[11] + 105302399496355811946682562261964785380738245520086820947909580844925217183297uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check256 (void) +{ + static unsigned _BitInt(256) b[] = { + 32009310487117026679674626072407603367594653139936438287667930528262453801915uwb, + 65176902468824044453790267089157089693737812535360753024943201863160377679656uwb, + 82344070090465165315955757521075336622529332575448066816076316414765425718982uwb, + 1700965766421539490938858830624234600098958435316757520284868641071726580981uwb, + 43634292917714777985622413899887802700784049405471615230478960221105984199159uwb, + 100631692904819207373422601372327472587552135350288379476708675217470156851657uwb, + 110129860579524893207321038633598210672223454232798756477691416433717017519769uwb, + 22023582511300831410026311598353795806875331462942548421790016502461571529072uwb, + 40138510211986216232290944684699787930583492725766883760868504701674647977984uwb, + 4351825997216706075548423101456944800498099170105917024323uwb, + 169752993639582224244050634348149779190985669780902142577260914458554153598uwb, + 32145284966541819913159374355840318160537667734553997019437196071417771295134uwb, + 54664388217936175028491213294153178079954834597579823229832063212225827892844uwb, + 20191860868728322538097431032697551245493230687142770900578302601765403775815uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(256) a + = 35032284611123531672148181265368654016291603806765316452453041084857012399819uwb; + s256[1].d = 18495552704607464237917826961539803493777535452633922395016139213747075459320uwb; + test256 (a, b, 0, &j[0]); + if (s256[0].c != 63389043283546287594263459568996583234036639501854425943006627750610451754736uwb + || s256[0].d != 85940937558229637292496709413287085767649546821453763197795096316568198990162uwb + || j[0] != 0 + || j[1] != 0 + || v256 != 21655595225581436436270951609117195688005928589000253927889192908429858838495uwb + || b[10] != 169752993639582224244050634348149779190985669780902142577260914458554153598uwb + || b[12] != 95600228368587872885473553975990356607776753978497793138879281406147725864120uwb + || b[14] != 95600228368587872885473553975990356607776753978497793138879281406147725864121uwb) + __builtin_abort (); + static unsigned _BitInt(256) c[] = { + 32343204662160194495085563951007642761735079004830363200819846414562640245919uwb, + 24084137699661809462548106377371635219349193031343667516905836190779613998386uwb, + 101379688603662938586655900818791548427393428573101695287405037352360497544008uwb, + 49527008749469396581891560939525147311301744659706134394761856095820111704400uwb, + 78611633605884634807198913241948438916640856307470257529328762903676002499180uwb, + 7725329946357185150163578923822973618563365182619444740561512924522337085644uwb, + 87230734821522736453376619836617027268082314423737558813724810260551555679101uwb, + 71537684467374116897974003882071220131389738067583874534142564844512609278986uwb, + 52523168514171623670932664104908233302972408272520282168521737371661091576905uwb, + 55534995177165851478287456502449363262630885721301994816018615193922251275498uwb, + 36185028875353330724983116385242607835574307465276274632872421166901316306305uwb, + 105156498492189914423239302852802412965634513221765962480547101568217183385322uwb, + 107291868576624602610288559845636897859595852848306710447908839132037475007641uwb, + 31763533437617266501468240129359520348601211969709950732394000355828663205766uwb, + 0uwb + }; + a = 9837521119254571559208641097198297536765546083418356216057243384350911670458uwb; + s256[1].d = 53206656141818470791424256353006269277597513345110510288076840335108990485400uwb; + test256 (a, c, 0, &j[0]); + if (s256[0].c != 18957614795124660722423653645379624133127098231408367194845756641321108143966uwb + || s256[0].d != 96521194298766978603491920349693757511095007817895085416680901426339418123139uwb + || j[0] != 1 + || j[1] != 1 + || v256 != 94666808751229530946350880106079290493102774076212219388999098405229270928683uwb + || c[10] != 115792089237316195423570985008687907853269984665640564039457584007913129639935uwb + || c[12] != 84028555799698928922102744879328387504668772695930613307063583652084466434169uwb + || c[14] != 84028555799698928922102744879328387504668772695930613307063583652084466434170uwb) + __builtin_abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + check135 (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + check192 (); +#endif +#if __BITINT_MAXWIDTH__ >= 255 + check255 (); +#endif +#if __BITINT_MAXWIDTH__ >= 256 + check256 (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-6.c.jj 2023-08-08 16:12:02.341939630 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-6.c 2023-08-08 16:12:02.341939630 +0200 @@ -0,0 +1,359 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 259 +struct S259 { unsigned _BitInt(259) c, d; } s259[2]; +unsigned _BitInt(259) v259; + +__attribute__((noipa)) void +test259 (unsigned _BitInt(259) a, unsigned _BitInt(259) *b, int i, int *j) +{ + s259[0].c = a + (b[0] - b[i + 1]) + (b[2] << 7) - (b[3] + 42); + s259[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s259[1 - i].d == 0; + j[1] = b[7] == 853796348253166026572322331766419194644297857346047602312235759502541501989541uwb; + if (b[8] != (b[9] << 25)) + b[10] = -1; + v259 = b[11] + 131672585462768721291717421546274215675860478844820049742378853291513419577293uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check259 (void) +{ + static unsigned _BitInt(259) b[] = { + 918480562371960593090410127982602516965623024307296422252015063457072276190019uwb, + 805591267508470730905808815897672235976825560202638463105454632689132956230159uwb, + 918331245995907029502562304060195532137531507866437159352108797919955179870191uwb, + 813875127751611422577721650805025403235043641932299023318765404699420543383496uwb, + 312693756633721376836885884755241545403854394304071110713260437525889451361210uwb, + 649538941042539125892439630557027126879421922847150643068762916100064243451309uwb, + 773306487188996490948079630445764609771546927800966605886964877358699258715670uwb, + 853796348253166026572322331766419194644297857346047602312235759502541501989541uwb, + 76083267877106286558555438489752654093377337000667150108584195505702104870323uwb, + 433731305334336103344926930540791423313226370883401849111287164916738117506640uwb, + 57656267431091314368862950118941867863238118931858464589826085330125773498121uwb, + 64173041359832501449385133817329349658818599309611908558002991010875611848746uwb, + 42346589146173514762997245981921905757283138481803437257678854533030144461674uwb, + 61227931681037412178262565289688995250776671963152062289442760797238154015232uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(259) a + = 466268672176961050215569613615746490713100259736768099838759141406021022194231uwb; + s259[1].d = 289647636390911494735348665819031670280022785262945335571175835860869121921853uwb; + test259 (a, b, 0, &j[0]); + if (s259[0].c != 593256375550214279190871305843268365974742545847394880963235621252368145099513uwb + || s259[0].d != 258470741923291377781882672832254987468877297321140017579156131137149865493929uwb + || j[0] != 0 + || j[1] != 1 + || v259 != 195845626822601222741102555363603565334679078154431958300381844302389031426039uwb + || b[10] != 926336713898529563388567880069503262826159877325124512315660672063305037119487uwb + || b[12] != 865108782217492151210305314779814267575383205361972450026217911266066883104255uwb + || b[14] != 865108782217492151210305314779814267575383205361972450026217911266066883104256uwb) + __builtin_abort (); + static unsigned _BitInt(259) c[] = { + 280836731241256517108451767043891202691471765896401168847540724952507405972497uwb, + 840411222605516639870988613734990053662001382735609723401814266406994078815101uwb, + 315675972612806440596502686972210055502484407915611896031513380334465695474313uwb, + 203899119027212320906468030526379653925169232409139699654080707114835986996999uwb, + 128451577752218373908172046011152144714641252063864956677744337179480421046978uwb, + 287567473759168733146788470777196081514207657452235204870489646221804917429977uwb, + 750296306916736952737909920532226142314659927184810908344954406682013838424980uwb, + 656663422127941740082895518453608245693505586454580487767696297787796578828932uwb, + 879879542531872983872988522489746684941859186676324312036446053929728989986816uwb, + 26222453788872748132735148742489417938645457824359068633212031541160613uwb, + 721087878418777615469711741435156333032292047533740164381818331009890349325379uwb, + 441184423645775123821015863267700095523103297061220954332335218574744406423193uwb, + 84779661426980563874304295256885870100654945451373784779121036518843563800060uwb, + 720201829457536541913713975070870089885671802608506320469648510576137739651426uwb, + 0uwb + }; + a = 18070271922856865288654809596744903817727150511379287511935119712627107404963uwb; + s259[1].d = 0; + test259 (a, c, 0, &j[0]); + if (s259[0].c != 754979172232367155652142901903016464541317666806124208079545327296101909258886uwb + || s259[0].d != 726067720449610868402876758678941562623370067217056480941991810113614143071607uwb + || j[0] != 1 + || j[1] != 0 + || v259 != 572857009108543845112733284813974311198963775906041004074714071866257826000486uwb + || c[10] != 721087878418777615469711741435156333032292047533740164381818331009890349325379uwb + || c[12] != 206134884440993021474853904998633172940488074716618191846012161487167297468061uwb + || c[14] != 206134884440993021474853904998633172940488074716618191846012161487167297468062uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 508 +struct S508 { unsigned _BitInt(508) c, d; } s508[2]; +unsigned _BitInt(508) v508; + +__attribute__((noipa)) void +test508 (unsigned _BitInt(508) a, unsigned _BitInt(508) *b, int i, int *j) +{ + s508[0].c = a + (b[0] - b[i + 1]) + (b[2] << 7) - (b[3] + 42); + s508[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s508[1 - i].d == (unsigned _BitInt(508)) -1; + j[1] = (b[7] - b[6]) == 323515224000201027366899758000237142291440124580568781353226908396916757538679852963577209476426722029505026752120305126905670783187399192585916919546571uwb; + if (b[8] != (b[9] << 25)) + b[10] = -1; + v508 = b[11] + 716024231508310591151659913627069746319678908481108351681014830741662356869311236055018626572200723297424975249553920015269741669328444662913268383663677uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check508 (void) +{ + static unsigned _BitInt(508) b[] = { + 832078183434045927540487103804907011739266549356223191691643561067749769975943908404638920166502402329694585519922110244852912407804057166046933883008194uwb, + 713936147229868929139293139988718979167626862529198392930772721993480948457421027732398866594698271934473685041618760204074421885407508961194284075992372uwb, + 617361847118081522653471977724056261996473287264427111568008587684000569753190215945768169015576241392153003921766059387579429385226558246856562678192104uwb, + 558345641413420470280223467353393511714120008866888151814287282910208158712080338084981427985120538158019424401062183786473300529579273867747687575759264uwb, + 499761439373420902958682462789094939629857960756907734602342350501615831252037617149223977152737393272833291045861050465948469241674239312800301147123184uwb, + 41458778840616754230715683890502356563717287755866620113981050014317462591845066532973853075702831495501272233490672301990969026267150137016150650508199uwb, + 418458681135681746732437152058641717690726059977788598152959959313259063414620594315807075298922056786187386710006952502872115288914005302859339669672594uwb, + 178590258028275731715530947756428839232212382672258470295756987295058447444774755851491768941934611483011083453873652899758014544959831694913681677646689uwb, + 356770203054529564617317933555709062197425817471944056561734674021988369183029131819074076937899959445814817800565023050865025285444839826004948142681410uwb, + 584112461551758657888253754473884153359686350173736669541862380483308304473624923065781205318194340854082383073991675143564628127579536789385040891716043uwb, + 680157864635886168227443104616994718021643051017205364932604743260844971234200794270551054794576522886616288751944237137476474081129540389630063933035924uwb, + 624234678396543393542036481071764142163163163113602945911969155623637623734341260164471554708546709676358706745261925658188877241381613170733888758848256uwb, + 454784507207582406161930055875861559038811204428592354757758685948743133937531828752051902975778637734147167150365830445107092680154259745175825282331123uwb, + 319986047127156205965562926466827182744423938150941443628321307635789163001042001590072115090024768392582441327268266695557745771318045725281606272507745uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(508) a + = 711291826680524221552366807721297346517830107349701196208230744872277012932938686554048942571552181657477920414828724120656294188547596916447951866844703uwb; + s508[1].d = 44300483028507681832691655975564116229472905643882332053402780694878295874197390896801387042830042144560060996721375070892413197614373985836807183707843uwb; + test508 (a, b, 0, &j[0]); + if (s508[0].c != 522533064172957689320353588403947403982656359176197029733990042723046927465640381488621700421437034411326731632519943219324383970178228415895248995946467uwb + || s508[0].d != 544171514892154666305054228710247267670694798806087644332682606744854247388929324492327007054644882499782210854566003344906189740262758953265414281741613uwb + || j[0] != 0 + || j[1] != 0 + || v508 != 502270914283441665970319832310968505515381707807686711485261396132689728724055810169373037645315968743156690858160467495099001234963397211995054079631677uwb + || b[10] != 837987995621412318723376562387865382967460363787024586107722590232610251879596686050117143635431464230626991136655378178359617675746660621652103062880255uwb + || b[12] != 518001948494256112757813635921038200223036425636083142479401282596821088878554684460045028545406695838044549809387111482801871904428614896370496790372510uwb + || b[14] != 518001948494256112757813635921038200223036425636083142479401282596821088878554684460045028545406695838044549809387111482801871904428614896370496790372511uwb) + __builtin_abort (); + static unsigned _BitInt(508) c[] = { + 647557698892184285650475800644782894130830134743039316064874048572238802447391019320461822795528468837172509913850428906715002084926186679743636685547834uwb, + 19893833808289543304534784415999074892775857443659529983103990809804459295154825463722400943836101951812379338522524133647269361956787413321377320775949uwb, + 167225090603369392131840179341189845624248307670461180275627141145612180756017010718187841360639781066493394970424816391919242343853725482848930838565833uwb, + 425038857255644658246682026149139094877872271690333163307937973752297810646903055053327010856106694556745086838630642887918900506053243909959679540607590uwb, + 710399860501404196180909731021634278197730505954614106387836731661196474327340462005364906935941520263965559590135721186838498741274345456365502514761552uwb, + 517100391187257228299118348633309855520848206928211390424040909382822545139910418018096605353580518981578830214711288569084195564658992133538762776045012uwb, + 337049882664509041243030742301206305462316697436525762870825130294272111721357923024083663351305745791606079615492796115999045732841532642628230422676768uwb, + 660565106664710068609930500301443447753756822017094544224052038691188869260037775987660872827732467821111106367613101242904716516028931835214147342223339uwb, + 264311519140803818482685788811186614544730978154943534367495114584051059508245461660412877555306257793689596804946554756871772168758950748494862728822784uwb, + 7877097104215735747894221210813123421213954036085114907249662714721294030792875935447599814990349346211242580561237178947680359147755823984589062uwb, + 67442667089892250469544199468501425015399920231234867688030078116216928480132993764590084699986918086331763703967003811392074730155208796825341891897256uwb, + 85129756049329066391994997807963865671611392223804816975886973237646888963379984739504507746795881579055447505908308844315081721803505794221196177586220uwb, + 707371868440287371388093572489945370955349752876981733417655198143352744491182974880452293708290631899668322081620029303621428033853319295154190475832548uwb, + 538419296440305382227520128849893548498555312954035671105518356624711212650496087782309622044337222159048223665137702366210806405686462563977378378472852uwb, + 0uwb + }; + a = 708586050532895903124837960170867540022772026063196035415656948205052808113573236752572838768221960601298200594769808975966326249462737081924621284351278uwb; + s508[1].d = -1; + test508 (a, c, 0, &j[0]); + if (s508[0].c != 528334769435707893291849283838312547132767955028634494668975752805681928519569910180983209404481539444766030992803736389428118910242578080095668810055499uwb + || s508[0].d != 626861153942807538339962839367652023698436836743736597401578432880275274177104419034373833881253982548479037772997711030061561577382993299825586823026782uwb + || j[0] != 1 + || j[1] != 1 + || v508 != 801153987557639657543654911435033611991290300704913168656901803979309245832691220794523134318996604876480422755462228859584823391131950457134464561249897uwb + || c[10] != 67442667089892250469544199468501425015399920231234867688030078116216928480132993764590084699986918086331763703967003811392074730155208796825341891897256uwb + || c[12] != 299568699181106936495856433537971834468905050832988915002204233607899039229100598267807521591094242071578767471517675812148811270060198057674724684407403uwb + || c[14] != 299568699181106936495856433537971834468905050832988915002204233607899039229100598267807521591094242071578767471517675812148811270060198057674724684407404uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 512 +struct S512 { unsigned _BitInt(512) c, d; } s512[2]; +unsigned _BitInt(512) v512; + +__attribute__((noipa)) void +test512 (unsigned _BitInt(512) a, unsigned _BitInt(512) *b, int i, int *j) +{ + s512[0].c = a + (b[0] - b[i + 1]) + (b[2] << 15) - (b[3] - 259wb); + s512[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s512[1 - i].d == 4522353484324747955267125937291948655749617973066893955369024131525488299108320993071208813642361430492411037439152575330738596343613170269621629934531241uwb; + j[1] = (b[7] - b[6]) == 374577815990281408677256593783629954432691286119512435557712294960563169554809756081207157974945869359369961439855092584877150233312923919236788786326875uwb; + if (b[8] != (b[9] << 63)) + b[10] = -1; + v512 = b[11] + 105302399496355811946685122261964785380738245520086820947909580844925217183297uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check512 (void) +{ + static unsigned _BitInt(512) b[] = { + 6021199531765212801884676816470799034908236595092557744734057443805875347290483033829674243182977894869999446238486916822395301604705319217995654295432902uwb, + 2118944847509270465197760108216002226005910220953364492400962085188310835486567249208768553765555672830161371433385656186687932945648641289635143624153621uwb, + 2468011621780240906908738384251283152842243623265843874579649124218711735704146024693879862235081238297926460688162588400193067305227164327914340959869992uwb, + 7852261253584637784169919081877553866282673859198296203117153724887988256894439079095114803178078464315049063160714347766105329320309211116124084359320890uwb, + 6881429107351001058295162119545491230166185795246928525617516768009088834586165228975554760023030849264752345389888178729929909699157633918182461033495556uwb, + 7490938212743615293405934133782451317533822019734363666709765080515130781799097345699393688357934162148290248912225980297047575683793284504381422978757040uwb, + 10120569572654605122639402565568718563995238635532261987812601502126969028367382422209505735533685455107591090283702679606268593966759672963076962700307022uwb, + 6544115361584477201664859993249450245040478983518054359791236989888339451701690370158568050118785002344520392336988100105900733099550716973249399480839328uwb, + 7998211385715595185432216755958202893898483475426306631076103969688188023218591677753885970448355780373235280537235089173590925156414399326886601942858952uwb, + 1101608905235198391935063146859712526167216410759556463737474438201976460429148065105316982180322610546500122551969559689893274021338053420958788359583115uwb, + 5547339070657168956577880025794227235978722359584966491999832792960847505505357241452219444649567336517274817160074290099346053369308053580179899142505418uwb, + 1750269279776476441267578744631933548060353310561690992260040183595109596951578483669111308170823694772335056351746927981021331305166802991213646334514404uwb, + 4192336828386954798960532308463588917660266569128375313949004426859425573394438991510991296156896119249870038323974327749964728970306928745553011492449651uwb, + 1900177384209047479231940933911260783674256383613355641699143750453309311902806908717431412257630234621978137884266303399427482666060857148046946256701407uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(512) a + = 10930130497064002394702882970302938462793108526726281176439996378763909442554754292732278993783426604574021331155984114583431563021614093376741477610729300uwb; + s512[1].d = 1062548863735806614766555155689890005619504886385354582078741512313209800319722918322963204342249477855349130571262241563029708157593686639667293170464985uwb; + test512 (a, b, 0, &j[0]); + if (s512[0].c != 2887513008923639902240466565062692784517178403522406023075811881559011847285804098407629056403311082480905591628208975136041938382372340398331672243318734uwb + || s512[0].d != 972130803422634759391069517910461958937573607139260059384360471797756640789653835842301525452796103317707145350644624256211972219907968589876206212846874uwb + || j[0] != 0 + || j[1] != 0 + || v512 != 1750269279776476441267578744631933548060353310561690992260040183595109596951683786068607663982770379894597021137127666226541418126114712572058571551697701uwb + || b[10] != 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095uwb + || b[12] != 11507630545733549620342084064294585343805109436979037736024417693268454718170740068084442885909273193068053720302219747454326400145885712798386702749382688uwb + || b[14] != 11507630545733549620342084064294585343805109436979037736024417693268454718170740068084442885909273193068053720302219747454326400145885712798386702749382689uwb) + __builtin_abort (); + static unsigned _BitInt(512) c[] = { + 4310457364893777373602665157014873559135384447597675565065759273827483949324526981781306465942744538806150653124143200561193417791157963881792904451069362uwb, + 5958789020370015340565416950487013712033450466320460334048228974568661716557882588498670105211169302921483448876614084424938615986458325610065852828118306uwb, + 8284743202872517242207866690683488538720128091867223206119391935721931034359590521893173196995749495634003248491356217756384997245149844917613657244100946uwb, + 12664079984606974422077559239355618815941897900272441909795959033933251997534364342568914887960377305762259523811571861079808666818626009150755656127832627uwb, + 1277280061505669581991258509578719709995272247404983496353130395005685346463372196431685623256422418143892881140710485556437791815840558839002633040897782uwb, + 12215250731983666777320125323169237871547944066095330125912513738032966095255991063167892594205142430862706904005862880547898319287711754622854549074643186uwb, + 9251003287718566323105383813392168970560299412448652319116761599247007001244197366325250786747301353984616744521839526461090225556617577043580629233001099uwb, + 9625581103708847731782640407175798924992990698568164754674473894207570170799007122406457944722247223343986705961694619045967375789930500962817418019327974uwb, + 9625581103708847731782640407175798924992990698568164754674473894207570170799007122406457944722247223343986705961694619045967375789930495977475637258485760uwb, + 1043607594407655227216500911938969602142764645410552381359002950524059754591300096857049049719237072025508574484388968507628527351266845uwb, + 11998753448729239344000141538200052195237540636029454316657436691685826543599848607581685084378245778577663489979887014434647868686320656434403040763612551uwb, + 11434040832182557441766779829155897224389793286294752961027160601623012283276511030063398944055141766189843896068181650049692814441787333867085760205626564uwb, + 3023331158039332614691238368394682484299421409956298474635469941534054266475913779087200438226804802431840397460566948014999950457892777550113994388831586uwb, + 6643992699881938834553303739293839845351896246066261353792165016004958058241209888845214001951224186762526613611217678738912897449639764896432567428225735uwb, + 0uwb + }; + a = 8297086167455412951314345399041666622690871902388991853000149614722648899348042581378229717518281695539366926410544760114561024579207473131456671312516393uwb; + s512[1].d = 4522353484324747955267125937291948655749617973066893955369024131525488299108320993071208813642361430492411037439152575330738596343613170269621629934531241uwb; + test512 (a, c, 0, &j[0]); + if (s512[0].c != 562788706253718154365616008999801360288452754375064525508119581728036130536904720042355361715252120605188469823973820439731595153197657174657215322741897uwb + || s512[0].d != 2450664880034868237736952350867106482818480521222495256778680955285041346939852822760111651975591771880097571588399256063032055281563320405249761438168944uwb + || j[0] != 1 + || j[1] != 1 + || v512 != 11434040832182557441766779829155897224389793286294752961027160601623012283276616332462895299867088451312105860853562388295212901262735243447930685422809861uwb + || c[10] != 11998753448729239344000141538200052195237540636029454316657436691685826543599848607581685084378245778577663489979887014434647868686320656434403040763612551uwb + || c[12] != 6763815230060658265020721258912006282127469574526132023931396427716805971832337087956660296215679240927505244575268372114840985362306805050001081577858360uwb + || c[14] != 6763815230060658265020721258912006282127469574526132023931396427716805971832337087956660296215679240927505244575268372114840985362306805050001081577858361uwb) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +struct S575 { unsigned _BitInt(575) c, d; } s575[2]; +unsigned _BitInt(575) v575; + +__attribute__((noipa)) void +test575 (unsigned _BitInt(575) a, unsigned _BitInt(575) *b, int i, int *j) +{ + s575[0].c = a + (b[0] - b[i + 1]) + (b[2] << 27) - (b[3] + 4958475968475894375894357484535984375489wb); + s575[i].d = (a | (b[4] & b[5])) ^ b[6 + i]; + j[0] = s575[1 - i].d == 95573020206290249524150023772890126071219633117171019262766503336310672999410172030736216511031014256906040106668955921896748704905692143264499542165901631357858279597168868uwb; + j[1] = (b[7] - b[6]) == 27145700341365416267735847217275690336177396856349392593186862163108423829551399123342676161793491631779988040463555034191451268734796110296927769088083654195518127550378112uwb; + if (b[8] != (b[9] << 42)) + b[10] = -1; + v575 = b[11] + 23747340451678047735163360653763407761482933548732248545666538557842792154643066748753917518601117103336304219106042161459437965550611189291922027839274834493025750978734016uwb; + b[12] = ~b[13]; + b[14] = -b[i + 13]; +} + +__attribute__((noipa)) void +check575 (void) +{ + static unsigned _BitInt(575) b[] = { + 109629911866606562961096883957886177157168492273877379264846777289230149818443125999912223814388744273336157512735477622882702153104102811897060843654669684146016128756706531uwb, + 49737336835254330810961852329841465152166265671267895624334663745208596732097722057750738167775257956975985814734408710423060394871412870929476144910662495171305515147160358uwb, + 38554548935224072640061799348846572892670189944581591586656577942689453406789240916780049368436228529892778822796853383245767382205374048871923124561885190260824233296311215uwb, + 71058269942432013527315378010985114704370555413208353814319452373530227298981545120481154232525349782777377989106743248998743352091363716737509221664926215529843633715687782uwb, + 4160385932463020068352363207252688161266437324266506898550050263305674040252431030407032416831730109735167157770872898962184845623991414528191955840335425228637597057146575uwb, + 92940635878626680004989100258386964603204572877596438304889779253809889656868292370355114313083957669380421733891295145627252962536732023763637134129797695217583987460880286uwb, + 2497863814760324764248624507199774997376419692946013954829621482125467045874636227196983588067358574709667157879971660264026959433911373287725284674927778585806087674600393uwb, + 39669551656169181196901167730139627329430801053972757381518801156276770602506281629333177027704798069522455806177708556852756692341281267078419473323939938196300261349249844uwb, + 34099204187046170921511393567690620643856679870121903412545567510502014273081623781684214852562822343760228918685024070983005024483424026237793838354204070380961780255948800uwb, + 7753261385697935775513404580053843493227914193567335908607121271075360317145537870074853083807016069786238612933862912310133884712609875859423900318280191272825uwb, + 110004311053786619259986678143505471501869971439303158252331533020072292936027495587470733973742054917424528022233289606593259788774806137554470308009293095009499747765639537uwb, + 96833004631961538015767463838833105015474376492192681907732908245833058438294860656404685183010591497179132293246891860908865398765545161691520277203799562157174917228796219uwb, + 80702609348091643417538298383109408004428354134511559457823339372643632518010615100071083122949651809745536686693833088575054309697466950053942939485340693253073606951812769uwb, + 33407553983903825388268227905051448847634610694178184538233348977258089995501154824364933504268463263804419263252997491873433785923300213087774501277469095977333397324099995uwb, + 0uwb + }; + int j[2]; + unsigned _BitInt(575) a + = 37458390908651944486318701298774946253221298284079678879752196062749754015767054813622389341442171327838532365078549465402085621913002861059272532398763941224574356382919877uwb; + s575[1].d = 95573020206290249524150023772890126071219633117171019262766503336310672999410172030736216511031014256906040106668955921896748704905692143264499542165901631357858279597168868uwb; + test575 (a, b, 0, &j[0]); + if (s575[0].c != 71835056112914750846225746791835613082740285561642802348494468629675719606761159266011893596664019145187589550627068973430325671456228503438760044269704956730966806603380315uwb + || s575[0].d != 35092678436051398145450456092160957085574382283207240091541444540207322324444176804583959098631686867119531362746451350477963519431922701372937009164511004298364112449348870uwb + || j[0] != 1 + || j[1] != 0 + || v575 != 120580345083639585750930824492596512776957310040924930453399446803675850592937927405158602701611708600515436512352934022368303364316156350983442305043074396650200668207530235uwb + || b[10] != 110004311053786619259986678143505471501869971439303158252331533020072292936027495587470733973742054917424528022233289606593259788774806137554470308009293095009499747765639537uwb + || b[12] != 90257646752648441641983032604772146169931063856427735418798179069190522557764778760793267026353059230994416449755072177802248731230075391895998576273477487980969988750249572uwb + || b[14] != 90257646752648441641983032604772146169931063856427735418798179069190522557764778760793267026353059230994416449755072177802248731230075391895998576273477487980969988750249573uwb) + __builtin_abort (); + static unsigned _BitInt(575) c[] = { + 82504361427244542991820094956691549960754114745978822099335511938351682595536290531725259255179129363075052806202441257721202109466202003805606931995490008444343669600699853uwb, + 42079105016133747306704896727331693360594255070597992997150557389990664988368628699356162986776491822580146238976269442994821141806156379826188754250358560351182286381406736uwb, + 711769802844526498820507696850878181897548931161560217731770512934668229904523420294613194965001881326982097300327085293326593185529346399uwb, + 89175170277971754813127791070754356690231836881294855904530631438372575707050409381165002268066908066508189405070930638781220028058233443902931422213686026604811589591935872uwb, + 94050888747959189678836802993335292608994888939368012114118213842817585341848237784852826131167319219605431056321492019432538459246136124892413917192336008119041481208682712uwb, + 38239296209217737134837463059250986563276353222124626638871007389306434648840299613965667293607942327919361664341059433984563767109851991087195673676603874741464175459967356uwb, + 97333559006669714102408081289832637446384482871277430301688457830360630424953635234987417481437096537137502568526675247478692954009451991021793982942577536513823999917011895uwb, + 814058611482863339892667997284732764996205177020902937843791947020441701239100773171893112609065674118654895982160611994461705590872496334948674479714606751038741393040439uwb, + 97705579217072075210280690501837541720113857756901619907589735305607760170945080008347962500870233338612695073361639697585534957702253004388475713115759324045158713339246602uwb, + 10982982241715500518624383020617613623499620192753751475894180095116406586056643710374985626416110420394932716762424522515613555006307631143920933236927136144852926571503121uwb, + 55829504657908340201404797796793782979617205764045686020250304202907511578861596703885712251150659580577184194460916884943183841026041393794213790496185940144912189048827888uwb, + 100875306823715847300644682553337559470837966294108010157772959400031914000172409603541204719305055682465391367527242389796209306256295618004852296452270010541263847504922010uwb, + 15279010635266215057483690428202871735658936908535846754770399078825578981747757698046709583412828936255448971025234637952103022364332558473695317217263761931457640744952794uwb, + 48444770867335255303325633099437372188650970089231857000193390748362558989590160188759337817835818168773038925935268431818011879469195339807606486208276196817195956747180163uwb, + 0uwb + }; + a = 8297086167455412951314345399041666622690871902388991853000149614722648899348042581378229717518281695539366926410544760114561024579207473131456671312516393uwb; + s575[1].d = 4522353484324747955267125937291948655749617973066893955369024131525488299108320993071208813642361430492411037439152575330738596343613170269621629934531241uwb; + test575 (a, c, 0, &j[0]); + if (s575[0].c != 74915286869691307910535753931416633675608326651216782655214347437885792615716349010228495093791076801730572987413666208183802410598889783023687426699732483562656666028609189uwb + || s575[0].d != 67322626164534684432128142510263628633851970452429406664125475042690110884386765927066456699852665904022478919125681907729713202628765997176929559711053556150174518973540046uwb + || j[0] != 0 + || j[1] != 1 + || v575 != 957446538841628005556782697277372214755225292234338746407969911426093601549542767136921707284650291002859873625214881579964754653531202313001246740598261075986212409306458uwb + || c[10] != 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb + || c[12] != 75220429869217011726925627410386222828914704461374062956838137298086053563675773396398862712785704326025796787072801237857670637684180265176166591342670387141107429327169404uwb + || c[14] != 75220429869217011726925627410386222828914704461374062956838137298086053563675773396398862712785704326025796787072801237857670637684180265176166591342670387141107429327169405uwb) + __builtin_abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 259 + check259 (); +#endif +#if __BITINT_MAXWIDTH__ >= 508 + check508 (); +#endif +#if __BITINT_MAXWIDTH__ >= 512 + check512 (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + check575 (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-7.c.jj 2023-08-08 16:12:02.341939630 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-7.c 2023-08-08 16:12:02.341939630 +0200 @@ -0,0 +1,386 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test135 (unsigned _BitInt(135) *p, unsigned _BitInt(135) *q, + int n1, int n2, int n3, int n4) +{ + p[0] = q[0] << n1; + p[1] = q[1] >> n1; + p[2] = ((_BitInt(135)) q[2]) >> n1; + p[3] = ((_BitInt(135)) q[3]) >> n1; + p[4] = q[0] << n2; + p[5] = q[1] >> n2; + p[6] = ((_BitInt(135)) q[2]) >> n2; + p[7] = ((_BitInt(135)) q[3]) >> n2; + p[8] = q[0] << n3; + p[9] = q[1] >> n3; + p[10] = ((_BitInt(135)) q[2]) >> n3; + p[11] = ((_BitInt(135)) q[3]) >> n3; + p[12] = q[0] << n4; + p[13] = q[1] >> n4; + p[14] = ((_BitInt(135)) q[2]) >> n4; + p[15] = ((_BitInt(135)) q[3]) >> n4; + p[16] = q[0] << 42; + p[17] = q[1] >> 42; + p[18] = ((_BitInt(135)) q[2]) >> 42; + p[19] = ((_BitInt(135)) q[3]) >> 42; + p[20] = q[0] << 64; + p[21] = q[1] >> 64; + p[22] = ((_BitInt(135)) q[2]) >> 64; + p[23] = ((_BitInt(135)) q[3]) >> 64; + p[24] = q[0] << 128; + p[25] = q[1] >> 128; + p[26] = ((_BitInt(135)) q[2]) >> 128; + p[27] = ((_BitInt(135)) q[3]) >> 128; + p[28] = q[0] << 134; + p[29] = q[1] >> 134; + p[30] = ((_BitInt(135)) q[2]) >> 134; + p[31] = ((_BitInt(135)) q[3]) >> 134; + p[32] = 42476074745096429931122498134186165182882uwb << n1; + p[33] = ((unsigned _BitInt(135)) 7182038401320930422841151460488443466941uwb) >> n1; + p[34] = ((_BitInt(135)) 19085908020200472220560502294394961233399uwb) >> n1; + p[35] = ((_BitInt(135)) 22116103719729384017971523177401136866663uwb) >> n1; + p[36] = 42476074745096429931122498134186165182882uwb << n2; + p[37] = ((unsigned _BitInt(135)) 7182038401320930422841151460488443466941uwb) >> n2; + p[38] = ((_BitInt(135)) 19085908020200472220560502294394961233399uwb) >> n2; + p[39] = ((_BitInt(135)) 22116103719729384017971523177401136866663uwb) >> n2; + p[40] = 42476074745096429931122498134186165182882uwb << n3; + p[41] = ((unsigned _BitInt(135)) 7182038401320930422841151460488443466941uwb) >> n3; + p[42] = ((_BitInt(135)) 19085908020200472220560502294394961233399uwb) >> n3; + p[43] = ((_BitInt(135)) 22116103719729384017971523177401136866663uwb) >> n3; + p[44] = 42476074745096429931122498134186165182882uwb << n4; + p[45] = ((unsigned _BitInt(135)) 7182038401320930422841151460488443466941uwb) >> n4; + p[46] = ((_BitInt(135)) 19085908020200472220560502294394961233399uwb) >> n4; + p[47] = ((_BitInt(135)) 22116103719729384017971523177401136866663uwb) >> n4; +} + +__attribute__((noipa)) void +check135 (void) +{ + static unsigned _BitInt(135) q[] = { + 42476074745096429931122498134186165182882uwb, + 7182038401320930422841151460488443466941uwb, + 19085908020200472220560502294394961233399uwb, + 22116103719729384017971523177401136866663uwb + }; + static unsigned _BitInt(135) e[] = { + 42476074745096429931122498134186165182882uwb, + 7182038401320930422841151460488443466941uwb, + 19085908020200472220560502294394961233399uwb, + 22116103719729384017971523177401136866663uwb, + 20575191318237441766935416597984462241792uwb, + 1633006468482774476533711881uwb, + 4339633055724441924339885712uwb, + 43556142965875248422786905315316132038280uwb, + 37177976900770126499921313117382843039744uwb, + 389339081879323596127uwb, + 1034649146967993241391uwb, + 43556142965880123322149682894823775650690uwb, + 0uwb, + 0uwb, + 0uwb, + 43556142965880123323311949751266331066367uwb, + 20575191318237441766935416597984462241792uwb, + 1633006468482774476533711881uwb, + 4339633055724441924339885712uwb, + 43556142965875248422786905315316132038280uwb, + 37177976900770126499921313117382843039744uwb, + 389339081879323596127uwb, + 1034649146967993241391uwb, + 43556142965880123322149682894823775650690uwb, + 11569600475311907757754736652680119189504uwb, + 21uwb, + 56uwb, + 43556142965880123323311949751266331066304uwb, + 0uwb, + 0uwb, + 0uwb, + 43556142965880123323311949751266331066367uwb, + 42476074745096429931122498134186165182882uwb, + 7182038401320930422841151460488443466941uwb, + 19085908020200472220560502294394961233399uwb, + 22116103719729384017971523177401136866663uwb, + 20575191318237441766935416597984462241792uwb, + 1633006468482774476533711881uwb, + 4339633055724441924339885712uwb, + 43556142965875248422786905315316132038280uwb, + 37177976900770126499921313117382843039744uwb, + 389339081879323596127uwb, + 1034649146967993241391uwb, + 43556142965880123322149682894823775650690uwb, + 0uwb, + 0uwb, + 0uwb, + 43556142965880123323311949751266331066367uwb + }; + unsigned _BitInt(135) p[48]; + test135 (p, q, 0, 42, 64, 134); + for (int i = 0; i < 48; ++i) + if (p[i] != e[i]) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 512 +__attribute__((noipa)) void +test512 (unsigned _BitInt(512) *p, unsigned _BitInt(512) *q, + int n1, int n2, int n3, int n4) +{ + p[0] = q[0] << n1; + p[1] = q[1] >> n1; + p[2] = ((_BitInt(512)) q[2]) >> n1; + p[3] = ((_BitInt(512)) q[3]) >> n1; + p[4] = q[0] << n2; + p[5] = q[1] >> n2; + p[6] = ((_BitInt(512)) q[2]) >> n2; + p[7] = ((_BitInt(512)) q[3]) >> n2; + p[8] = q[0] << n3; + p[9] = q[1] >> n3; + p[10] = ((_BitInt(512)) q[2]) >> n3; + p[11] = ((_BitInt(512)) q[3]) >> n3; + p[12] = q[0] << n4; + p[13] = q[1] >> n4; + p[14] = ((_BitInt(512)) q[2]) >> n4; + p[15] = ((_BitInt(512)) q[3]) >> n4; + p[16] = q[0] << 42; + p[17] = q[1] >> 42; + p[18] = ((_BitInt(512)) q[2]) >> 42; + p[19] = ((_BitInt(512)) q[3]) >> 42; + p[20] = q[0] << 128; + p[21] = q[1] >> 128; + p[22] = ((_BitInt(512)) q[2]) >> 128; + p[23] = ((_BitInt(512)) q[3]) >> 128; + p[24] = q[0] << 448; + p[25] = q[1] >> 448; + p[26] = ((_BitInt(512)) q[2]) >> 448; + p[27] = ((_BitInt(512)) q[3]) >> 448; + p[28] = q[0] << 508; + p[29] = q[1] >> 508; + p[30] = ((_BitInt(512)) q[2]) >> 508; + p[31] = ((_BitInt(512)) q[3]) >> 508; + p[32] = 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb << n1; + p[33] = ((unsigned _BitInt(512)) 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb) >> n1; + p[34] = ((_BitInt(512)) 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb) >> n1; + p[35] = ((_BitInt(512)) 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb) >> n1; + p[36] = 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb << n2; + p[37] = ((unsigned _BitInt(512)) 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb) >> n2; + p[38] = ((_BitInt(512)) 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb) >> n2; + p[39] = ((_BitInt(512)) 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb) >> n2; + p[40] = 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb << n3; + p[41] = ((unsigned _BitInt(512)) 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb) >> n3; + p[42] = ((_BitInt(512)) 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb) >> n3; + p[43] = ((_BitInt(512)) 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb) >> n3; + p[44] = 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb << n4; + p[45] = ((unsigned _BitInt(512)) 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb) >> n4; + p[46] = ((_BitInt(512)) 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb) >> n4; + p[47] = ((_BitInt(512)) 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb) >> n4; +} + +__attribute__((noipa)) void +check512 (void) +{ + static unsigned _BitInt(512) q[] = { + 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb, + 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb, + 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb, + 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb + }; + static unsigned _BitInt(512) e[] = { + 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb, + 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb, + 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb, + 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb, + 10218316460994285180012649605314270523237657334799736878274366250937214257494608460860805097020820895335285270507764849854590883398363325859206256763338752uwb, + 2496685507255794194454446853132278798878918827021882395199712741806282457113788753934482872466652415380931962020389152658035575413780272415995uwb, + 13407807929942476349503027617752125851028760573258773505654590291089987162470240268148950606329516537581906483867747705640627526941493352884606809182595733uwb, + 969085030254540147052327290987383773044464127243093048207926179679468140554897112278845487588172918559506186738354258875941458688582335528613uwb, + 4525270648672298630142654159362692277322833548500556080109956060745476990024701673931929946646742265188085348185747949082408104800714710883682097140072448uwb, + 32268903863189288488713934263516911045475287395472229484457927100461194379105000512730600516708300749874729300692099uwb, + 13407807929942597099574024998205846127477805162503433459831226837705045157447168014945448530707208458194409230122434920121875298152320690554956588365115043uwb, + 12525130452217498057057362011967217536814658172404918356180491125021477447649640662315333513294816018260736989782778uwb, + 837987995621412318723376562387865382967460363787024586107722590232610251879596686050117143635431464230626991136655378178359617675746660621652103062880256uwb, + 13uwb, + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095uwb, + 5uwb, + 10218316460994285180012649605314270523237657334799736878274366250937214257494608460860805097020820895335285270507764849854590883398363325859206256763338752uwb, + 2496685507255794194454446853132278798878918827021882395199712741806282457113788753934482872466652415380931962020389152658035575413780272415995uwb, + 13407807929942476349503027617752125851028760573258773505654590291089987162470240268148950606329516537581906483867747705640627526941493352884606809182595733uwb, + 969085030254540147052327290987383773044464127243093048207926179679468140554897112278845487588172918559506186738354258875941458688582335528613uwb, + 4525270648672298630142654159362692277322833548500556080109956060745476990024701673931929946646742265188085348185747949082408104800714710883682097140072448uwb, + 32268903863189288488713934263516911045475287395472229484457927100461194379105000512730600516708300749874729300692099uwb, + 13407807929942597099574024998205846127477805162503433459831226837705045157447168014945448530707208458194409230122434920121875298152320690554956588365115043uwb, + 12525130452217498057057362011967217536814658172404918356180491125021477447649640662315333513294816018260736989782778uwb, + 2707788752018291762501261467556359376968672839961555769866726160891698235759394800413405351174494371110296852192103378240576483613979086982233831308787712uwb, + 15107256420812902421uwb, + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569215784041721807999uwb, + 5863860707758186186uwb, + 837987995621412318723376562387865382967460363787024586107722590232610251879596686050117143635431464230626991136655378178359617675746660621652103062880256uwb, + 13uwb, + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095uwb, + 5uwb, + 9097527363082920087640486649000739646642554439676331761072078127377091353030522027251795224024156478638697322090297961146123620822988442336252791731131761uwb, + 10980538984510266134209038127076610665614456653719209946870695541404134523537659134772423950250404838052362402691773947760040210438889408262830474547160577uwb, + 12876743501477007697566238617479065502697488744690997490715841276784967745445096442239218949897451583348811842533777310497473584791607823667593623282470690uwb, + 4262081036274094578799387151850586986318909215082769698752506214098468276589787535239660955472257640044493313997722061552113957148668088011463028119497203uwb, + 10218316460994285180012649605314270523237657334799736878274366250937214257494608460860805097020820895335285270507764849854590883398363325859206256763338752uwb, + 2496685507255794194454446853132278798878918827021882395199712741806282457113788753934482872466652415380931962020389152658035575413780272415995uwb, + 13407807929942476349503027617752125851028760573258773505654590291089987162470240268148950606329516537581906483867747705640627526941493352884606809182595733uwb, + 969085030254540147052327290987383773044464127243093048207926179679468140554897112278845487588172918559506186738354258875941458688582335528613uwb, + 4525270648672298630142654159362692277322833548500556080109956060745476990024701673931929946646742265188085348185747949082408104800714710883682097140072448uwb, + 32268903863189288488713934263516911045475287395472229484457927100461194379105000512730600516708300749874729300692099uwb, + 13407807929942597099574024998205846127477805162503433459831226837705045157447168014945448530707208458194409230122434920121875298152320690554956588365115043uwb, + 12525130452217498057057362011967217536814658172404918356180491125021477447649640662315333513294816018260736989782778uwb, + 837987995621412318723376562387865382967460363787024586107722590232610251879596686050117143635431464230626991136655378178359617675746660621652103062880256uwb, + 13uwb, + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084095uwb, + 5uwb + }; + unsigned _BitInt(512) p[48]; + test512 (p, q, 0, 42, 128, 508); + for (int i = 0; i < 48; ++i) + if (p[i] != e[i]) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test575 (unsigned _BitInt(575) *p, unsigned _BitInt(575) *q, + int n1, int n2, int n3, int n4) +{ + p[0] = q[0] << n1; + p[1] = q[1] >> n1; + p[2] = ((_BitInt(575)) q[2]) >> n1; + p[3] = ((_BitInt(575)) q[3]) >> n1; + p[4] = q[0] << n2; + p[5] = q[1] >> n2; + p[6] = ((_BitInt(575)) q[2]) >> n2; + p[7] = ((_BitInt(575)) q[3]) >> n2; + p[8] = q[0] << n3; + p[9] = q[1] >> n3; + p[10] = ((_BitInt(575)) q[2]) >> n3; + p[11] = ((_BitInt(575)) q[3]) >> n3; + p[12] = q[0] << n4; + p[13] = q[1] >> n4; + p[14] = ((_BitInt(575)) q[2]) >> n4; + p[15] = ((_BitInt(575)) q[3]) >> n4; + p[16] = q[0] << 42; + p[17] = q[1] >> 42; + p[18] = ((_BitInt(575)) q[2]) >> 42; + p[19] = ((_BitInt(575)) q[3]) >> 42; + p[20] = q[0] << 192; + p[21] = q[1] >> 192; + p[22] = ((_BitInt(575)) q[2]) >> 192; + p[23] = ((_BitInt(575)) q[3]) >> 192; + p[24] = q[0] << 512; + p[25] = q[1] >> 512; + p[26] = ((_BitInt(575)) q[2]) >> 512; + p[27] = ((_BitInt(575)) q[3]) >> 512; + p[28] = q[0] << 571; + p[29] = q[1] >> 571; + p[30] = ((_BitInt(575)) q[2]) >> 571; + p[31] = ((_BitInt(575)) q[3]) >> 571; + p[32] = 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb << n1; + p[33] = ((unsigned _BitInt(575)) 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb) >> n1; + p[34] = ((_BitInt(575)) 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb) >> n1; + p[35] = ((_BitInt(575)) 146719349625858150924070326030117352429884uwb) >> n1; + p[36] = 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb << n2; + p[37] = ((unsigned _BitInt(575)) 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb) >> n2; + p[38] = ((_BitInt(575)) 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb) >> n2; + p[39] = ((_BitInt(575)) 146719349625858150924070326030117352429884uwb) >> n2; + p[40] = 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb << n3; + p[41] = ((unsigned _BitInt(575)) 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb) >> n3; + p[42] = ((_BitInt(575)) 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb) >> n3; + p[43] = ((_BitInt(575)) 146719349625858150924070326030117352429884uwb) >> n3; + p[44] = 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb << n4; + p[45] = ((unsigned _BitInt(575)) 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb) >> n4; + p[46] = ((_BitInt(575)) 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb) >> n4; + p[47] = ((_BitInt(575)) 146719349625858150924070326030117352429884uwb) >> n4; +} + +__attribute__((noipa)) void +check575 (void) +{ + static unsigned _BitInt(575) q[] = { + 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb, + 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb, + 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb, + 146719349625858150924070326030117352429884uwb + }; + static unsigned _BitInt(575) e[] = { + 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb, + 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb, + 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb, + 146719349625858150924070326030117352429884uwb, + 101455192616810418556035937342706675871010989953664553100414183440061081538258837413103429652228409332846843840874129218733451063018756151973814520650589185972971648957022208uwb, + 9426705271486518506775721962796496212479581187376392961820308506521488593386399890224411040421708368266404866319586947893875853523246846167443285623443607687449uwb, + 123665200736549141698114476634013378335753822194910362276561280288452288465223455053720457123832123393578819366656336301874379580455931868022178318582504526998711692029382704uwb, + 33360117783071962304363825303uwb, + 119335782055317388350429004017843053262176261916736710874511715722133065797591485333905865472877802228449910525321848531626543800663717410928997924003288981168896718112030720uwb, + 6604813810288358087498962398528278947817002383742106838987637054195488521780512729133747937326520831885279330684711uwb, + 123665200736552267030251260509823595017565674550605919957029338284886722431114354919535001603397736344270114443080692270543186446588141616503700255078449149331258830163424370uwb, + 0uwb, + 15458150092069033378781407563727949377195709318825739994628941005806076569158241698144775066327690311849854464126008708709460314644171950622971634693868322994787923259293696uwb, + 5uwb, + 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349566uwb, + 0uwb, + 101455192616810418556035937342706675871010989953664553100414183440061081538258837413103429652228409332846843840874129218733451063018756151973814520650589185972971648957022208uwb, + 9426705271486518506775721962796496212479581187376392961820308506521488593386399890224411040421708368266404866319586947893875853523246846167443285623443607687449uwb, + 123665200736549141698114476634013378335753822194910362276561280288452288465223455053720457123832123393578819366656336301874379580455931868022178318582504526998711692029382704uwb, + 33360117783071962304363825303uwb, + 119335782055317388350429004017843053262176261916736710874511715722133065797591485333905865472877802228449910525321848531626543800663717410928997924003288981168896718112030720uwb, + 6604813810288358087498962398528278947817002383742106838987637054195488521780512729133747937326520831885279330684711uwb, + 123665200736552267030251260509823595017565674550605919957029338284886722431114354919535001603397736344270114443080692270543186446588141616503700255078449149331258830163424370uwb, + 0uwb, + 71526316958236649113771106427618495658375006450241431334816139660708009688265701502532725246129480508017794237793207540593595178136921012216679830157648896249487052159057920uwb, + 3092160064277148905uwb, + 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946582933127893402865396uwb, + 0uwb, + 15458150092069033378781407563727949377195709318825739994628941005806076569158241698144775066327690311849854464126008708709460314644171950622971634693868322994787923259293696uwb, + 5uwb, + 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349566uwb, + 0uwb, + 113324867609914841703175642134276622099380829892372739396576941405077427208321982380320777205398087845718962965838410365091485839739660235868692128339145588495862488649829794uwb, + 41459088230466967850496491762687877054451372305979858752985908904079765739347588525764439571939913205917422711129986893243036538436025937944895336127976720299879937518567087uwb, + 109919844636328732719844961828946648695154594766841929826820254974351382414676962372262457317295280532708618631627677422093887137875656283935370428037454681114775307971502401uwb, + 146719349625858150924070326030117352429884uwb, + 101455192616810418556035937342706675871010989953664553100414183440061081538258837413103429652228409332846843840874129218733451063018756151973814520650589185972971648957022208uwb, + 9426705271486518506775721962796496212479581187376392961820308506521488593386399890224411040421708368266404866319586947893875853523246846167443285623443607687449uwb, + 123665200736549141698114476634013378335753822194910362276561280288452288465223455053720457123832123393578819366656336301874379580455931868022178318582504526998711692029382704uwb, + 33360117783071962304363825303uwb, + 119335782055317388350429004017843053262176261916736710874511715722133065797591485333905865472877802228449910525321848531626543800663717410928997924003288981168896718112030720uwb, + 6604813810288358087498962398528278947817002383742106838987637054195488521780512729133747937326520831885279330684711uwb, + 123665200736552267030251260509823595017565674550605919957029338284886722431114354919535001603397736344270114443080692270543186446588141616503700255078449149331258830163424370uwb, + 0uwb, + 15458150092069033378781407563727949377195709318825739994628941005806076569158241698144775066327690311849854464126008708709460314644171950622971634693868322994787923259293696uwb, + 5uwb, + 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349566uwb, + 0uwb + }; + unsigned _BitInt(575) p[48]; + test575 (p, q, 0, 42, 192, 571); + for (int i = 0; i < 48; ++i) + if (p[i] != e[i]) + __builtin_abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + check135 (); +#endif +#if __BITINT_MAXWIDTH__ >= 512 + check512 (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + check575 (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-8.c.jj 2023-08-08 16:12:02.341939630 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-8.c 2023-08-08 16:12:02.341939630 +0200 @@ -0,0 +1,391 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +__attribute__((noipa)) void +foo (int *p) +{ + *p = 1; +} + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test135 (unsigned _BitInt(135) *p, _BitInt(135) *q, int *r, int i, int j, int k) +{ + int l; + for (l = 0; l < 15; ++l) + { + r[l * 4] = p[l * 2] < p[l * 2 + 1]; + r[l * 4 + 1] = p[l * 2 + i] <= p[l * 2 + 1 + i]; + r[l * 4 + 2] = p[l * 2 + j] > p[l * 2 + 1 + j]; + r[l * 4 + 3] = p[l * 2 + k] >= p[l * 2 + 1 + k]; + } + r[60] = 0; + if (p[30] < p[31]) + foo (r + 60); + r[61] = 0; + if (p[30 + i] <= p[31 + i]) + foo (r + 61); + r[62] = 0; + if (p[30 + j] > p[31 + j]) + foo (r + 62); + r[63] = 0; + if (p[30 + k] >= p[31 + k]) + foo (r + 63); + for (l = 0; l < 15; ++l) + { + r[64 + l * 4] = q[l * 2] < q[l * 2 + 1]; + r[64 + l * 4 + 1] = q[l * 2 + i] <= q[l * 2 + 1 + i]; + r[64 + l * 4 + 2] = q[l * 2 + j] > q[l * 2 + 1 + j]; + r[64 + l * 4 + 3] = q[l * 2 + k] >= q[l * 2 + 1 + k]; + } + r[124] = 0; + if (q[30] < q[31]) + foo (r + 124); + r[125] = 0; + if (q[30 + i] <= q[31 + i]) + foo (r + 125); + r[126] = 0; + if (q[30 + j] > q[31 + j]) + foo (r + 126); + r[127] = 0; + if (q[30 + k] >= q[31 + k]) + foo (r + 127); + r[128] = p[1] > 6186175750610900443940276860313653051587uwb; + r[129] = p[1 + i] >= 6186175750610900443940276860313653051587uwb; + r[130] = p[1 + j] < 6186175750610900443940276860313653051587uwb; + r[131] = p[1 + k] <= 6186175750610900443940276860313653051587uwb; + r[132] = p[9] > 532538687817519087313655352171198726194uwb; + r[133] = p[9 + i] >= 532538687817519087313655352171198726194uwb; + r[134] = p[9 + j] < 532538687817519087313655352171198726194uwb; + r[135] = p[9 + k] <= 532538687817519087313655352171198726194uwb; + r[136] = p[26] > 21437789116019123198192600268201397321728uwb; + r[137] = p[26 + i] >= 21437789116019123198192600268201397321728uwb; + r[138] = p[26 + j] < 21437789116019123198192600268201397321728uwb; + r[139] = p[26 + k] <= 21437789116019123198192600268201397321728uwb; + r[140] = 0; + if (p[27] > 21437789116019123198192600268201397321728uwb) + foo (r + 140); + r[141] = 0; + if (p[27 + i] >= 21437789116019123198192600268201397321728uwb) + foo (r + 141); + r[142] = 0; + if (p[27 + j] < 21437789116019123198192600268201397321728uwb) + foo (r + 142); + r[143] = 0; + if (p[27 + k] <= 21437789116019123198192600268201397321728uwb) + foo (r + 143); + r[144] = q[1] > -16254965323536794558278256870539623121621wb; + r[145] = q[1 + i] >= -16254965323536794558278256870539623121621wb; + r[146] = q[1 + j] < -16254965323536794558278256870539623121621wb; + r[147] = q[1 + k] <= -16254965323536794558278256870539623121621wb; + r[148] = q[9] > 18613347261447279579326452222842126033978wb; + r[149] = q[9 + i] >= 18613347261447279579326452222842126033978wb; + r[150] = q[9 + j] < 18613347261447279579326452222842126033978wb; + r[151] = q[9 + k] <= 18613347261447279579326452222842126033978wb; + r[152] = q[26] > -17354400712967861636632104979020178784256wb; + r[153] = q[26 + i] >= -17354400712967861636632104979020178784256wb; + r[154] = q[26 + j] < -17354400712967861636632104979020178784256wb; + r[155] = q[26 + k] <= -17354400712967861636632104979020178784256wb; + r[156] = 0; + if (q[27] > -17354400712967861636632104979020178784256wb) + foo (r + 156); + r[157] = 0; + if (q[27 + i] >= -17354400712967861636632104979020178784256wb) + foo (r + 157); + r[158] = 0; + if (q[27 + j] < -17354400712967861636632104979020178784256wb) + foo (r + 158); + r[159] = 0; + if (q[27 + k] <= -17354400712967861636632104979020178784256wb) + foo (r + 159); +} + +__attribute__((noipa)) void +check135 (void) +{ + static unsigned _BitInt(135) p[] = { + 6186175750610900443940276860313653051587uwb, + 1185851028480769106318384044302924011586uwb, + 2130297273067766631305678853840898568773uwb, + 41295820948916414032635520696820459346946uwb, + 37051876633129642187163899121207069631425uwb, + 15692033609114144435279308788278869814829uwb, + 34806164389591686493621017551199759953285uwb, + 39807523118275305743074861168614282970261uwb, + 532538687817519087313655352171198726194uwb, + 532538687817519087313655352171198726194uwb - 1, + 24327491730922412594497820631861542598095uwb, + 24327491730922412594497820631861542598095uwb + 1, + 19767147107472646435672732641055578521600uwb, + 19767147107472646435672732641055578521600uwb - 18446744073709551616uwb, + 19767147107472646435672732641055578521600uwb, + 19767147107472646435672732641055578521600uwb - 1, + 19767147107472646435672732641055578521600uwb, + 19767147107472646435672732641055578521600uwb + 1, + 19767147107472646435672732641055578521600uwb, + 19767147107472646435672732641055578521600uwb, + 21437789116019123198192600268201397321728uwb, + 21437789116019123198192600268201397321728uwb - 340282366920938463463374607431768211456uwb, + 21437789116019123198192600268201397321728uwb, + 21437789116019123198192600268201397321728uwb + 340282366920938463463374607431768211456uwb, + 21437789116019123198192600268201397321728uwb, + 21437789116019123198192600268201397321728uwb - 1, + 21437789116019123198192600268201397321728uwb, + 21437789116019123198192600268201397321728uwb + 1, + 21437789116019123198192600268201397321728uwb, + 21437789116019123198192600268201397321728uwb, + 40857776145745083896508605528597836546969uwb, + 40857776145745083896508605528597836546969uwb + }; + static _BitInt(135) q[] = { + -16254965323536794558278256870539623121621wb, + 3211106991591472362840917277276886624653wb, + -11957968557477998661714306628455379156870wb, + 573207689638265971114859293369887620578wb, + 13215265693976315010419972479490962566290wb, + -14420717597022955156949317923525514408615wb, + 9945875060497908168424655458843572357117wb, + 17414314981046040218358459297638362112560wb, + 18613347261447279579326452222842126033978wb, + 18613347261447279579326452222842126033978wb - 1, + -7726660695587525737931429184041790718605wb, + -7726660695587525737931429184041790718605wb + 1, + 10658663373399224161452650292046381187072wb, + 10658663373399224161452650292046381187072wb - 18446744073709551616wb, + 10658663373399224161452650292046381187072wb, + 10658663373399224161452650292046381187072wb - 1, + 10658663373399224161452650292046381187072wb, + 10658663373399224161452650292046381187072wb + 1, + 10658663373399224161452650292046381187072wb, + 10658663373399224161452650292046381187072wb, + -17354400712967861636632104979020178784256wb, + -17354400712967861636632104979020178784256wb - 340282366920938463463374607431768211456wb, + -17354400712967861636632104979020178784256wb, + -17354400712967861636632104979020178784256wb + 340282366920938463463374607431768211456wb, + -17354400712967861636632104979020178784256wb, + -17354400712967861636632104979020178784256wb - 1, + -17354400712967861636632104979020178784256wb, + -17354400712967861636632104979020178784256wb + 1, + -17354400712967861636632104979020178784256wb, + -17354400712967861636632104979020178784256wb, + -9715765131124575245669270443035217820180wb, + -9715765131124575245669270443035217820180wb + }; + int r[160]; + static int e[160] = { + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + }; + test135 (p, q, r, 0, 0, 0); + for (int i = 0; i < 160; ++i) + if (r[i] != e[i]) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) void +test192 (unsigned _BitInt(192) *p, _BitInt(192) *q, int *r, int i, int j, int k) +{ + int l; + for (l = 0; l < 15; ++l) + { + r[l * 4] = p[l * 2] < p[l * 2 + 1]; + r[l * 4 + 1] = p[l * 2 + i] <= p[l * 2 + 1 + i]; + r[l * 4 + 2] = p[l * 2 + j] > p[l * 2 + 1 + j]; + r[l * 4 + 3] = p[l * 2 + k] >= p[l * 2 + 1 + k]; + } + r[60] = 0; + if (p[30] < p[31]) + foo (r + 60); + r[61] = 0; + if (p[30 + i] <= p[31 + i]) + foo (r + 61); + r[62] = 0; + if (p[30 + j] > p[31 + j]) + foo (r + 62); + r[63] = 0; + if (p[30 + k] >= p[31 + k]) + foo (r + 63); + for (l = 0; l < 15; ++l) + { + r[64 + l * 4] = q[l * 2] < q[l * 2 + 1]; + r[64 + l * 4 + 1] = q[l * 2 + i] <= q[l * 2 + 1 + i]; + r[64 + l * 4 + 2] = q[l * 2 + j] > q[l * 2 + 1 + j]; + r[64 + l * 4 + 3] = q[l * 2 + k] >= q[l * 2 + 1 + k]; + } + r[124] = 0; + if (q[30] < q[31]) + foo (r + 124); + r[125] = 0; + if (q[30 + i] <= q[31 + i]) + foo (r + 125); + r[126] = 0; + if (q[30 + j] > q[31 + j]) + foo (r + 126); + r[127] = 0; + if (q[30 + k] >= q[31 + k]) + foo (r + 127); + r[128] = p[1] > 1301676158706974885001669913388788249117177822518209770103uwb; + r[129] = p[1 + i] >= 1301676158706974885001669913388788249117177822518209770103uwb; + r[130] = p[1 + j] < 1301676158706974885001669913388788249117177822518209770103uwb; + r[131] = p[1 + k] <= 1301676158706974885001669913388788249117177822518209770103uwb; + r[132] = p[9] > 4156228030920822065505406977886113255775912982125511770811uwb; + r[133] = p[9 + i] >= 4156228030920822065505406977886113255775912982125511770811uwb; + r[134] = p[9 + j] < 4156228030920822065505406977886113255775912982125511770811uwb; + r[135] = p[9 + k] <= 4156228030920822065505406977886113255775912982125511770811uwb; + r[136] = p[26] > 2105720889788939126298431571815399749254098004540680830976uwb; + r[137] = p[26 + i] >= 2105720889788939126298431571815399749254098004540680830976uwb; + r[138] = p[26 + j] < 2105720889788939126298431571815399749254098004540680830976uwb; + r[139] = p[26 + k] <= 2105720889788939126298431571815399749254098004540680830976uwb; + r[140] = 0; + if (p[27] > 2105720889788939126298431571815399749254098004540680830976uwb) + foo (r + 140); + r[141] = 0; + if (p[27 + i] >= 2105720889788939126298431571815399749254098004540680830976uwb) + foo (r + 141); + r[142] = 0; + if (p[27 + j] < 2105720889788939126298431571815399749254098004540680830976uwb) + foo (r + 142); + r[143] = 0; + if (p[27 + k] <= 2105720889788939126298431571815399749254098004540680830976uwb) + foo (r + 143); + r[144] = q[1] > 1979551028038258779576810033088645171455206196499080052958wb; + r[145] = q[1 + i] >= 1979551028038258779576810033088645171455206196499080052958wb; + r[146] = q[1 + j] < 1979551028038258779576810033088645171455206196499080052958wb; + r[147] = q[1 + k] <= 1979551028038258779576810033088645171455206196499080052958wb; + r[148] = q[9] > -1885318755168553153865626302112859755681798781213110674779wb; + r[149] = q[9 + i] >= -1885318755168553153865626302112859755681798781213110674779wb; + r[150] = q[9 + j] < -1885318755168553153865626302112859755681798781213110674779wb; + r[151] = q[9 + k] <= -1885318755168553153865626302112859755681798781213110674779wb; + r[152] = q[26] > 2339763120586619043754378424358306157273374438118242910208wb; + r[153] = q[26 + i] >= 2339763120586619043754378424358306157273374438118242910208wb; + r[154] = q[26 + j] < 2339763120586619043754378424358306157273374438118242910208wb; + r[155] = q[26 + k] <= 2339763120586619043754378424358306157273374438118242910208wb; + r[156] = 0; + if (q[27] > 2339763120586619043754378424358306157273374438118242910208wb) + foo (r + 156); + r[157] = 0; + if (q[27 + i] >= 2339763120586619043754378424358306157273374438118242910208wb) + foo (r + 157); + r[158] = 0; + if (q[27 + j] < 2339763120586619043754378424358306157273374438118242910208wb) + foo (r + 158); + r[159] = 0; + if (q[27 + k] <= 2339763120586619043754378424358306157273374438118242910208wb) + foo (r + 159); +} + +__attribute__((noipa)) void +check192 (void) +{ + static unsigned _BitInt(192) p[] = { + 1301676158706974885001669913388788249117177822518209770103uwb, + 747337726037626556190542632789198678519387021556252140610uwb, + 3725653947307680330137362665700857624320118783723331730354uwb, + 5392755653771808504964234887707929379898418126658160517063uwb, + 909108582379360036592925704487999488985548889672948755121uwb, + 1640061693011887757120264107651184372780544025461004778485uwb, + 1730451763775632602140993282640477950273220311662029360199uwb, + 5445606583665251502205919499903327925600190799372595230746uwb, + 4156228030920822065505406977886113255775912982125511770811uwb, + 4156228030920822065505406977886113255775912982125511770811uwb - 1, + 4265142937033285044176150866007262334836422938393615775285uwb, + 4265142937033285044176150866007262334836422938393615775285uwb + 1, + 5906690378849769161966354556531052466604912051358709841920uwb, + 5906690378849769161966354556531052466604912051358709841920uwb - 18446744073709551616uwb, + 5906690378849769161966354556531052466604912051358709841920uwb, + 5906690378849769161966354556531052466604912051358709841920uwb - 1, + 5906690378849769161966354556531052466604912051358709841920uwb, + 5906690378849769161966354556531052466604912051358709841920uwb + 1, + 5906690378849769161966354556531052466604912051358709841920uwb, + 5906690378849769161966354556531052466604912051358709841920uwb, + 2105720889788939126298431571815399749254098004540680830976uwb, + 2105720889788939126298431571815399749254098004540680830976uwb - 340282366920938463463374607431768211456uwb, + 2105720889788939126298431571815399749254098004540680830976uwb, + 2105720889788939126298431571815399749254098004540680830976uwb + 340282366920938463463374607431768211456uwb, + 2105720889788939126298431571815399749254098004540680830976uwb, + 2105720889788939126298431571815399749254098004540680830976uwb - 1, + 2105720889788939126298431571815399749254098004540680830976uwb, + 2105720889788939126298431571815399749254098004540680830976uwb + 1, + 2105720889788939126298431571815399749254098004540680830976uwb, + 2105720889788939126298431571815399749254098004540680830976uwb, + 3158000566128353648045936726901376808119543972196705250436uwb, + 3158000566128353648045936726901376808119543972196705250436uwb + }; + static _BitInt(192) q[] = { + 1979551028038258779576810033088645171455206196499080052958wb, + -2365185798961627132333096424325796455553365108690644933803wb, + -72665485213084327598421838628274737858136897938197299611wb, + -2684371926785696941292431816009231520283744219656369376907wb, + 2328570543620873568764731049988092721657822189058449467691wb, + 1166480801277674369406023216484203046859890984318705969207wb, + 2554342282302399647952757689834517321971737916674443522004wb, + -844209391020771146100885710857828304368226088928768368272wb, + -1885318755168553153865626302112859755681798781213110674779wb, + -1885318755168553153865626302112859755681798781213110674779wb - 1, + -2489570249266057242333359792314407344590632488455880158241wb, + -2489570249266057242333359792314407344590632488455880158241wb + 1, + -1791854374279093549336635324484455337109530403038654627840wb, + -1791854374279093549336635324484455337109530403038654627840wb - 18446744073709551616wb, + -1791854374279093549336635324484455337109530403038654627840wb, + -1791854374279093549336635324484455337109530403038654627840wb - 1, + -1791854374279093549336635324484455337109530403038654627840wb, + -1791854374279093549336635324484455337109530403038654627840wb + 1, + -1791854374279093549336635324484455337109530403038654627840wb, + -1791854374279093549336635324484455337109530403038654627840wb, + 2339763120586619043754378424358306157273374438118242910208wb, + 2339763120586619043754378424358306157273374438118242910208wb - 340282366920938463463374607431768211456wb, + 2339763120586619043754378424358306157273374438118242910208wb, + 2339763120586619043754378424358306157273374438118242910208wb + 340282366920938463463374607431768211456wb, + 2339763120586619043754378424358306157273374438118242910208wb, + 2339763120586619043754378424358306157273374438118242910208wb - 1, + 2339763120586619043754378424358306157273374438118242910208wb, + 2339763120586619043754378424358306157273374438118242910208wb + 1, + 2339763120586619043754378424358306157273374438118242910208wb, + 2339763120586619043754378424358306157273374438118242910208wb, + -3052391096360403193678321062607799919228465512652019987951wb, + -3052391096360403193678321062607799919228465512652019987951wb + }; + int r[160]; + static int e[160] = { + 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0 + }; + test192 (p, q, r, 0, 0, 0); + for (int i = 0; i < 160; ++i) + if (r[i] != e[i]) + __builtin_abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + check135 (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + check192 (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-9.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-9.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,391 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +__attribute__((noipa)) void +foo (int *p) +{ + *p = 1; +} + +#if __BITINT_MAXWIDTH__ >= 512 +__attribute__((noipa)) void +test512 (unsigned _BitInt(512) *p, _BitInt(512) *q, int *r, int i, int j, int k) +{ + int l; + for (l = 0; l < 15; ++l) + { + r[l * 4] = p[l * 2] < p[l * 2 + 1]; + r[l * 4 + 1] = p[l * 2 + i] <= p[l * 2 + 1 + i]; + r[l * 4 + 2] = p[l * 2 + j] > p[l * 2 + 1 + j]; + r[l * 4 + 3] = p[l * 2 + k] >= p[l * 2 + 1 + k]; + } + r[60] = 0; + if (p[30] < p[31]) + foo (r + 60); + r[61] = 0; + if (p[30 + i] <= p[31 + i]) + foo (r + 61); + r[62] = 0; + if (p[30 + j] > p[31 + j]) + foo (r + 62); + r[63] = 0; + if (p[30 + k] >= p[31 + k]) + foo (r + 63); + for (l = 0; l < 15; ++l) + { + r[64 + l * 4] = q[l * 2] < q[l * 2 + 1]; + r[64 + l * 4 + 1] = q[l * 2 + i] <= q[l * 2 + 1 + i]; + r[64 + l * 4 + 2] = q[l * 2 + j] > q[l * 2 + 1 + j]; + r[64 + l * 4 + 3] = q[l * 2 + k] >= q[l * 2 + 1 + k]; + } + r[124] = 0; + if (q[30] < q[31]) + foo (r + 124); + r[125] = 0; + if (q[30 + i] <= q[31 + i]) + foo (r + 125); + r[126] = 0; + if (q[30 + j] > q[31 + j]) + foo (r + 126); + r[127] = 0; + if (q[30 + k] >= q[31 + k]) + foo (r + 127); + r[128] = p[1] > 6439347061437255154344143895240926184374246647113289384213701629724754669640618959339573646567333876513773564431668184949351528059730009728584631317244784uwb; + r[129] = p[1 + i] >= 6439347061437255154344143895240926184374246647113289384213701629724754669640618959339573646567333876513773564431668184949351528059730009728584631317244784uwb; + r[130] = p[1 + j] < 6439347061437255154344143895240926184374246647113289384213701629724754669640618959339573646567333876513773564431668184949351528059730009728584631317244784uwb; + r[131] = p[1 + k] <= 6439347061437255154344143895240926184374246647113289384213701629724754669640618959339573646567333876513773564431668184949351528059730009728584631317244784uwb; + r[132] = p[9] > 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb; + r[133] = p[9 + i] >= 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb; + r[134] = p[9 + j] < 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb; + r[135] = p[9 + k] <= 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb; + r[136] = p[26] > 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb; + r[137] = p[26 + i] >= 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb; + r[138] = p[26 + j] < 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb; + r[139] = p[26 + k] <= 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb; + r[140] = 0; + if (p[27] > 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb) + foo (r + 140); + r[141] = 0; + if (p[27 + i] >= 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb) + foo (r + 141); + r[142] = 0; + if (p[27 + j] < 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb) + foo (r + 142); + r[143] = 0; + if (p[27 + k] <= 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb) + foo (r + 143); + r[144] = q[1] > 2090630783083976726560608899307022527212315311978198188753257152565888263284874347844598962661131937985796633260411082466462809997821330828145983020205878wb; + r[145] = q[1 + i] >= 2090630783083976726560608899307022527212315311978198188753257152565888263284874347844598962661131937985796633260411082466462809997821330828145983020205878wb; + r[146] = q[1 + j] < 2090630783083976726560608899307022527212315311978198188753257152565888263284874347844598962661131937985796633260411082466462809997821330828145983020205878wb; + r[147] = q[1 + k] <= 2090630783083976726560608899307022527212315311978198188753257152565888263284874347844598962661131937985796633260411082466462809997821330828145983020205878wb; + r[148] = q[9] > -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb; + r[149] = q[9 + i] >= -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb; + r[150] = q[9 + j] < -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb; + r[151] = q[9 + k] <= -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb; + r[152] = q[26] > 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb; + r[153] = q[26 + i] >= 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb; + r[154] = q[26 + j] < 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb; + r[155] = q[26 + k] <= 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb; + r[156] = 0; + if (q[27] > 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb) + foo (r + 156); + r[157] = 0; + if (q[27 + i] >= 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb) + foo (r + 157); + r[158] = 0; + if (q[27 + j] < 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb) + foo (r + 158); + r[159] = 0; + if (q[27 + k] <= 3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb) + foo (r + 159); +} + +__attribute__((noipa)) void +check512 (void) +{ + static unsigned _BitInt(512) p[] = { + 6439347061437255154344143895240926184374246647113289384213701629724754669640618959339573646567333876513773564431668184949351528059730009728584631317244784uwb, + 6762041868534283027737681277586698577353418805123389711320743680311823204229693866395914533471197396356562852824213136960386892331859705466032560089589592uwb, + 7100250278744661687919272778464450926810863027145401799102911979534742186567792066709428057992170537490418870754413231800386208987723160090542309342698220uwb, + 7431268529135416278983437544316801791166063098864169546640210976381712748574214253654088092817057535251702063086179197094765059987561230250458545651487418uwb, + 9387962895034579582865984241538651927900235272350318828874682759815638374313243456156983345067518642781984662712425803679907225577643018022275640009873699uwb, + 3166230719682742738348931360884455391542162846555514350392658765013906649241346404508710229903813619084763077863317735446920504536945766338357887078773371uwb, + 11992372489178914246038509566828166672578807653701495597132497332700673199287169715202932677475715468669004681974601325099819634089747001502188758884172602uwb, + 7183772320147988217157628195460873099945185725664709745424293290802245140824151762181161628318220701467892891169914379357484378623421022918276231818933625uwb, + 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb, + 2716607166516370952811015778464637315429428288163165175168021720761495785980681441127279995453132974713988249553556243035771473482679750625718958791524521uwb - 1, + 12641036253945464668613158871576838890244642877026977530604698385615142732677552062689011995329072722635530415107759810021792111602714418929346777947581722uwb, + 12641036253945464668613158871576838890244642877026977530604698385615142732677552062689011995329072722635530415107759810021792111602714418929346777947581722uwb + 1, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb - 18446744073709551616uwb, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb - 1, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb + 1, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb, + 8922448217105188951537312155524913197158477782806467330054048115953920100033906218746035610108190050394196228624539921400738404901092299164323787527159808uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb - 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306816uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb + 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306816uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb - 1, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb + 1, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 419738665353613393951601598131892680944319219800892426789126665343642933931943588470723015570704289785844248033634460199784949778501149813068325535612928uwb, + 10128841244658791126648561211937592176780958236989426886389971194372978046367048331953118621224361972312674509897766160468914015517030880732802761461031257uwb, + 10128841244658791126648561211937592176780958236989426886389971194372978046367048331953118621224361972312674509897766160468914015517030880732802761461031257uwb + }; + static _BitInt(512) q[] = { + 2090630783083976726560608899307022527212315311978198188753257152565888263284874347844598962661131937985796633260411082466462809997821330828145983020205878wb, + 5297891122069759152190358277191301380039917110906456442739988947584072293285648331709545720897009753992228929981833882700804979946892323846480198848327132wb, + -5175455635851811471365509786771967259502175482181487858405840994248880218291771627060836702250940532261110768615360129062649520600089218199000819977507401wb, + -1197417987356054452650938717940723527397958134105969279763141389784758850378928132483783317153283733701258756175700200053452996288076889759098734389999989wb, + 376956342115769081675826480328100204258176592231230579846860212707171684351927919252138022581568644395505257039021425128449272854523981924151678168936546wb, + -3213922658862209387519332343658781663313426526489443455850614508466930839492348067449248688649920694680442694775272326426735943224604674195708324515087099wb, + -26226634446852143139032827542275726163637222096291661272058678439249826123155608154486599937246756733481215161556643451523636377101397790340001692756671wb, + 2387778007768951206967793842263829269147949222877356804856598206833350996940762526208017209413841449433410232587427590886259349063804766729190889440858025wb, + -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb, + -696290237363643551117711996671220443230309432588348036053438948181530078288074148843479004574555088489161912619769067173411081743987060302136728183033248wb - 1, + 5076345582133566846688236290712078493812804531016237797772016838314392198062936803967594662767716104530499878914245621558744394736829525675805759950337585wb, + 5076345582133566846688236290712078493812804531016237797772016838314392198062936803967594662767716104530499878914245621558744394736829525675805759950337585wb + 1, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb - 18446744073709551616wb, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb - 1, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb + 1, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb, + 76333981980921012896605396538225276147251180731694673353838618004648399286703323410022822396010620396184658817947322688521663381589809974158923162189824wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb - 6277101735386680763835789423207666416102355444464034512896wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb + 6277101735386680763835789423207666416102355444464034512896wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb - 1, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb + 1, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -3803169810302811951423866897603196308644585632212248377372707505362914913528085871414141191637221346044389898087027979721998214953093947532239443142377472wb, + -663334509177964622465622357697170286154368667858847871698225590542683746494347453401587549116942795508119009999390315794925881271012501058045923403034199wb, + -663334509177964622465622357697170286154368667858847871698225590542683746494347453401587549116942795508119009999390315794925881271012501058045923403034199wb + }; + int r[160]; + static int e[160] = { + 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1 + }; + test512 (p, q, r, 0, 0, 0); + for (int i = 0; i < 160; ++i) + if (r[i] != e[i]) + __builtin_abort (); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test575 (unsigned _BitInt(575) *p, _BitInt(575) *q, int *r, int i, int j, int k) +{ + int l; + for (l = 0; l < 15; ++l) + { + r[l * 4] = p[l * 2] < p[l * 2 + 1]; + r[l * 4 + 1] = p[l * 2 + i] <= p[l * 2 + 1 + i]; + r[l * 4 + 2] = p[l * 2 + j] > p[l * 2 + 1 + j]; + r[l * 4 + 3] = p[l * 2 + k] >= p[l * 2 + 1 + k]; + } + r[60] = 0; + if (p[30] < p[31]) + foo (r + 60); + r[61] = 0; + if (p[30 + i] <= p[31 + i]) + foo (r + 61); + r[62] = 0; + if (p[30 + j] > p[31 + j]) + foo (r + 62); + r[63] = 0; + if (p[30 + k] >= p[31 + k]) + foo (r + 63); + for (l = 0; l < 15; ++l) + { + r[64 + l * 4] = q[l * 2] < q[l * 2 + 1]; + r[64 + l * 4 + 1] = q[l * 2 + i] <= q[l * 2 + 1 + i]; + r[64 + l * 4 + 2] = q[l * 2 + j] > q[l * 2 + 1 + j]; + r[64 + l * 4 + 3] = q[l * 2 + k] >= q[l * 2 + 1 + k]; + } + r[124] = 0; + if (q[30] < q[31]) + foo (r + 124); + r[125] = 0; + if (q[30 + i] <= q[31 + i]) + foo (r + 125); + r[126] = 0; + if (q[30 + j] > q[31 + j]) + foo (r + 126); + r[127] = 0; + if (q[30 + k] >= q[31 + k]) + foo (r + 127); + r[128] = p[1] > 20670903802240325105911328843875002676780679796965659887810279910476905646991707533359633196332088191362534479568251649420016839659631716684161458660332642627037004465943031uwb; + r[129] = p[1 + i] >= 20670903802240325105911328843875002676780679796965659887810279910476905646991707533359633196332088191362534479568251649420016839659631716684161458660332642627037004465943031uwb; + r[130] = p[1 + j] < 20670903802240325105911328843875002676780679796965659887810279910476905646991707533359633196332088191362534479568251649420016839659631716684161458660332642627037004465943031uwb; + r[131] = p[1 + k] <= 20670903802240325105911328843875002676780679796965659887810279910476905646991707533359633196332088191362534479568251649420016839659631716684161458660332642627037004465943031uwb; + r[132] = p[9] > 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb; + r[133] = p[9 + i] >= 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb; + r[134] = p[9 + j] < 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb; + r[135] = p[9 + k] <= 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb; + r[136] = p[26] > 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb; + r[137] = p[26 + i] >= 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb; + r[138] = p[26 + j] < 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb; + r[139] = p[26 + k] <= 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb; + r[140] = 0; + if (p[27] > 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb) + foo (r + 140); + r[141] = 0; + if (p[27 + i] >= 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb) + foo (r + 141); + r[142] = 0; + if (p[27 + j] < 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb) + foo (r + 142); + r[143] = 0; + if (p[27 + k] <= 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb) + foo (r + 143); + r[144] = q[1] > -16024899825125698861378150913416105280348720287461133876385645855428118759753753693038310256905822130840919293800517449664090240148479686087771461105141796446993957309177045wb; + r[145] = q[1 + i] >= -16024899825125698861378150913416105280348720287461133876385645855428118759753753693038310256905822130840919293800517449664090240148479686087771461105141796446993957309177045wb; + r[146] = q[1 + j] < -16024899825125698861378150913416105280348720287461133876385645855428118759753753693038310256905822130840919293800517449664090240148479686087771461105141796446993957309177045wb; + r[147] = q[1 + k] <= -16024899825125698861378150913416105280348720287461133876385645855428118759753753693038310256905822130840919293800517449664090240148479686087771461105141796446993957309177045wb; + r[148] = q[9] > 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb; + r[149] = q[9 + i] >= 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb; + r[150] = q[9 + j] < 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb; + r[151] = q[9 + k] <= 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb; + r[152] = q[26] > 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb; + r[153] = q[26 + i] >= 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb; + r[154] = q[26 + j] < 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb; + r[155] = q[26 + k] <= 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb; + r[156] = 0; + if (q[27] > 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb) + foo (r + 156); + r[157] = 0; + if (q[27 + i] >= 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb) + foo (r + 157); + r[158] = 0; + if (q[27 + j] < 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb) + foo (r + 158); + r[159] = 0; + if (q[27 + k] <= 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb) + foo (r + 159); +} + +__attribute__((noipa)) void +check575 (void) +{ + static unsigned _BitInt(575) p[] = { + 20670903802240325105911328843875002676780679796965659887810279910476905646991707533359633196332088191362534479568251649420016839659631716684161458660332642627037004465943031uwb, + 49836863281122150110976162564317489099243240060228310477726588559007020237654535886855965503007498301850523952960694293079759086994244623132359873685415478540406438465172529uwb, + 101667739273597064965717829455384743619074292631575734674415300078314703020971656449536574871164441895580568359346194993799527328879777131705988166820718349177377030581506226uwb, + 80233423044307189839832679537616515928636785173353789034947437038572207116613067927657166726935743880478344956088014540963626767254100174497579222671797940959076429057916182uwb, + 97607764806301954960180192904514327019672797546593465640967968069805351962335581135107484573411646213834310418744666537049560033943330633542409774950231074157796998179151769uwb, + 99099235847887185556638324204228969647146126640633556693610768362203817464971524250335424151842349844365719435719612388970493211957199457919255952798632861734037338994194966uwb, + 96074581713567517318016295073161521338909508333544695778644303001677582373061974284621003059876740600584228853347041280615851508249074891807094765318948991008650765902599128uwb, + 15041679461477111400649592642834193580709001861981524454028015552897618001389619787056916841370949982467368838858876017142572779037936015252240846631518852370288984853313032uwb, + 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb, + 3090473864111819272422440709625579853033878497967848058942349684272558230226217367538319212654996864729950831478837556651015327221470111893258987353940473822396493825387378uwb - 1, + 24687788671445747328062841851441115170362216714281949080981056837718636733099501838839343860093294574222940008960321348311574274097362076438265776869659934585082628479484536uwb, + 24687788671445747328062841851441115170362216714281949080981056837718636733099501838839343860093294574222940008960321348311574274097362076438265776869659934585082628479484536uwb + 1,\ + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb - 18446744073709551616uwb, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb - 1, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb + 1, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb, + 47614907307737548529956044769514214288024476724410617147178248001248351816791887941016492346949195777207895982954879948136089705588820700968975703834863097085713265316593664uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb - 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb + 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084096uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb - 1, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb + 1, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 32300371493042338295430399331232255118632292468465563882493105489267627026599093946004621996863635202389007853529819771477875971454599651226062726008225128378230201091358720uwb, + 51633735166516291946287076289285239234614696135400087552338648850396978875047534195381428791244881087469912840942965704049340728476496893527920582382910651979554452116116272uwb, + 51633735166516291946287076289285239234614696135400087552338648850396978875047534195381428791244881087469912840942965704049340728476496893527920582382910651979554452116116272uwb + }; + static _BitInt(575) q[] = { + -16024899825125698861378150913416105280348720287461133876385645855428118759753753693038310256905822130840919293800517449664090240148479686087771461105141796446993957309177045wb, + -51390644150207754083049224884205617519374685858021340086606047722946185332781222093929175551224144597441976819384400839391617209092608330883818358373143049025398242971422533wb, + -20809715567752942978812919265762383091400170370538364777815196254289178900619639932788104439550680105583194256562402043742602192720264733467556618411468069787890087436518391wb, + -43478068345605895172576873114727639397122657577727331984515310626703015763793150203012686140133812758008909595858389385754649550027270841464683283530974333174240307326289977wb, + 21067536974893828187213625307418104748755825376641087283640893104632378341787632507091012136429031707836504909794544075439508068134695815107226742106718247426895718454571312wb, + 21059037076325069627888376003421918344895371516177629929139897951865178711273978220082835739571514841970324298196012637442412751291560252279454786817442227655976906976548376wb, + 55073439925103775330639545123285198131334712919437487448183092392908579762995884122632962257443311586409720754276146674776790868518679130616646045890806469671103608966017526wb, + -3663639803402473230919436108605440689203511417836937035771974096034195998647953190615349428343475558818004598945205472788914786751065095519363354010927131384676070154882437wb, + 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb, + 58304255896761105723976011538967955499349019141200282089271806304495956703405537252312168244240400239567714934306206832214441693408953280684020766705604407959670312862112067wb - 1, + 19766430864130481024653308710810905134755769634549241890712862316488061577142782818791682881169095930184520701227673190291943682114543262971807474281675881316596313965163891wb, + 19766430864130481024653308710810905134755769634549241890712862316488061577142782818791682881169095930184520701227673190291943682114543262971807474281675881316596313965163891wb + 1, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb - 18446744073709551616wb, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb - 1, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb + 1, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb, + -34289018974597784349033110006663080173300111534374645051386853751555192083544833095189889341716428776365054335337832864819656266482761085202092232298171290655379977534439424wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb - 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306816wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb + 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306816wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb - 1, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb + 1, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 5792382359367624136729259459647895570083840504542461480157806156670329217124243749211279307138790818182646144303340305156516829311465729191448709861740266920986130350342144wb, + 8558311355808808607005104837820226337084035299904651624497753594925617942910238887167551309507473356128849516219332540284243795507166584146318106852798224239555032058705368wb, + 8558311355808808607005104837820226337084035299904651624497753594925617942910238887167551309507473356128849516219332540284243795507166584146318106852798224239555032058705368wb + }; + int r[160]; + static int e[160] = { + 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, + 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, + 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, + 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0 + }; + test575 (p, q, r, 0, 0, 0); + for (int i = 0; i < 160; ++i) + if (r[i] != e[i]) + __builtin_abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 512 + check512 (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + check575 (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-10.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-10.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,38 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test135 (_BitInt(135) *p) +{ + *p = 18514202188641047858083570207027263585014wb; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 512 +__attribute__((noipa)) void +test512 (_BitInt(512) *p) +{ + *p = -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + _BitInt(135) b135; + test135 (&b135); + if (b135 != 18514202188641047858083570207027263585014wb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 512 + _BitInt(512) b512; + test512 (&b512); + if (b512 != -3850276968594657220525735372507394006353780328347442833283734788531702263728014201878916354908375176401574990646289191313473197873422312093114382157952958wb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-11.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-11.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,77 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#ifdef __SIZEOF_INT128__ +#define int128_val(x, y) x +#define int128_bitfld(x) x +#define int128 __int128 +#else +#define int128_val(x, y) y +#define int128_bitfld(x) 1 +#define int128 int +#endif + +struct S { + int i : 1; + int j : 27; + long long k : 56; + int128 l : int128_bitfld (120); + unsigned m : 3; + unsigned long long n : 42; + unsigned int128 o : int128_bitfld (125); +}; + +#if __BITINT_MAXWIDTH__ >= 188 +__attribute__((noipa)) _BitInt(188) +test188 (int a, long long b, int128 c, unsigned short d, + unsigned long long e, unsigned int128 f, _BitInt(188) *g, + struct S *p) +{ + return *g + a + b + c + d + e + f + p->i + p->j + p->k + p->l + p->m + p->n + p->o; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +test575 (int a, long long b, int128 c, unsigned short d, + unsigned long long e, unsigned int128 f, _BitInt(575) *g, + struct S *p) +{ + return *g + a + b + c + d + e + f + p->i + p->j + p->k + p->l + p->m + p->n + p->o; +} +#endif + +int +main () +{ + struct S s = { -1, 34877496, -5580713461260169LL, + int128_val (329913978417840804084945075673166782wb, 0), + 1U, 68262565354ULL, + int128_val (5169264897230903304574466460949339423uwb, 0) }; + (void) &s; +#if __BITINT_MAXWIDTH__ >= 188 + _BitInt(188) b188 = 51625354135609169507415940782602403562057573230992065937wb; + if (test188 (-943502954, 6037882847713389759LL, + int128_val (-83021930809076074533830959108195408798wb, 0), + 55564, 16536837072610496559ULL, + int128_val (237527410537432634851289433535592281366uwb, 0), + &b188, &s) + != int128_val (51625354135609169667420599386607708010744598469228066319wb, + 51625354135609169507415940782602403584626712505208687546wb)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + _BitInt(575) b575 = -20179593413257295974034559327597105210986698104682733481090257927308152867107766179792744096926808179875378122328280563720406829353405990702024578604764643194143342705864832wb; + if (test575 (-943502954, 6037882847713389759LL, + int128_val (-83021930809076074533830959108195408798wb, 0), + 55564, 16536837072610496559ULL, + int128_val (237527410537432634851289433535592281366uwb, 0), + &b575, &s) + != int128_val (-20179593413257295974034559327597105210986698104682733481090257927308152867107766179792744096926808179875378122328280563720406829353405830697365974599460194507118104469864450wb, + -20179593413257295974034559327597105210986698104682733481090257927308152867107766179792744096926808179875378122328280563720406829353405990702024578604764620625004068489243223wb)) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-12.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-12.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,128 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#ifdef __SIZEOF_INT128__ +#define int128_val(x, y) x +#define int128 __int128 +#else +#define int128_val(x, y) y +#define int128 int +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test575 (_BitInt(575) *a, int b, int128 c, unsigned int d, unsigned int128 e, + int f, int g, int128 h, unsigned int i, unsigned int128 j, + _BitInt(575) *p, int *r) +{ + r[0] = *a > b; + r[1] = *a >= c; + r[2] = *a < d; + r[3] = *a <= e; + p[0] = ((_BitInt(575)) g) << f; + p[1] = ((_BitInt(575)) h) << f; + p[2] = ((_BitInt(575)) i) << f; + p[3] = ((_BitInt(575)) j) << f; + p[4] = ((unsigned _BitInt(575)) g) >> f; + p[5] = ((unsigned _BitInt(575)) h) >> f; + p[6] = ((unsigned _BitInt(575)) i) >> f; + p[7] = ((unsigned _BitInt(575)) j) >> f; +} + +_BitInt(575) a575 = -37335077053906536248085160049937130279057714970866686325204063930452920311842187828021093674979068589644104434897698233644810906211958229904753029173357201859433853689386323wb; +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + int r[12]; + _BitInt(575) b575[24]; + int er[12] = { +#ifdef __SIZEOF_INT128__ + 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1 +#else + 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1 +#endif + }; + static _BitInt(575) eb575[24] = { +#ifdef __SIZEOF_INT128__ + 20329374714419634196895318109902140892207297977139593216wb, + -1712803473999893185713719997722323414959591613021414111612885795955340439235139207168wb, + 24459948786509903061037979887398299261116601758241521664wb, + 266261172647138617905132542512773540174694514212873439044818615992883558384930914304wb, + 0wb, + 10830740992659433045228180406808920716548582325686783496759685861775864483615725089999900023844295226942934417817982702456930303wb, + 0wb, + 0wb, + 7830590302633896968192wb, + -659747899885375730707839505890120862245951494946816wb, + 9421629561223530938368wb, + 102560073085756776493593811652595116491535756034048wb, + 0wb, + 28118211215894977392565865673037386617935606989386978956879722328823984879196799189494004288149317857187005691459505594520051662846839338948136222520490158359458wb, + 0wb, + 5302231504909973601023497wb, + 1780470098wb, + -150009304862891379049833518795394607479wb, + 2142230542wb, + 23319460771235020841594135084186545212wb, + 1780470098wb, + -150009304862891379049833518795394607479wb, + 2142230542wb, + 23319460771235020841594135084186545212wb +#else + 20329374714419634196895318109902140892207297977139593216wb, + 479555224749202520035584085735030365824602865664wb, + 24459948786509903061037979887398299261116601758241521664wb, + 171269723124715185726994316333939416365929594880wb, + 0wb, + 0wb, + 0wb, + 0wb, + 7830590302633896968192wb, + 184717953466368wb, + 9421629561223530938368wb, + 65970697666560wb, + 0wb, + 0wb, + 0wb, + 0wb, + 1780470098wb, + 42wb, + 2142230542wb, + 15wb, + 1780470098wb, + 42wb, + 2142230542wb, + 15wb +#endif + }; + test575 (&a575, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + 153, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + &b575[0], &r[0]); + a575 = 1780470099wb; + test575 (&a575, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + 42, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + &b575[8], &r[4]); + a575 = -150009304862891379049833518795394607478wb; + test575 (&a575, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + 0, 1780470098, int128_val (-150009304862891379049833518795394607479wb, 42), + 2142230542U, int128_val (23319460771235020841594135084186545212uwb, 15), + &b575[16], &r[8]); + for (int i = 0; i < 12; ++i) + if (r[i] != er[i]) + __builtin_abort (); + for (int i = 0; i < 24; ++i) + if (b575[i] != eb575[i]) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-13.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-13.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,171 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ * __CHAR_BIT__ == 128 +#define int128_val(x, y) x +#define int128_bitfld(x) x +#define int128 __int128 +#else +#define int128_val(x, y) y +#define int128_bitfld(x) 1 +#define int128 int +#endif +#if __SIZEOF_SHORT__ * __CHAR_BIT__ == 16 +#define shrt_val(x, y) x +#else +#define shrt_val(x, y) y +#endif +#if __SIZEOF_INT__ * __CHAR_BIT__ == 32 +#define int_val(x, y) x +#else +#define int_val(x, y) y +#endif +#if __SIZEOF_LONG_LONG__ * __CHAR_BIT__ == 64 +#define llong_val(x, y) x +#else +#define llong_val(x, y) y +#endif + +struct S { + int i : 1; + int j : 27; + long long k : 56; + int128 l : int128_bitfld (120); + unsigned m : 3; + unsigned long long n : 42; + unsigned int128 o : int128_bitfld (125); +}; + +#if __BITINT_MAXWIDTH__ >= 188 +__attribute__((noipa)) void +test188 (int *a, long long *b, int128 *c, unsigned short *d, + unsigned long long *e, unsigned int128 *f, _BitInt(188) *g, + struct S *p) +{ + *a = g[0] + g[1]; + *b = (_BitInt(188)) ((unsigned _BitInt(188)) g[2] - g[3]); + *c = g[4]; + *d = (_BitInt(188)) ((unsigned _BitInt(188)) g[5] << 3); + *e = (unsigned _BitInt(188)) g[6]; + *f = -g[7]; + p->i = g[8] | 256wb; + p->j = g[9] ^ 513wb; + p->k = g[10] & g[11]; + p->l = g[12]; + p->m = (g[13] | g[14]) + g[15]; + p->n = g[16]; + p->o = g[17]; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test575 (int *a, long long *b, int128 *c, unsigned short *d, + unsigned long long *e, unsigned int128 *f, _BitInt(575) *g, + struct S *p) +{ + *a = g[0] + g[1]; + *b = g[2] - g[3]; + *c = g[4]; + *d = g[5] << 3; + *e = (unsigned _BitInt(575)) g[6]; + *f = -g[7]; + p->i = g[8] | 256wb; + p->j = g[9] ^ 513wb; + p->k = g[10] & g[11]; + p->l = g[12]; + p->m = (g[13] | g[14]) + g[15]; + p->n = g[16]; + p->o = g[17]; +} +#endif + +int +main () +{ + struct S s; + int a; + long long b; + int128 c; + unsigned short d; + unsigned long long e; + unsigned int128 f; + (void) &s; +#if __BITINT_MAXWIDTH__ >= 188 + _BitInt(188) g188[18] = { + -159047363318536960484353065517373654721104396757490314295wb, + -3121544831087579708485147608149039646353048280619431708wb, + 159318071862725567512368472768918962735450536041547197357wb, + -40707507555068524326919847225737421498619613998666182429wb, + 165320903343659124097264390671505112912629878959843721491wb, + -127515148002861399222757129930766493340235768486498578219wb, + -105034079444454534611827588421185078564296081131064901461wb, + 92590184827335405203162269451222486819220604151446603018wb, + -180312039117739394533672196677501644999924031772292123301wb, + -144189136904129889279453036150725630022817508409138149279wb, + -149481812493652088098408785514342084106630686193276241281wb, + -167177289711809249257738519322903628222027157941774765457wb, + -143084017548841355414802324960482130843700645074551425158wb, + 58479706299212198491939673148493577279739517540183806582wb, + -56927106028567263826833143638316408260616106349933917222wb, + -51398435670153923584906245550632035515359744807385001406wb, + 42134285326135692487901360354060672379510798359809381879wb, + 88023866651707391895300914626945857947221302817073781445wb + }; + test188 (&a, &b, &c, &d, &e, &f, &g188[0], &s); + if (a != int_val (0x07181cad, (int) 230149950312043007546898625824956456638939770240892411053uwb) + || b != llong_val ((long long) 0xde59a69b154ddacaLL, (long long) 200025579417794091839288319994656384234070150040213379786uwb) + || c != int128_val ((int128) 0xd1d8047ea714e976fb0ddacd903a4113uwb, int_val ((int) 0x903a4113, (int) 165320903343659124097264390671505112912629878959843721491uwb)) + || d != shrt_val (0x86a8, (unsigned short) 156835391362111449437153477405305506297305497945017845416uwb) + || e != llong_val (0xf4603045301e40abULL, (unsigned long long) 287284779017213013127909250529294072442101134147937255595uwb) + || f != int128_val ((unsigned int128) 0x36333fc0e67c1648df996844ae607af6uwb, int_val ((unsigned) 0xae607af6, (unsigned) 299728673634332142536574569499256664187176611127555554038uwb)) + || s.i != -1 + || s.j != 0x3150a60 + || s.k != 0x0501922b16326fLL + || s.l != int128_val ((int128) 0xffa05b2a80ae9f589ff82df4ec30377auwb, 0) + || s.m != 0 + || s.n != 0xbea55655f7ULL + || s.o != int128_val ((unsigned int128) 0x11424021a09eb39f0078be56f505dac5uwb, 1)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + _BitInt(575) g575[18] = { + -47005092370981353509019585272930171576138837874594474940633343041444523868768398171568402914237822300343064860032430047905208253183368063860751727493912961793713775785286761wb, + 42995314282090421850185028248818616047989631648441809220202839707075135953582887789310579563290411495625582960818510026163313766713468119555853185204024156985186870447558448wb, + -4310949275737056279952323703666519147345926215446595910688661460043187233007608392215115192894183359414559767132447689960645444722310313612870802800517291553651832872230377wb, + -60174333254167907860375485189824486743221145295071697779574672977710903042875235567137515476943834663106195143844820080789913163377976708972634731997186324672887273760550843wb, + 514999616465082372590625134373624423612122508361343296847148750502235576952627411211915080142588943086581680871086375952582973053262315744074678352482468176498475765238014wb, + -34524529098838981071360498102806028847960079898011114995185678340915753622610778619950150604678383174181175565220899355393832542080300168653321490778607415279583262404019715wb, + 57435829357765689198701253918538231677782825819649130906117703766412930883719480639328241453985120284446411689340430788174994800799501628170332549761733355178989958217690176wb, + 55372038211321583831991526729411129160052836002754320808356246247126956944240411995457998940239431679806969029801755058644044152079840612142503912508386823751242378280351248wb, + 16465587034692152401588675199252528652333806863385560487958043658459465122879621696065063317705307064863781999117926295249319492796685349901264833471330673488325230233633156wb, + 29447367895156340838084654771430520820905636269084897202980661633115991361986283452296000775941804019961160709602424696981982973428884144037654036591675815222144356989137377wb, + -11405270033186719236304815495700559798454505639686440514251001395033465367140240658561115444561532342526965619895711017904459977515469290641005572154684851264335049868864497wb, + 108093905149568033165371492635656748567249268116953654298668927833251941040419562425217780888127352768755220577595921193600804563557700826867049089803222938826670338302530wb, + -31360750000107936163671456129190056884574874172627927813113803212980739137815442376155550405060248732467083955605320651972161402853892464960579922753500965033770359737153351wb, + -8682946747028473458400698043390376356896046446946536663094478822504353095327345833145506855874926356083877643554724567774187375944555393553847900623220497209797513931185240wb, + -22144855016132297032977142230889176517935104503579623594553342478323802903759572545707546713930097548953805249628758279309623598839610808070152925878316419950140234764905470wb, + -10411562563660012059020319572234253583259323305689321838048522585769451002745393609294442107707749261789472265492124615971403756074402546875951159988775650555291608910079211wb, + -35303144058707185327630269206553728380732193353770095499658757423571059983534369285427585500543929872684039303017125049206013674506050937891922504600168970885730004765890909wb, + -10288638308173362696633233706439807781761277611815792314525923347956953720054374840733498198399501888078817738532473821245337293721068994241744635656437058172223152460622488wb + }; + test575 (&a, &b, &c, &d, &e, &f, &g575[0], &s); + if (a != int_val (-0x2a104d39, (int) -4009778088890931658834557024111555528149206226152665720430503334369387915185510382257823350947410804717481899213920021741894486469899944304898542289888804808526905337728313wb) + || b != llong_val ((long long) 0xf6c7e117bacd11d2LL, (long long) 55863383978430851580423161486157967595875219079625101868886011517667715809867627174922400284049651303691635376712372390829267718655666395359763929196669033119235440888320466uwb) + || c != int128_val ((int128) 0x75504b73f68a3225400491eb337288feuwb, int_val ((int) 0x337288fe, (int) 514999616465082372590625134373624423612122508361343296847148750502235576952627411211915080142588943086581680871086375952582973053262315744074678352482468176498475765238014uwb)) + || d != shrt_val (0xcfe8, (unsigned short) 94799369418944952519869796707022554269016384467728839909609157412019808678911571795873396754437502090947102617257014165876387214817725465724747306423980429638244058990890984uwb) + || e != llong_val (0xa6a61a4adeb96c40ULL, (unsigned long long) 57435829357765689198701253918538231677782825819649130906117703766412930883719480639328241453985120284446411689340430788174994800799501628170332549761733355178989958217690176uwb) + || f != int128_val ((unsigned int128) 0xd2a8d84eae8410641083c38afaa549f0uwb, int_val ((unsigned) 0xfaa549f0, (unsigned) 68293162525230683198259733780412465857512838547851599148675281799321655609025521589700201590382090814991866683206314611031638365073534992841269165042559760207061007793998320uwb)) + || s.i != 0 + || s.j != -0x2920c20 + || s.k != -0x1bddffff3afffeLL + || s.l != int128_val ((int128) 0xffb52493069ee4e254bf24bbba7a08b9uwb, -1) + || s.m != 7 + || s.n != 0x1cbf11e26a3ULL + || s.o != int128_val ((unsigned int128) 0x12a63362222ec8f7f2c7e52793b49568uwb, 0)) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-14.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-14.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,140 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 256 +__attribute__((noipa)) void +test256 (_BitInt(256) *p, _BitInt(256) *q, unsigned n) +{ + _BitInt(256) x = q[0], y; + unsigned _BitInt(256) z; + p[0] = x >= 0 ? x : -x; + x = q[1]; + p[1] = (_BitInt(256)) (-(_BitInt(256)) (x < 0) | 1) * (unsigned _BitInt(256)) x; + x = q[2]; + y = q[3]; + p[2] = x > y ? x : y; + p[3] = x < y ? x : y; + z = q[4]; + p[4] = (z << n) | (z >> (-n) % 256); + z = q[5]; + p[5] = (z >> n) | (z << (-n) % 256); + z = q[6]; + p[6] = (z << 42) | (z >> (256 - 42)); + p[7] = (z << 196) | (z >> (256 - 196)); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test575 (_BitInt(575) *p, _BitInt(575) *q, unsigned n) +{ + _BitInt(575) x = q[0], y; + + p[0] = x >= 0 ? x : -x; + x = q[1]; + p[1] = (_BitInt(575)) (-(_BitInt(575)) (x < 0) | 1) * (unsigned _BitInt(575)) x; + x = q[2]; + y = q[3]; + p[2] = x > y ? x : y; + p[3] = x < y ? x : y; + x = q[4]; + p[4] = (x << n) | (x >> (-n) % 575); + x = q[5]; + p[5] = (x >> n) | (x << (-n) % 575); + x = q[6]; + p[6] = (x << 42) | (x >> (575 - 42)); + p[7] = (x << 196) | (x >> (575 - 196)); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 256 + _BitInt(256) p256[16]; + static _BitInt(256) q256[14] = { + 45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + -57896044618658097711785492504343953926634992332820282019728792003956564819968wb, + 56362660930901219937245963089077503913881996661810533276822951833224961233515wb, + 51868771107222588126287278424861243128427600270521502351207927942060821222194wb, + -19284414951568262238262918143892955489617856897512953183940840506431869697041wb, + 2658782266882101281962762454025964999131551132761759005892140732613414118676wb, + 54220248433725687265393292224175077483742748899396150017145360542924235344802wb, + -37463226851796965187185951868838571299559805464590722337979740082646767802569wb, + -40419708661355022203345898421408637080086749636846240100217688555626587286030wb, + -55754487912560053024413264564540814098917966752804384445133242149913646068176wb, + 26265770627437470876117322526967897715823682246510518833106882615653395455635wb, + -52596268389191266164863111650546248051760002564726896605115288580144402763386wb, + -44308970341715903069333400701791033613751134794232782967956437254511180029758wb, + 4750616739884184263118039796682749720523215747547537773188931304361332774085wb + }; + static const _BitInt(256) r256[16] = { + 45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + -57896044618658097711785492504343953926634992332820282019728792003956564819968wb, + 56362660930901219937245963089077503913881996661810533276822951833224961233515wb, + 51868771107222588126287278424861243128427600270521502351207927942060821222194wb, + 28504845637216227099157296646299447493773190228564580204434798695467761710135wb, + 13952419655888133019367679114949332038269119423004786217260238955159715384317wb, + 55062854366581286125448024237607745201868855087201663327097902939898842371913wb, + -48537283185021244092191938290513862066611838578912383503471331209866218456054wb, + 37463226851796965187185951868838571299559805464590722337979740082646767802569wb, + 40419708661355022203345898421408637080086749636846240100217688555626587286030wb, + 26265770627437470876117322526967897715823682246510518833106882615653395455635wb, + -55754487912560053024413264564540814098917966752804384445133242149913646068176wb, + -52596268389191266164863111650546248051760002564726896605115288580144402763386wb, + -44308970341715903069333400701791033613751134794232782967956437254511180029758wb, + -18143335929783282380882063933743228881911720395868748284571317433159558897346wb, + 29051936395101664965352348496634886321943246606527498619351354372469657269685wb + }; + test256 (p256, q256, 31); + test256 (p256 + 8, q256 + 7, 0); + for (int i = 0; i < 16; ++i) + if (p256[i] != r256[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + _BitInt(575) p575[16]; + static _BitInt(575) q575[14] = { + -22872451846054556417350916741013404184330732279497241442289048103235716890482482649099537178446621346041121532737887637378213104798444471078041166778940100084060290561371455wb, + 17785619680254441647827488871998638273432777299970128558821267200272839955229298488625220894043625699693270092672797162273950619203800446486815325568472958573446749051572825wb, + -734234098097989409262727998397700256489421637915860389242752385873657556883074595636809785650192226409399868870242355685621686958186408269916495700324885703256092385869434wb, + 38120499666250922171546613830180673200675976218799529299148065967941552755802535392332731940070002883710338820964987361658591561975335652756278138538832118604974787875400446wb, + 5684104948137619484333794789281535519196217253613879268155482366016410402198153437845962821374710383639946025491278662358930601323825409782517946368713730166779501012971475wb, + 32087820847816972971171692099083158156912701591228441301893931157856913053317602595432786417564970426631926727346659054532034068327088444234192931989166459782227197939321057wb, + -21721263360652995330393989849576970088245889949682845009460695472717466152081539971263312012527739590286540576183877575156900293418340395132947924863443109127173995560078279wb, + -15480195498062309558312832142884391233286002177523144097946171600675924728664105138320506609593544010951582863517501340004263677508611453722210182190275179605668158636665993wb, + 55995880469793772523539449728006933885804379190436425191858349409824731357990351725719664053451797096177518772823017250471021319053248877819795135618917529149253258308759354wb, + 24370295507731130004798276928243731386820125439099070643489522771145691875100529624831680686321147169119505764999828531144118172785865370931653507615753544737698580795350286wb, + -13016142173054302003336690685586422149429100823007010246177815738538602088089262263144796610097444570064192302085091825355979550567585055268099892750197109319237803857300389wb, + -35368478429854967484145020710656986046297257815593959870285507974957270671233443946755652228033821286859588583452449353741836352125387357246827468277473775502648515381353900wb, + 58764573942155814375791739663233093461596472170763698081763161612851239717416911428930198048960628406552049393162750872881771056037803284665755551481777372772007145066447638wb, + 44433183924809544824417284909271563263644800797277575618994531425499154930034075648536496209651260196970467671003251328672885483954369513730487082628591112972000580073953662wb, + }; + static const _BitInt(575) r575[16] = { + 22872451846054556417350916741013404184330732279497241442289048103235716890482482649099537178446621346041121532737887637378213104798444471078041166778940100084060290561371455wb, + 17785619680254441647827488871998638273432777299970128558821267200272839955229298488625220894043625699693270092672797162273950619203800446486815325568472958573446749051572825wb, + 38120499666250922171546613830180673200675976218799529299148065967941552755802535392332731940070002883710338820964987361658591561975335652756278138538832118604974787875400446wb, + -734234098097989409262727998397700256489421637915860389242752385873657556883074595636809785650192226409399868870242355685621686958186408269916495700324885703256092385869434wb, + 21703548306654828422881171931811440617567232925929621047938944826274955122606664179955511692787137409674737460976041867927943552583691691300165016729177283086471793752300456wb, + 26132710036535820372804820434723627712036525396244440920377271153766059995978577234280974829431879549681083853195499953729715766325604759212344321343859158691727036603084808wb, + -772498050957wb, + -17640736973552882046941821064235973435654602283914963062775wb, + 15480195498062309558312832142884391233286002177523144097946171600675924728664105138320506609593544010951582863517501340004263677508611453722210182190275179605668158636665993wb, + 55995880469793772523539449728006933885804379190436425191858349409824731357990351725719664053451797096177518772823017250471021319053248877819795135618917529149253258308759354wb, + 24370295507731130004798276928243731386820125439099070643489522771145691875100529624831680686321147169119505764999828531144118172785865370931653507615753544737698580795350286wb, + -13016142173054302003336690685586422149429100823007010246177815738538602088089262263144796610097444570064192302085091825355979550567585055268099892750197109319237803857300389wb, + -35368478429854967484145020710656986046297257815593959870285507974957270671233443946755652228033821286859588583452449353741836352125387357246827468277473775502648515381353900wb, + 58764573942155814375791739663233093461596472170763698081763161612851239717416911428930198048960628406552049393162750872881771056037803284665755551481777372772007145066447638wb, + -49246536424904916635319663180286717016047461257207957146338535716423124695209459892760482984419623560832895613229564098885770525356171820890930378678203734061651571774762747wb, + -24090226615157470281984717279507286428793968193916029900229071481754838071202669524668562579828294907607719783763180294251525168293397875645175326412340936012077133238990588wb + }; + test575 (p575, q575, 31); + test575 (p575 + 8, q575 + 7, 0); + for (int i = 0; i < 16; ++i) + if (p575[i] != r575[i]) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-15.c.jj 2023-08-08 16:12:02.342939616 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-15.c 2023-08-08 16:12:02.342939616 +0200 @@ -0,0 +1,264 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) void +test135_171_192 (_BitInt(135) *p, _BitInt(171) *q, _BitInt(192) *r, + unsigned _BitInt(135) *s, unsigned _BitInt(171) *t, + unsigned _BitInt(192) *u, int n) +{ + p[5] = q[0]; + q[5] = p[0] + p[1]; + p[6] = r[0]; + r[5] = p[1]; + q[6] = r[1] + r[0]; + r[6] = q[1]; + p[7] = (unsigned _BitInt(135)) t[0] + (_BitInt(135)) t[1]; + q[7] = s[0]; + p[8] = u[0]; + r[7] = s[1]; + q[8] = u[1]; + r[8] = t[1]; + s[5] = q[2] - q[3]; + t[5] = p[2]; + s[6] = r[2]; + u[5] = p[3]; + t[6] = r[3]; + u[6] = q[3]; + s[7] = t[2]; + t[7] = s[2]; + s[8] = u[2]; + u[7] = s[3]; + t[8] = u[3]; + u[8] = t[3]; + u[9] = ((_BitInt(171)) (p[2] + p[3]) + q[2]) + u[2]; + p[9] = q[4] < p[4]; + q[9] = t[4] >= u[4]; + s[9] = ((_BitInt(171)) p[4]) << n; + t[9] = ((_BitInt(171)) s[4]) >> n; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test522_547_575 (_BitInt(522) *p, _BitInt(547) *q, _BitInt(575) *r, + unsigned _BitInt(522) *s, unsigned _BitInt(547) *t, + unsigned _BitInt(575) *u, int n) +{ + p[5] = q[0]; + q[5] = p[0] + p[1]; + p[6] = r[0]; + r[5] = p[1]; + q[6] = r[1] + r[0]; + r[6] = q[1]; + p[7] = (unsigned _BitInt(522)) t[0] + (_BitInt(522)) t[1]; + q[7] = s[0]; + p[8] = u[0]; + r[7] = s[1]; + q[8] = u[1]; + r[8] = t[1]; + s[5] = q[2] - q[3]; + t[5] = p[2]; + s[6] = r[2]; + u[5] = p[3]; + t[6] = r[3]; + u[6] = q[3]; + s[7] = t[2]; + t[7] = s[2]; + s[8] = u[2]; + u[7] = s[3]; + t[8] = u[3]; + u[8] = t[3]; + u[9] = ((_BitInt(547)) (p[2] + p[3]) + q[2]) + u[2]; + p[9] = q[4] < p[4]; + q[9] = t[4] >= u[4]; + s[9] = ((_BitInt(547)) p[4]) << n; + t[9] = ((_BitInt(547)) s[4]) >> n; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + static _BitInt(135) p135[15] = { + -21017626881393060962682831099345275646127wb, + 3694296893212130938499913614460066245857wb, + -346978153630491292366720842786572608600wb, + -12051883812785324688960115817645360041052wb, + 894554736479161756765856528934783wb, + 0, 0, 0, 0, 0, + -10126751695395432170173641758862456728384wb, + 5972941260331487493885375988782293547456wb, + 1994359513041991206938472369666304432410wb, + -6563811307898601259032789037472160962572wb, + 0wb + }; + static _BitInt(171) q171[15] = { + -625366993761622480400669212262678861717858330946368wb, + 824211109381944261174032176940659654188131012437179wb, + 546292738086463798921197562372110173424343217923278wb, + 511148834019524346739032507408677732131367119592267wb, + 347611384453999342493570524785293850801864814800614wb, + 0, 0, 0, 0, 0, + -17323329988180930024182917484885209400270wb, + -1427703038865092853121951937517407564490420667866520wb, + 38147269358417182782171905780014948953272wb, + 467958077036848086326034408503276340843337835865495wb, + 0wb + }; + static _BitInt(192) r192[15] = { + 1392184189278706283348529493736576751111606618688367065536wb, + 1141852629791713898948497335488732622599274881068663548072wb, + -2714462128387415582772926191122594432964111301268533078042wb, + 2425769388758313376333650042373508250767256770936531653671wb, + 2720431110756499648348639705956093809255126267584967484234wb, + 0, 0, 0, 0, 0, + 3694296893212130938499913614460066245857wb, + 824211109381944261174032176940659654188131012437179wb, + 24158489198104933635096197097903724015499wb, + 606766803137851050688065717544996275384988908585315wb, + 0wb + }; + static unsigned _BitInt(135) s135[15] = { + 38147269358417182782171905780014948953272uwb, + 24158489198104933635096197097903724015499uwb, + 15056704170354189252536066857287800623071uwb, + 25206995790075003034339862074263410882988uwb, + 19207954769547491779143235037830592504231uwb, + 0, 0, 0, 0, 0, + 31754930256886813275958100253331871451523uwb, + 15245728220153286789447947809930478163942uwb, + 9156112246512545688879043617340759142722uwb, + 40264644850602433398431024975343109499285uwb, + 41168227647461841063600478959378800574464uwb + }; + static unsigned _BitInt(171) t171[15] = { + 485349495244621624686447991535899196145754495768503uwb, + 606766803137851050688065717544996275384988908585315uwb, + 333199438528630292656855934377866394553406065406274uwb, + 2139385105954223838532102833374805075850015235549769uwb, + 1678008128571185237771726930519720682651619103697237uwb, + 0, 0, 0, 0, 0, + 2993155353253342198327516046110580903412563275406248uwb, + 2550578100027524622604893738184060999550811074270247uwb, + 15056704170354189252536066857287800623071uwb, + 699234106698292061166730462199993896682394735156989uwb, + 4367383273699372643737486905uwb + }; + static unsigned _BitInt(192) u192[15] = { + 4671639464410605725298192070070307015392908693211956881396uwb, + 715636974522854835742140132808616653707176693849553888663uwb, + 457579096729186368426895847730802215502050535098936945045uwb, + 1103175995161405903311011421434916994075193954478175624957uwb, + 5439093776557462873830329048469734037495210381156250832820uwb, + 0, 0, 0, 0, 0, + 6277101735386680751783905610422341727142239626818674471844uwb, + 511148834019524346739032507408677732131367119592267uwb, + 25206995790075003034339862074263410882988uwb, + 2139385105954223838532102833374805075850015235549769uwb, + 457579643021924442491832802512548606285387299010222218671uwb + }; + test135_171_192 (p135, q171, r192, s135, t171, u192, 42); + for (int i = 5; i < 10; ++i) + if (p135[i] != p135[i + 5] + || q171[i] != q171[i + 5] + || r192[i] != r192[i + 5] + || s135[i] != s135[i + 5] + || t171[i] != t171[i + 5] + || u192[i] != u192[i + 5]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _BitInt(522) p522[15] = { + 1688583697238081957015024340932764748327491668109158685467058555721380506305071231550264349039164029945469865795968233973631543964236809100573066960995245177wb, + 150663282285775450662414365350419405945541820765219523130929531002923088277160545114254251148525286476983773283235468282002045173141196158353616014355287094wb, + -479060863800931266429781304885104017131749664329186246406335179483194313801808166262041921602861985862332756318078499039394820190197870580545316549380449074wb, + 1359131269843466711194682581441372588504604777186075559309941421522168913086212721229905012023237380094986736934464910421922092415050027946837562847761546642wb, + 38005189198839309539384162035472227153066377585338581102543574055575777451369497515143095968263424053357137645031423561696064649082930963wb, + 0, 0, 0, 0, 0, + 1911076617401423887269840833410267237705130466676958152037861477885277722749139605040038160132075189228439111066941630564324402605816835862488337890450123441wb, + 2143747820933189266943449152733920616973804237879618575235243631855378946947754007625444647681930476713800905339559157073740302180956472245149919774437085550wb, + 3020328738802050781697314194154464021447637901030508296205170033161531452424686777206896481266404991349073132253866303142608091273541629412071886412132279688wb, + 3548552946267883916132218767540000478942702862442658213517298532968411704728913569849574500607350293984423898514369017381981825383513090204371793724097677500wb, + 0wb + }; + static _BitInt(547) q547[15] = { + -165353820935998006231385303476800492106677276950834360813262262140867129737290132086107434762098834639119492256272880571578714556242252134191835397505691625332102479wb, + 183695555784071631934553514377048200879108759149452364923958570648444896373196632060114376244737698247102365620343713172199496472928539579603161884440477984840044187wb, + 139975743565335456314316356647588328869546947948448304225648231332737456493208842047425843515598984558359834966436458515450535075922755618635258426884425597017306862wb, + -68977268331926408936317559581002324220146009615687701127254186456806021645364222184642001923334926042747842307638529875034306779796443629804024646337944171607895438wb, + 91932189605038085807227077574075596679601857184786010334359253878486168031464536332131456527844457578512045265477412819469725001337530261064906167819503147594853366wb, + 0, 0, 0, 0, 0, + 1839246979523857407677438706283184154273033488874378208597988086724303594582231776664518600187689316422453639079203702255633589137378005258926682975350532271wb, + 49151230401218799957130323446282917069028231656715550463945235235623430774823230155689924560414670278246826717504404635655151576036315823360722825188858286217308439wb, + 9553161692302515408090681902990032962274757557255101236499698228392460650767938620693069133770230123184487473131034348424915457011452743114281594442529356918wb, + 148466349169509850971880825885649862512888667929683428885486286008574376924695036417770580112507292038258577594242665019379719515779240480203475588034326681778827837wb, + 0wb + }; + static _BitInt(575) r575[15] = { + 26826731245669206245461391126964073367685598786847623620556904941634299886033194729072082303506281733460775551098898854360334228479162479457887049265892154734615530822766958wb, + -17252637235610200065109317402231975926530699783926188946291304643884915080832768297094963378392971235218154081350840664198841060114648240981027529664968282740385246545569879wb, + -52927846040946009564438022882734367309063070035915874157090678963969555482365010516321242268874731309847996546526357803037049653154886399755465425844249799943139498370138356wb, + 43797192926762436278400269352553576566711887692587698009480808423919842536790683665562833898774167035902777714908510813261288364232387952547718429572231820909634939092793538wb, + 20234448725793738746286884524404371396011280587539411448314107254021820060093226611203035940379115510914907477160212849326875709895927134019157662749025851187493640146044781wb, + 0, 0, 0, 0, 0, + 150663282285775450662414365350419405945541820765219523130929531002923088277160545114254251148525286476983773283235468282002045173141196158353616014355287094wb, + 183695555784071631934553514377048200879108759149452364923958570648444896373196632060114376244737698247102365620343713172199496472928539579603161884440477984840044187wb, + 4851258619379431619519122339214063398230494067942295987016754503060997355109186638667322723996572842157209194651881355085513631695628096402419719096882984119wb, + 270940858229872855030935066513853051367534588484589172383739756326100509416298021769516239928911004114519037087137992976731526127660469862578530915810061315551592797wb, + 0wb + }; + static unsigned _BitInt(522) s522[15] = { + 9553161692302515408090681902990032962274757557255101236499698228392460650767938620693069133770230123184487473131034348424915457011452743114281594442529356918uwb, + 4851258619379431619519122339214063398230494067942295987016754503060997355109186638667322723996572842157209194651881355085513631695628096402419719096882984119uwb, + 6042770678215430693640419990277820504092375118859355031950453294245655804901016852383090438332300632578629742514358616423826815593825261808316937209844323511uwb, + 12051208019451501933403724997574202861308205865422702777923943166771946439789370797531339169859679650622650974816793351928749417853531441599839154382248843947uwb, + 4221662083598509731422820533439331938122897651286500598721158769592271101088973546986107452648130743363570867708770978567950497328105753210259754199339698436uwb, + 0, 0, 0, 0, 0, + 7875787883122370015751284313157111317906983827437747001268058546750891954500439966161560575930887369730973089278944338386239832138713121400371960426603537532uwb, + 1744137654875073805109882450938570695232931878270397801451971688045434401366666192926859108662009962657770297731676696275736871955838688525022864084574797580uwb, + 1384759081458967898144776881134701550216992364037761109180860974761009009582780990796335747812536429464522433496147744197656107248393986692577240524935263967uwb, + 5124843933530741349702512002787631405197501632531242713014934699385673582868823319052853705098680028945536856890553829308345383420583019490169170519445809329uwb, + 167148589759802650246016819120863239719632156514525854640607511535259699817887971573240690630534000867480233158226351195963838422746014594980644913152uwb + }; + static unsigned _BitInt(547) t547[15] = { + 118704181285368794475444886856018739380810770111464325340905883331118179085356913273672350794295633026214255802587734669771992302197074150034392332589894477800891435uwb, + 270940858229872855030935066513853051367534588484589172383739756326100509416298021769516239928911004114519037087137992976731526127660469862578530915810061315551592797uwb, + 148318595435099152643319192673870560615622574014851374282185242873863044665507345404380126683143560616100080924441878075099797842853873146415865873849906128482858719uwb, + 400009336874533540769201404797235801738671871521831649835366524748844548359672560304665337919920648881530376390480880285772783211641574132727624581374918623770667162uwb, + 312402853341542293879363014443999872603984243465217297921316340174779530859340793778010030453656373118302384722907441723040044092150534190429029290814183834885671793uwb, + 0, 0, 0, 0, 0, + 460688772082162445798867876757263237463152967782366598900331124229116988777566044118861599994996502169289915386539783342538027404687796097956601373975276229385346254uwb, + 110154623692678850196652173379922527637463658741605878515537649114990721104784513051339522805651918716345423521491055109328010793688754512750702811781309047768676546uwb, + 6042770678215430693640419990277820504092375118859355031950453294245655804901016852383090438332300632578629742514358616423826815593825261808316937209844323511uwb, + 399932168246430744543441055162559648552560119213629719844739099564504242321283467689573394637126627461985951275205392441444721842415628268892060247464270805433239423uwb, + 959894824427126361893629230835206712554940543506404673899205310952372906533349475236288402049497277258426690357003048704416527773015730692863997uwb + }; + static unsigned _BitInt(575) u575[15] = { + 99465403292080375994166564143758974423715332054535509951564765439354460753284837794651681099567775806058182781885452212314717097157170419602135858778485292072068230160566460uwb, + 88608049883790202897201248133818379667781926476953929504091250051759382873398323059272759974739854128718622623196375150866798266503497028016169226040920220555730755500552765uwb, + 109996629797150279215121425420517668082012320009431263010584742106213909329388552729870453505045429145144806346761163201752908500506299217142569716987778685190706093716744369uwb, + 79085012468256116329498575277619682348270018511342269619476165669326091481750859826134218624634485255862979362030324907252864643018828592244764325998135532395602379128096639uwb, + 66159275290347502690275324386397674256469688848451250551469155682688473691401346605236603803735518810344975633814051516285290687587632060625865757225821322257077271128705141uwb, + 0, 0, 0, 0, 0, + 1359131269843466711194682581441372588504604777186075559309941421522168913086212721229905012023237380094986736934464910421922092415050027946837562847761546642uwb, + 123665200667574998698324851573506035436563350330459910341343826919194426096459911939793978345979520571463909670260227362037152642119068825187329447746921937620359214466454130uwb, + 12051208019451501933403724997574202861308205865422702777923943166771946439789370797531339169859679650622650974816793351928749417853531441599839154382248843947uwb, + 400009336874533540769201404797235801738671871521831649835366524748844548359672560304665337919920648881530376390480880285772783211641574132727624581374918623770667162uwb, + 109996629937126023660527287777369469494501925435246782331888159188751453565732251262053894836875827628606881325496392400843347632343245675592597560475194478367377989115148799uwb + }; + test522_547_575 (p522, q547, r575, s522, t547, u575, 42); + for (int i = 5; i < 10; ++i) + if (p522[i] != p522[i + 5] + || q547[i] != q547[i + 5] + || r575[i] != r575[i + 5] + || s522[i] != s522[i + 5] + || t547[i] != t547[i + 5] + || u575[i] != u575[i + 5]) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-16.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-16.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,385 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 256 +__attribute__((noipa)) void +test135_192_228_256 (unsigned _BitInt(135) *p, unsigned _BitInt(192) *q, + unsigned _BitInt(228) *r, unsigned _BitInt(256) *s) +{ + r[6] = (_BitInt(135)) (p[0] + p[1] + p[2]); + s[6] = (_BitInt(135)) (p[0] - p[1] + p[2]); + r[7] = p[0] + p[1] - p[2]; + s[7] = p[0] - p[1] - p[2]; + r[8] = (_BitInt(192)) (q[0] + q[1] + q[2]); + s[8] = (_BitInt(192)) (q[0] - q[1] + q[2]); + r[9] = q[0] + q[1] - q[2]; + s[9] = q[0] - q[1] - q[2]; + p[6] = (_BitInt(135)) (r[0] + r[1] + r[2]); + q[6] = (_BitInt(135)) (r[0] - r[1] + r[2]); + p[7] = r[0] + r[1] - r[2]; + q[7] = r[0] - r[1] - r[2]; + p[8] = (_BitInt(192)) (s[0] + s[1] + s[2]); + q[8] = (_BitInt(192)) (s[0] - s[1] + s[2]); + p[9] = s[0] + s[1] - s[2]; + q[9] = s[0] - s[1] - s[2]; + r[10] = ((unsigned _BitInt(228)) ((_BitInt(135)) p[3])) + ((_BitInt(135)) p[4]) + ((_BitInt(135)) p[5]); + s[10] = ((unsigned _BitInt(256)) ((_BitInt(135)) p[3])) + ((_BitInt(135)) p[4]) + ((_BitInt(135)) p[5]); + r[11] = ((unsigned _BitInt(228)) p[3]) + p[4] + p[5]; + s[11] = ((unsigned _BitInt(256)) p[3]) + p[4] + p[5]; + r[12] = ((unsigned _BitInt(228)) ((_BitInt(192)) q[3])) + ((_BitInt(192)) q[4]) + ((_BitInt(192)) q[5]); + s[12] = ((unsigned _BitInt(256)) ((_BitInt(192)) q[3])) + ((_BitInt(192)) q[4]) + ((_BitInt(192)) q[5]); + r[13] = ((unsigned _BitInt(228)) q[3]) + q[4] + q[5]; + s[13] = ((unsigned _BitInt(256)) q[3]) + q[4] + q[5]; + p[10] = ((unsigned _BitInt(135)) r[3]) + ((unsigned _BitInt(135)) r[4]) + ((unsigned _BitInt(135)) r[5]); + q[10] = ((unsigned _BitInt(192)) r[3]) + ((unsigned _BitInt(192)) r[4]) + ((unsigned _BitInt(192)) r[5]); + p[11] = ((unsigned _BitInt(135)) s[3]) + ((unsigned _BitInt(135)) s[4]) + ((unsigned _BitInt(135)) s[5]); + q[11] = ((unsigned _BitInt(192)) s[3]) + ((unsigned _BitInt(192)) s[4]) + ((unsigned _BitInt(192)) s[5]); + p[12] = ((_BitInt(228)) ((_BitInt(135)) p[3])) < ((_BitInt(228)) ((_BitInt(135)) p[4])); + q[12] = ((_BitInt(256)) ((_BitInt(135)) p[3])) > ((_BitInt(256)) ((_BitInt(135)) p[4])); + p[13] = ((_BitInt(228)) ((unsigned _BitInt(135)) p[3])) <= ((unsigned _BitInt(228)) ((_BitInt(135)) p[4])); + q[13] = ((_BitInt(256)) ((unsigned _BitInt(135)) p[3])) >= ((unsigned _BitInt(256)) ((_BitInt(135)) p[4])); + p[14] = ((_BitInt(228)) ((_BitInt(192)) q[3])) < ((_BitInt(228)) ((_BitInt(192)) q[4])); + q[14] = ((_BitInt(256)) ((_BitInt(192)) q[3])) <= ((_BitInt(256)) ((_BitInt(192)) q[4])); + r[14] = ((_BitInt(228)) ((unsigned _BitInt(192)) q[3])) >= ((unsigned _BitInt(228)) ((_BitInt(192)) q[4])); + s[14] = ((_BitInt(256)) ((unsigned _BitInt(192)) q[3])) > ((unsigned _BitInt(256)) ((_BitInt(192)) q[4])); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test470_512_519_575 (unsigned _BitInt(470) *p, unsigned _BitInt(512) *q, + unsigned _BitInt(519) *r, unsigned _BitInt(575) *s) +{ + r[6] = (_BitInt(470)) (p[0] + p[1] + p[2]); + s[6] = (_BitInt(470)) (p[0] - p[1] + p[2]); + r[7] = p[0] + p[1] - p[2]; + s[7] = p[0] - p[1] - p[2]; + r[8] = (_BitInt(512)) (q[0] + q[1] + q[2]); + s[8] = (_BitInt(512)) (q[0] - q[1] + q[2]); + r[9] = q[0] + q[1] - q[2]; + s[9] = q[0] - q[1] - q[2]; + p[6] = (_BitInt(470)) (r[0] + r[1] + r[2]); + q[6] = (_BitInt(470)) (r[0] - r[1] + r[2]); + p[7] = r[0] + r[1] - r[2]; + q[7] = r[0] - r[1] - r[2]; + p[8] = (_BitInt(512)) (s[0] + s[1] + s[2]); + q[8] = (_BitInt(512)) (s[0] - s[1] + s[2]); + p[9] = s[0] + s[1] - s[2]; + q[9] = s[0] - s[1] - s[2]; + r[10] = ((unsigned _BitInt(519)) ((_BitInt(470)) p[3])) + ((_BitInt(470)) p[4]) + ((_BitInt(470)) p[5]); + s[10] = ((unsigned _BitInt(575)) ((_BitInt(470)) p[3])) + ((_BitInt(470)) p[4]) + ((_BitInt(470)) p[5]); + r[11] = ((unsigned _BitInt(519)) p[3]) + p[4] + p[5]; + s[11] = ((unsigned _BitInt(575)) p[3]) + p[4] + p[5]; + r[12] = ((unsigned _BitInt(519)) ((_BitInt(512)) q[3])) + ((_BitInt(512)) q[4]) + ((_BitInt(512)) q[5]); + s[12] = ((unsigned _BitInt(575)) ((_BitInt(512)) q[3])) + ((_BitInt(512)) q[4]) + ((_BitInt(512)) q[5]); + r[13] = ((unsigned _BitInt(519)) q[3]) + q[4] + q[5]; + s[13] = ((unsigned _BitInt(575)) q[3]) + q[4] + q[5]; + p[10] = ((unsigned _BitInt(470)) r[3]) + ((unsigned _BitInt(470)) r[4]) + ((unsigned _BitInt(470)) r[5]); + q[10] = ((unsigned _BitInt(512)) r[3]) + ((unsigned _BitInt(512)) r[4]) + ((unsigned _BitInt(512)) r[5]); + p[11] = ((unsigned _BitInt(470)) s[3]) + ((unsigned _BitInt(470)) s[4]) + ((unsigned _BitInt(470)) s[5]); + q[11] = ((unsigned _BitInt(512)) s[3]) + ((unsigned _BitInt(512)) s[4]) + ((unsigned _BitInt(512)) s[5]); + p[12] = ((_BitInt(519)) ((_BitInt(470)) p[3])) < ((_BitInt(519)) ((_BitInt(470)) p[4])); + q[12] = ((_BitInt(575)) ((_BitInt(470)) p[3])) > ((_BitInt(575)) ((_BitInt(470)) p[4])); + p[13] = ((_BitInt(519)) ((unsigned _BitInt(470)) p[3])) <= ((unsigned _BitInt(519)) ((_BitInt(470)) p[4])); + q[13] = ((_BitInt(575)) ((unsigned _BitInt(470)) p[3])) >= ((unsigned _BitInt(575)) ((_BitInt(470)) p[4])); + p[14] = ((_BitInt(519)) ((_BitInt(512)) q[3])) < ((_BitInt(519)) ((_BitInt(512)) q[4])); + q[14] = ((_BitInt(575)) ((_BitInt(512)) q[3])) <= ((_BitInt(575)) ((_BitInt(512)) q[4])); + r[14] = ((_BitInt(519)) ((unsigned _BitInt(512)) q[3])) >= ((unsigned _BitInt(519)) ((_BitInt(512)) q[4])); + s[14] = ((_BitInt(575)) ((unsigned _BitInt(512)) q[3])) > ((unsigned _BitInt(575)) ((_BitInt(512)) q[4])); +} +#endif + +#if __BITINT_MAXWIDTH__ >= 574 +__attribute__((noipa)) void +test138_192_523_574 (unsigned _BitInt(138) *p, unsigned _BitInt(192) *q, + unsigned _BitInt(523) *r, unsigned _BitInt(574) *s) +{ + r[6] = (_BitInt(138)) (p[0] + p[1] + p[2]); + s[6] = (_BitInt(138)) (p[0] - p[1] + p[2]); + r[7] = p[0] + p[1] - p[2]; + s[7] = p[0] - p[1] - p[2]; + r[8] = (_BitInt(192)) (q[0] + q[1] + q[2]); + s[8] = (_BitInt(192)) (q[0] - q[1] + q[2]); + r[9] = q[0] + q[1] - q[2]; + s[9] = q[0] - q[1] - q[2]; + p[6] = (_BitInt(138)) (r[0] + r[1] + r[2]); + q[6] = (_BitInt(138)) (r[0] - r[1] + r[2]); + p[7] = r[0] + r[1] - r[2]; + q[7] = r[0] - r[1] - r[2]; + p[8] = (_BitInt(192)) (s[0] + s[1] + s[2]); + q[8] = (_BitInt(192)) (s[0] - s[1] + s[2]); + p[9] = s[0] + s[1] - s[2]; + q[9] = s[0] - s[1] - s[2]; + r[10] = ((unsigned _BitInt(523)) ((_BitInt(138)) p[3])) + ((_BitInt(138)) p[4]) + ((_BitInt(138)) p[5]); + s[10] = ((unsigned _BitInt(574)) ((_BitInt(138)) p[3])) + ((_BitInt(138)) p[4]) + ((_BitInt(138)) p[5]); + r[11] = ((unsigned _BitInt(523)) p[3]) + p[4] + p[5]; + s[11] = ((unsigned _BitInt(574)) p[3]) + p[4] + p[5]; + r[12] = ((unsigned _BitInt(523)) ((_BitInt(192)) q[3])) + ((_BitInt(192)) q[4]) + ((_BitInt(192)) q[5]); + s[12] = ((unsigned _BitInt(574)) ((_BitInt(192)) q[3])) + ((_BitInt(192)) q[4]) + ((_BitInt(192)) q[5]); + r[13] = ((unsigned _BitInt(523)) q[3]) + q[4] + q[5]; + s[13] = ((unsigned _BitInt(574)) q[3]) + q[4] + q[5]; + p[10] = ((unsigned _BitInt(138)) r[3]) + ((unsigned _BitInt(138)) r[4]) + ((unsigned _BitInt(138)) r[5]); + q[10] = ((unsigned _BitInt(192)) r[3]) + ((unsigned _BitInt(192)) r[4]) + ((unsigned _BitInt(192)) r[5]); + p[11] = ((unsigned _BitInt(138)) s[3]) + ((unsigned _BitInt(138)) s[4]) + ((unsigned _BitInt(138)) s[5]); + q[11] = ((unsigned _BitInt(192)) s[3]) + ((unsigned _BitInt(192)) s[4]) + ((unsigned _BitInt(192)) s[5]); + p[12] = ((_BitInt(523)) ((_BitInt(138)) p[3])) < ((_BitInt(523)) ((_BitInt(138)) p[4])); + q[12] = ((_BitInt(574)) ((_BitInt(138)) p[3])) > ((_BitInt(574)) ((_BitInt(138)) p[4])); + p[13] = ((_BitInt(523)) ((unsigned _BitInt(138)) p[3])) <= ((unsigned _BitInt(523)) ((_BitInt(138)) p[4])); + q[13] = ((_BitInt(574)) ((unsigned _BitInt(138)) p[3])) >= ((unsigned _BitInt(574)) ((_BitInt(138)) p[4])); + p[14] = ((_BitInt(523)) ((_BitInt(192)) q[3])) < ((_BitInt(523)) ((_BitInt(192)) q[4])); + q[14] = ((_BitInt(574)) ((_BitInt(192)) q[3])) <= ((_BitInt(574)) ((_BitInt(192)) q[4])); + r[14] = ((_BitInt(523)) ((unsigned _BitInt(192)) q[3])) >= ((unsigned _BitInt(523)) ((_BitInt(192)) q[4])); + s[14] = ((_BitInt(574)) ((unsigned _BitInt(192)) q[3])) > ((unsigned _BitInt(574)) ((_BitInt(192)) q[4])); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 256 + static unsigned _BitInt(135) p135[24] = { + 4187273188098476865668456823817923591884uwb, + 6807534906955493735159263291613578822092uwb, + 41026661032626929517457579844514879338728uwb, + 21107725719388574292787309710748598888876uwb, + 37762806761430755157975144430695583115875uwb, + 26495620887646122219041406684145481614415uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24294442897610200845563470372394790405427uwb, + 14494728260279138634407444539578218061153uwb, + 35692618919905757032302955601299560733828uwb, + 2073608133107652132583703172274308589354uwb, + 23162446968047093866488519785733079173672uwb, + 23215356388255044329396934936113503903836uwb, + 0uwb, + 1uwb, + 0uwb + }; + static unsigned _BitInt(192) q192[24] = { + 2086085555369597859021791929925392355640686637062909369671uwb, + 2680579114698255110186052616880338377881530773942412775534uwb, + 3327728695296211902341553047509833116972847770197432421329uwb, + 5940317943727487997168783552089315457607206947999336887004uwb, + 5542354187267299678821667349861772942889507214082859925027uwb, + 3271998891636156295842018666243687525289384908182662772181uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 19403341198470336643414519815259741762743uwb, + 5896270732876306173690375572457711356577732208000026578149uwb, + 5124631678261056717896926088333660842277657529754581693718uwb, + 3443509077298665851293720223028023121358922119534917222332uwb, + 5756578284734093802702142887739107033567473420998759418408uwb, + 4630861060283249917347323439223922476602768583090317402204uwb, + 1uwb, + 0uwb, + 0uwb + }; + static unsigned _BitInt(228) r228[24] = { + 161966633757691155241945327015229701994331693366818788921573408319756uwb, + 38296346596827362616775983079516749483975676455899963878059782490174uwb, + 241591800199660287949868996521720659189646617902754527264229209396201uwb, + 428902738798964850544466128550714169355105701114620489106903291340964uwb, + 235528598555728562847947927417825731721784962388084030737368213942614uwb, + 256292789834236084059292238814861516121661392325304427878120090497070uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8465326161800776794973350208680050686336uwb, + 13524290028307164406682090022182954141616uwb, + 1817291629977384107713608171107897434392709736738720053638uwb, + 1438935974771641066866291499295897616549369640807889723876uwb, + 431359146674410236714672241390567958214899515783829121020714765473886uwb, + 85366153368465451669803860825589663619166uwb, + 431359146670333602531143143072639192076766087438128192434530520032980uwb, + 14754671022630943971832469568194775925786099070264859584212uwb, + 0uwb + }; + static unsigned _BitInt(256) s256[24] = { + 33689368506800899324387091792297880425309542585828646830789259960880991063584uwb, + 39571323848345650718084485253626478678560275338021939071625078673058668106679uwb, + 110504693488819055796063554254198165064817853023249665372075921323272516500141uwb, + 102297428517176642359444223748374693989314404662584768443522888625651626181283uwb, + 80244728165314710913956389448156622901095909768247496334097456157707270969074uwb, + 103665915010005983358711046736784166330673952063454224485339530724102504302279uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 115792089237316195423570985008687907848120241013530353364112407633366022682088uwb, + 43465363180276300259675513190222127563800uwb, + 2733235135967554651177292360554887094732003633317929015466uwb, + 2354879480761811610329975688742887276888663537387098685704uwb, + 115792089237316195423570985008687907851523852102345769062637545330970131126366uwb, + 85366153368465451669803860825589663619166uwb, + 115792089237316195419494350825158809533595085964212340716936616744785885685460uwb, + 14754671022630943971832469568194775925786099070264859584212uwb, + 0uwb + }; + test135_192_228_256 (p135, q192, r228, s256); + for (int i = 6; i < 15; ++i) + if (p135[i] != p135[i + 9] + || q192[i] != q192[i + 9] + || r228[i] != r228[i + 9] + || s256[i] != s256[i + 9]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static unsigned _BitInt(470) p470[24] = { + 290679861857217105576749510785172236097196317219002071340131005135259342235163792727727620685697644545754092322618593967328975789101613622756uwb, + 3007766161917260990990922308983802917798001363835330597758175849272351861703814650851622073672692222948955250827120638757725725607466346547961uwb, + 574060276709923148626402211078479568921550247040425483673763765831291153847648453629069366560426848580089729851582562589160127450838856742850uwb, + 1513032643015460548072615957037831807842396447090608200111284706851223881642236182620260811534047670872236957008209636843038402328412186623867uwb, + 736018121751614604248763744490396332128994581237940802611521314820643126961848250509301799425532301686788266718861244200351342613056372468552uwb, + 30155063271645468057678848208011195960933215968662731964986808367634269990062216294334734731269355557159014770813970386099476462377224708070uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 2336276654669971355000545579045474018643499545251683574017489057360457587609182251538648565538596336349157530705582440962441081292975829750725uwb, + 2811887457092416012110559147431839355552932271928059605261212342070741952382405730371093476958614469776023370616340687057532287796176219869449uwb, + 1454614080118846581654283867177010224989739028600678358170065228650331074859011839166100981351630244514069807407054058295180885648638359156315uwb, + 1452099984535181412105251439415950646129930223001670876794248464265033550302786152371528494721306355739311614007226227128382131037961688117145uwb, + 1700131771206195433306793035837240564903007159128880173423363038992576767815643454391004339339329935701073991719473097155654566696420734301605uwb, + 687646008549017812028590579565520345681613774085522641973968443446824759773421489288886130070355380390157446333512774944224841451835655874095uwb, + 0uwb, + 0uwb, + 1uwb + }; + static unsigned _BitInt(512) q512[24] = { + 11999607180890662234640611094796125402682182607671756821443119677915957826104697013256706604957461530042481930446302956354396703791101848051437136984190670uwb, + 1669399929141703249463393746110522414573291237669539702537374904052097169767189303794997941915228747803109873985069631915369758962889453579386958506452828uwb, + 11378992935330313540343401440793120879643841271871581700686172052228324616806874974534345697693861690426360116949795282888644662188134499896194148433768387uwb, + 9993083190971384981726645923137348157759809443699348826766460590248782912389872021894301181692065821343040669086846645954670076835055767363529908044878460uwb, + 4194741102820399815388565886074911339757551809782406262401319165104710890785047966633447456093482200519894213755964462654816313685699735398967845201704233uwb, + 2421595337545745821088215118098296983215379552867408581490131959698723606384411644669422390261525987191387981272012502904825570949628276538570672660290088uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1513903473639259387274129463605791299347099137673287344952013483163916537193546764015586855259820134007663746976291793381162392640818043683999uwb, + 12277156682318352235712463688522823330952278031457456554222055921981909263024261498262481023121115845377546131965398459894872235113782544708914458317029859uwb, + 4027845254315197169423233647114376033430305844071443075105613565290966574715062841638133555232740863237407025233981863916917198547523085200055676796066563uwb, + 10707639349311374361511081362429794348061398948029634783963376915733257208356397594815368492279579755336561685612483789993986308827288890748132804532704321uwb, + 11909891944680678452073045961414477447224653685643721320079864331428768064778333088269746747399111241079878764522077445502337140106279379768026249427056037uwb, + 5596625625751028170955045723080584878265817548746738005171988990687430526534540571089022256509279287347335747951148567883951414510786508005390890674578991uwb, + 1uwb, + 1uwb, + 1uwb + }; + static unsigned _BitInt(519) r519[24] = { + 1030342010401113812244886675533462199253435182769422147430754601621146628252085744300635665226057568402783959871999680067593144181093412956713229194456894164uwb, + 1399286804337892133001051165724092281210924970185276871571622362921173888386145177372320997003882614750136133472548611361735698398271314700469097220046489491uwb, + 1187491577184187187658283970910931091626643735561997844498566871693437222121521301715871480084581538847004007675304538195851777836706064395267954449805214046uwb, + 1590038038660143030887559697627655997346700459420257472659393551660904723658903805269248515919541163543209428329235720802030325145482255847896549116166445779uwb, + 884402951942479884942778411278542758813719790602900630698855595508395145632292880569268024966776717352051287824788383446062053991609910742048548988449536210uwb, + 326292950770117959333132136682031715802512494345703440528331497456255817028879418424543059879797143305345789113287071774990765627898999338681127138076566016uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 823923731816440081735482986127565752359132554398497263261175151854750269095449533809682632145875337989030585578073140142878915098101850794143uwb, + 2724385747064554947941269608690495584973647434013907185424543088576320050091329989950280327797963018914619613298156670135894573945729103427867uwb, + 1714431799218129913570774556055636380759299408511854443817835408543138647401945680368622211813596383857215966052878410278731400359247393614777658018691007981uwb, + 2290014174702051943760603400113526937611632573469714823294322529739730379065011342517358849178828587419231687481577305381121800565856801734629947056875111uwb, + 2279205828038720620379058549736239335932324244297211734687792830039501278594146649423897345690849328116184238497884851429489221403845783800489uwb, + 2279205828038720620379058549736239335932324244297211734687792830039501278594146649423897345690849328116184238497884851429489221403845783800489uwb, + 3201611701394933518629401929104710353253374985756770292934350271330453379485784656395296729880170581364291005928337560660558078658437209354634776900788685uwb, + 16609419631337530618203426927310556480732740806349163670657911715052217409559331633197171028047074009054322864114823611514311961470383779301068425906872781uwb, + 1uwb + }; + static unsigned _BitInt(575) s575[24] = { + 96927313110651552741697906285845027560278665167912446772243994455709167318164555507475733363294500975052442014691905285678776198101396126432691790596947740988776944060654926uwb, + 102707772385622802706823804871287360126470122215207829602545757786870641626119828685986043329520959072898431094747590180228385563652833016000194460109692900249703592758013356uwb, + 110583747014804561196219218561034468168713024547408050239450245043477530907411843124501635977214033600051542621634445064425297114819990148482732834711384300709771384106312545uwb, + 54306775370484796829739172393424070839859954453514190131950827429084664762249620446751937114044786249494515203860165437770921772021031551664278887501083036990545747406428169uwb, + 46114759885997746928772223321204027410936673207704735367438056888037044881883997045448409583831956188379542065205564192543381437121786101651883495914008056100188006564313178uwb, + 35190453913973191463478013966823372048936778121696189495901809463574016396767724553244869787736619209084040172125210006605333310947417602727114932375121134023666009552590284uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 905556545317840426670820457599737857678360574120357846766614390078350723070174958903911342346373648262657058770329172970099291381779089937069uwb, + 2806018560565955292876607080162667690292875453735767768929982326799920504066055415044509037998461329188246086490412702963114950229406342570793uwb, + 123665200736552267025144844837017673343938243343672951569825529047137624617410727523806857743618811225191141477410357286961350974191432110603936918943400338433680414973687605uwb, + 12359022246361242544407840906098328235944415918723028795943134165357300069604179711729237263515274519503043797697924092404136165452024464522289679050053551uwb, + 2279205828038720620379058549736239335932324244297211734687792830039501278594146649423897345690849328116184238497884851429489221403845783800489uwb, + 2279205828038720620379058549736239335932324244297211734687792830039501278594146649423897345690849328116184238497884851429489221403845783800489uwb, + 3201611701394933518629401929104710353253374985756770292934350271330453379485784656395296729880170581364291005928337560660558078658437209354634776900788685uwb, + 16609419631337530618203426927310556480732740806349163670657911715052217409559331633197171028047074009054322864114823611514311961470383779301068425906872781uwb, + 1uwb + }; + test470_512_519_575 (p470, q512, r519, s575); + for (int i = 6; i < 15; ++i) + if (p470[i] != p470[i + 9] + || q512[i] != q512[i + 9] + || r519[i] != r519[i + 9] + || s575[i] != s575[i + 9]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 574 + static unsigned _BitInt(138) p138[24] = { + 101422284254667607392742201719883227411625uwb, + 160466466586635795278252037831376082677350uwb, + 25107605609849786823351214520760656620933uwb, + 295969175246745649031682884402595713219313uwb, + 13181527086641487248448136085636319944955uwb, + 235130534778709326353598872018612896874473uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 167302456247167982996160810773690897220075uwb, + 297389206356979455260412959683265332806635uwb, + 335394759052458807357434855405547433962500uwb, + 321901396962914134364671486134447068161226uwb, + 120351777790732110377699121565672639601425uwb, + 198373944314536120634408834917264425196481uwb, + 1uwb, + 0uwb, + 1uwb + }; + static unsigned _BitInt(192) t192[24] = { + 911018684451330895893338523816772465484522458698266889768uwb, + 2046183627271691614636061554682220483052698404211100534853uwb, + 4678069061913127216263854322789964375230426789917042687454uwb, + 3459784480694777343275716409755634649190978443376335561303uwb, + 3867595273303447369888355921671728883273018646069926566645uwb, + 4813052987333975223830750234077960301742057680559503213273uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6277101735386680684990022390197371509564931202241440203909uwb, + 1278608194268128077434264942601213585924783150489231066757uwb, + 4029427835151946963573253373549922510624267261072515255840uwb, + 672033229033398034156049846020027986275380626166731032294uwb, + 1357991472586126795792080074222943985598370321805879319313uwb, + 2856538916789713009071224987092580961800045494832854440897uwb, + 0uwb, + 1uwb, + 1uwb + }; + static unsigned _BitInt(523) r523[24] = { + 3195765699538496998535864601292347963256629173162679399458238383409531673496364786350189170351629279748663665677408547146700561030889355712400808816914064440uwb, + 11159477301642000894502707350448750665412836731536210953742141163262563390545287499722678844509966339767235942912910312315832667904302744531360002727358824115uwb, + 22101560948582634345286310809677329764046784779464227969587135587282924532940609616951363156766482627364659628549350689295905244730986420796580267097794699008uwb, + 3492227525200477614910950479637037651613240112641204783475954014565794311494477327458692721172240707535504736878649393132370069751011176314509944329056779358uwb, + 4470424684397392413407392569484317542436005833167916532642765757801563745613041876920796693178762870199674360069594704277190939739704629258367293449899462004uwb, + 13549742618125959998093915668094856307843206900469464436576203440358812289708508455667681082349827642620118118540849103671482396581682398406739495271235801407uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 27459190640522438859927603196325572869077741200573221637577853836742172733590624208490238562645818219909185245565923370695700676111069483100152175053778407572uwb, + 236781145231453615847643025030498653468042uwb, + 1358169638249468962957464978081290907665292208362375599179uwb, + 4556234985196576058101335178916694989409149517456359250063uwb, + 27459190640522438859927603196325572869077741200573221637577853836742172733590624208490238562645818219909185245565923279531437610013356035988992599748093205461uwb, + 544281237112096462633729892506844930038741uwb, + 27459190640522438859927603196325572869077741200573221637577853836742172733590624208490238562645818213218312780738081077635942247881191161149284549778122031141uwb, + 12140432741332199936994822565505323834206054770005765341221uwb, + 0uwb + }; + static unsigned _BitInt(574) s574[24] = { + 49523656310311432476097096707674348247864532997580458449189999134679927949102290921020347613627600560130921641399166416960416734901407545116688589513670229626633588928674165uwb, + 42569658590233851212367348547775997184555788503209190045856322440515976044599442772511746833320065456241311597243171150757254859304810272116865990700066734780242713347731186uwb, + 19981999860412564491215269984435969976814910925473334223760435541572601828084228297697056388524273994976358111097326046010839057122757304450178767567932398574496781000082333uwb, + 8558322198907185372332169456108688881070480268559248312027066736995799133128362338305761323248219317368913715505110464564580744145522428754123209057064241016828671823488793uwb, + 43811765949130776561433192718564194559949284938162910217959397270715482324290476494691373258084890889610745910962659657029995968487465144041804156738366622609326192386149788uwb, + 45992921207674703917316226268947032522368981737128477902399950788131403664441772601690186531393245791394478464207683996776726761730838587963296718352656413407075666840676108uwb, + 0, 0, 0, 0, 0, 0, 0, 0, 0, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576653865915164420374411133357560960838529992uwb, + 264297355785223011877634547377877136644286uwb, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504032100640224964662421487833755255625414851874551633211704257uwb, + 463867730653192828829212069552254023303752709034158180357uwb, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576535185441544553264934030675638276670151637uwb, + 544281237112096462633729892506844930038741uwb, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504028143965376430734333289946182421100059190967588306698977317uwb, + 12140432741332199936994822565505323834206054770005765341221uwb, + 0uwb + }; + test138_192_523_574 (p138, t192, r523, s574); + for (int i = 6; i < 15; ++i) + if (p138[i] != p138[i + 9] + || t192[i] != t192[i + 9] + || r523[i] != r523[i + 9] + || s574[i] != s574[i + 9]) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-17.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-17.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,82 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +test192 (int a, int b, int c, int d, int e, int f, int g) +{ + _BitInt(192) r; + if (a) + r = 0wb; + else if (b) + r = -1wb; + else if (c) + r = 8509079622807245684wb; + else if (d) + r = -906140470171472463wb; + else if (e) + r = 16213049720239626860wb; + else if (f) + r = 147892183939833533694801609136018843670wb; + else if (g) + r = -65591640145960897840899726907249505215wb; + else + r = 2430673202376479588648422478850704999441011825542092986793wb; + return r; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +test575 (int a, int b, int c, int d, int e, int f, int g) +{ + _BitInt(575) r; + if (a) + r = 0wb; + else if (b) + r = -1wb; + else if (c) + r = 8509079622807245684wb; + else if (d) + r = -906140470171472463wb; + else if (e) + r = 16213049720239626860wb; + else if (f) + r = 147892183939833533694801609136018843670wb; + else if (g) + r = -65591640145960897840899726907249505215wb; + else + r = -61793624342683909782972416440098036406501521208177932544452266579025268523357080574330290352054553626825262073339234752683755828499698570848704076099511077751520231100121930wb; + return r; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + if (test192 (1, 0, 0, 0, 0, 0, 0) != 0wb + || test192 (0, 1, 0, 0, 0, 0, 0) != -1wb + || test192 (0, 0, 1, 0, 0, 0, 0) != 8509079622807245684wb + || test192 (0, 0, 0, 1, 0, 0, 0) != -906140470171472463wb + || test192 (0, 0, 0, 0, 1, 0, 0) != 16213049720239626860wb + || test192 (0, 0, 0, 0, 0, 1, 0) != 147892183939833533694801609136018843670wb + || test192 (0, 0, 0, 0, 0, 0, 1) != -65591640145960897840899726907249505215wb + || test192 (0, 0, 0, 0, 0, 0, 0) != 2430673202376479588648422478850704999441011825542092986793wb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (test575 (1, 0, 0, 0, 0, 0, 0) != 0wb + || test575 (0, 1, 0, 0, 0, 0, 0) != -1wb + || test575 (0, 0, 1, 0, 0, 0, 0) != 8509079622807245684wb + || test575 (0, 0, 0, 1, 0, 0, 0) != -906140470171472463wb + || test575 (0, 0, 0, 0, 1, 0, 0) != 16213049720239626860wb + || test575 (0, 0, 0, 0, 0, 1, 0) != 147892183939833533694801609136018843670wb + || test575 (0, 0, 0, 0, 0, 0, 1) != -65591640145960897840899726907249505215wb + || test575 (0, 0, 0, 0, 0, 0, 0) != -61793624342683909782972416440098036406501521208177932544452266579025268523357080574330290352054553626825262073339234752683755828499698570848704076099511077751520231100121930wb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-18.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-18.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,117 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 251 +__attribute__((noipa)) _BitInt(251) +foo_251 (_BitInt(251) x, _BitInt(251) y, _BitInt(251) z) +{ + return (x * 42) + (y + z) * -13295847598437589437584395wb; +} + +__attribute__((noipa)) _BitInt(251) +bar_251 (_BitInt(251) x, unsigned _BitInt(211) y, _BitInt(251) z) +{ + if (x >= 139845735984wb || x <= -139845735984wb) + __builtin_unreachable (); + return (x * 42) + y * z; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 274 && defined(__SIZEOF_INT128__) +__attribute__((noipa)) _BitInt(574) +foo_574 (_BitInt(574) x, __int128 y, int z) +{ + return x * y + x * z; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 274 +__attribute__((noipa)) unsigned _BitInt(574) +bar_574 (unsigned _BitInt(574) x, _BitInt(231) y, unsigned _BitInt(231) z, unsigned _BitInt(574) a) +{ + _BitInt(287) w = y; + _BitInt(231) v = (_BitInt(231)) z; + _BitInt(287) u = v; + return x * w + a * u; +} + +__attribute__((noipa)) unsigned _BitInt(271) +baz_574 (unsigned _BitInt(271) x, _BitInt(574) y) +{ + if (y >= 139845735984wb || y <= -139845735984wb) + __builtin_unreachable (); + return x * (unsigned _BitInt(271)) y; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 251 + static _BitInt(251) s251[] = { + 14492268074422240072381201900068160215333038638908804267546082474872103453wb, + 675218251468166080020913826378654880460963853057558284085495091870180550wb, + -675218251468166080020959605725458087975245668339558473870927889256690061wb, + -139845735981wb, + 324639141258847384727959753569292057577687203071371684930924253wb, + 1087290800830wb + }; + _BitInt(251) a251 = foo_251 (s251[0], s251[1], s251[2]); + if (a251 != 1217350477377202249120031439408588187131962868502518732097281406269161025871wb) + __builtin_abort (); + _BitInt(251) b251 = bar_251 (s251[3], s251[4], s251[5]); + if (b251 != 352977151880095667263614472150365012179801988966714554955131068402918618788wb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 574 + static _BitInt(574) s574 + = -219356128782553279814913626158411711140801689317931406799100755440262023325014648411412728943485405803043129187408541215111743475318581wb; +#ifdef __SIZEOF_INT128__ + _BitInt(574) a574 = foo_574 (s574, 82625523151678902953603407887262843433wb, -1845137725); + if (a574 != -18124414897185514989959611747585480593042904176332662608326479231051632926435887114574980277665683285141927551496724599123576825185653577703648854819279658769883513402160348wb) + __builtin_abort (); +#endif + static unsigned _BitInt(574) u574[] = { + 52437079816179410811636905891411754807147405868482583243559735153324503490239312503359712796401481190029201386135205713917847314204739635852931994918423899615130723009259686uwb, + 45269866460552189474732773540973151549203847819115194862112414296072167098695417407106646749337072175534165739911745591080506448641600205866240027517670273657001894552180234uwb, + 9180917912712609437909586196568830786346456714119640856730259437790973527459849487895103863584234525859590698749982125884487194000401583172193548884761272331911564480124878uwb, + 11049512233686559553687636036663446413022165259892524030717648180326957779916930880483808447448446584642734113622685260963900225478745988370450191005955141795745690734947571uwb, + 47663369272354253242910978827267365842851495123515313737663958515768452802250710665542640440990559573730917816406856556730100799652539291367902764980370386873495017607993411uwb, + 18215014622276393791745550421148998901660352490811211087424965165803902184090598141881549641537877241526565777992183348471991467868259791203907545956986039786453071578011434uwb, + 31740235950157332221439070489628722839769958133906789091713734411951000853909663917518016071789015372380206595539133512032995220911059581277451361109633464034310397164665564uwb, + 10450847162543795294901585004050399762545006892613453868263703161802323302908254646557151245191494710406620278412346326386062698341158038281632905480774145352377805385543092uwb, + 19453023158842453405396915599369210861261573519874550548893523502986640805175433191781338575797970717670733269190857402493766307964168520080852675173587364248259309552168430uwb, + 41244368675818170615108799247368989151384052534670384186902588532722396202878099538345240688084993610469542913084982675850069064350042690913662957238816036434888665664037846uwb, + 16719362016737006280008309688585219733130381598157287999202010698266470616548718462522730730476541950851348747767571521700255425942578137654761356039235313588531776459325708uwb, + 10475917472649802727102296550431840421435279490948846996006476240420369031587862359912739671064811272746210509826242404174149288385636488194271969135287801110662285317095981uwb, + 1163912911803352668493394805506325912661919234067386269274323760640925113542354050648690202267829712352143945896104268132186183304256748687336699391633352420957751382619669uwb, + 8802741787945718202007440863180520530918335416409181790035566968168103145420485853909047361251267032896173190843315221928932703515727560628431319297083973682964053958087246uwb, + 19791342948421817380238010195638893503615644292584928829415951859564239969766035100704913746176442012398341262166756998845831007892328794072245007765812537811265165604315700uwb, + 16642284329136906697237309134287786314682533828330755403465475806950133035971596597211127434533311710048393623437103786994963036388804007132262710130242198695003152238215628uwb, + 2155325970411161010229823956524370uwb, + 697446886254974788952071928578631979965uwb, + 108165657554251490446057511316485495uwb, + 9487120152929104576906851118100261958096487535uwb, + -136538663022088871346045694473572wb, + -1666960912074801530926062313122413146603wb, + -15940673946961553912565090695396320wb, + 264462353975419400604468749561884442664wb, + 50826882861731683785919742135963976479884717145067744452535625618737864973658554226615085532399945662542810296565555980855512176679463978891752486331179893311834461777517318uwb, + 16170033701813896205634802741964500343094214191596485883117074926829904835328260995277267910766680743976283458668064421272599104442706448899915189301332650772687724575723182uwb, + 13009027737564179578240898152688856367334005472217232817755080920783012286505432066490161649175068937710374621121911926344239719476459487715714492624089105621335225676985872uwb, + 49336707246523391872334763713437428863232354140618977476842520346079224652928216135156362963444355821534349959448992339768542254081420292190058456423815350822979116396882390uwb, + 1026180591140992942712368030740883182331172637458255292975945323684907793150051875uwb, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761243411314314780717702156716099193191615778530561481120811604064555385654220uwb, + 3635377841759794164811391623635227990564259993543952474130713407348044048553863186uwb, + -139845735971wb + }; + for (int i = 0; i < 6; ++i) + if (bar_574 (u574[4 * i], u574[4 * i + 1], u574[4 * i + 2], u574[4 * i + 3]) != u574[i + 24]) + __builtin_abort (); + if (baz_574 (u574[30], u574[31]) != 1212103790378493380735221770817318414499452864884443699768488049528961780122040714uwb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-19.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-19.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,190 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test_135 (unsigned _BitInt(135) *p, unsigned _BitInt(39) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) void +test_192 (unsigned _BitInt(192) *p, unsigned _BitInt(62) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test_575 (unsigned _BitInt(575) *p, unsigned _BitInt(125) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + static unsigned _BitInt(135) s135[] = { + 39967592296255191197035336461290090324829uwb, + 312558523056789678960549094065358uwb, + 32832062726968675550596542626872563693099uwb, + 0, 0, 0, 0, + 39684305085076546670125468925068uwb, + 6804617795530664696186192571276807994017uwb, + 908900452537968951389639987294090uwb, + 0, 0, 0, 0, + 20395215776806618633686937572550377003558uwb, + 1uwb, + 2017874535031304931048003948865783841241uwb, + 0, 0, 0, 0, + 16804502949303659647220377886348649uwb, + 15969624846496231063802991739581uwb, + 12583271616670577644431817717623569600333uwb, + 0, 0, 0, 0, + 127872348uwb, + 89851078235647451008683745245uwb, + 65571357606183724433879897404245uwb, + 87071527329uwb, + 0uwb, + 2093478262068616207802533uwb, + 39684305085076546670125468925068uwb, + 228138242uwb, + 20395215776806618633686937572550377003558uwb, + 12999486295301452164134194354389uwb, + 0uwb, + 65232213uwb, + 1052uwb, + 299601705158823277248376612324370704769uwb, + 4457610789624568099630576309437uwb, + 35uwb + }; + static unsigned _BitInt(39) s39[] = { + 365405328146uwb, + 434158056uwb, + 155227252uwb, + 42uwb + }; + for (int i = 0; i < 4; ++i) + { + test_135 (s135 + 7 * i, s39 + i, 0); + for (int j = 0; j < 4; ++j) + if (s135[7 * i + 3 + j] != s135[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static unsigned _BitInt(192) s192[] = { + 1124505164324393257294640774883626666393496137407657383285uwb, + 267770052679215918410877624132556357420375522461819642uwb, + 4639722531344459905931256257525470190970246632351027146771uwb, + 0, 0, 0, 0, + 37076404019741709360338653279977uwb, + 4017103983634913740425503780735862298200532685100197316953uwb, + 3278541912894246916134094695331450716143029898422059693966uwb, + 0, 0, 0, 0, + 181260360652955273548771772757571198044332327135683350561uwb, + 3uwb, + 278424729322219534657080470631020618602047522343uwb, + 0, 0, 0, 0, + 1546922522984382736106987324181069322701408057466881095437uwb, + 2859498891267655913293729558067200232488079281528uwb, + 3754903553201168811081807274774774084224112858563658575772uwb, + 0, 0, 0, 0, + 4199uwb, + 1361868478710180046608174894774272890845uwb, + 138713124365615887365631151022521585339318590476706527uwb, + 704022636372799201uwb, + 0uwb, + 1800071738275562493471915107371110587374384505uwb, + 37076404019741709360338653279977uwb, + 989224815596uwb, + 60420120217651757849590590919190399348110775711894450187uwb, + 35811149155369659378220712438655uwb, + 0uwb, + 971271817233568uwb, + 540976787uwb, + 268207396657226343648700519626769577444579489897404183983uwb, + 356343883111794920610945410844353911944595204901uwb, + 10uwb + }; + static unsigned _BitInt(62) s62[] = { + 3406880035683564506uwb, + 1821339585074uwb, + 7774805776666105uwb, + 14uwb + }; + for (int i = 0; i < 4; ++i) + { + test_192 (s192 + 7 * i, s62 + i, 0); + for (int j = 0; j < 4; ++j) + if (s192[7 * i + 3 + j] != s192[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static unsigned _BitInt(575) s575[] = { + 68262105478469356136430990337792292171975154797241096882998520215082649730969604949380226799284423285674920339289406073226899446201591827481846481242318203838114185414101609uwb, + 522191246473430521641066810210970739255168853016819760532584735359478867620239849176927824047731938802486584777452655079470889576128018146184619338332252916338uwb, + 3435470059299599312416077239534464560179043115309368866437635382063534713476732558299272800804091725646363342046360614869573337710790812486381755554721429381220646362uwb, + 0, 0, 0, 0, + 1395593888697848626057320338038084790564831152710988743807319327067660279846004696629681887779842129545558985841571482256386uwb, + 21441995702257150447349407715894435455050772126685461031315827571889336447926694701361700730379084806621691641000793333457504299685338550064151630805530260276144722300318378uwb, + 1810496946211232933828329287232831944898449501818263455079805575961543103376888822223202088001971904867510317357383306521333499198279246848350610021364570531uwb, + 0, 0, 0, 0, + 49645180073615279861687094823459626955281549193691328477580826482861925123118554141451230055925103484376691314925103229496483975307219087542024089047037648064847114147876643uwb, + 5uwb, + 107934287940096962208124285810972463665238866518161589834947495273979231095066254158254278656128778606292981405785821524489035396101282777095285918056890626313652996363360635uwb, + 0, 0, 0, 0, + 23608107814490548232484082204335368855445148092939475311496653239338164906367806895605948777993633707136572413097677855946274968766053297446456942019070196462866449343995194uwb, + 2583203116898176965174690967993977971553570592649244007260134674599130988578292547989776393639164uwb, + 275574884364090029934989506452294812428150053792728044335881034126425125444715551780251783116966457185581504439797097624639857491748084495990405201247685674533629814uwb, + 0, 0, 0, 0, + 130722423900191uwb, + 98209305532955450849963417931387543706587302562952677389372338515039360888927455577958981902466648551427758908831114835123178381uwb, + 452871192905895539483003814306315901853065835276102489810630370966701886335873219401733574293829636677996055324174200714778800368052970790656772945453428881051uwb, + 22873946842052620485494389199978222125uwb, + 0uwb, + 47552124733256427939572722329767524480111793387357122806941820665877774450470824535764237662603507442099431904312121406656289uwb, + 1395593888697848626057320338038084790564831152710988743807319327067660279846004696629681887779842129545558985841571482256386uwb, + 12402931424678892069400953011343uwb, + 9929036014723055972337418964691925391056309838738265695516165296572385024623710828290246011185020696875338262985020645899296795061443817508404817809407529612969422829575328uwb, + 765676291859168654790768770138076157159515580930329832291016877204190990758886004368955392441159337179098419446671535422387547862111454482076132380462913464uwb, + 3uwb, + 139483670059084867uwb, + 9139083047731208433628027573752517850138452745189939065766817977544782897707uwb, + 582502183871265798930967135317783829723227597448966288820692884195884049998974821351103238544771373433464199926206342695349404216240804690670860uwb, + 331751853749540937734694164624358910388009028150635800666238028944699092436048473910402462998246uwb, + 30656037717616877434uwb + }; + static unsigned _BitInt(125) s125[] = { + 34981105310298535974120492274604066977uwb, + 38073944253116192522082228985492uwb, + 140965952697865937uwb, + 473088156567311094933uwb + }; + for (int i = 0; i < 4; ++i) + { + test_575 (s575 + 7 * i, s125 + i, 0); + for (int j = 0; j < 4; ++j) + if (s575[7 * i + 3 + j] != s575[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +} From patchwork Wed Aug 9 18:27:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133416 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2994384vqr; Wed, 9 Aug 2023 11:28:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg8yq8+zpCZqOOQ51+1nGRFsKg4YRxuQnOfM5K++fmbOb0dMltM9T9+8kxBxaTps/BFzSJ X-Received: by 2002:a17:906:290:b0:99b:c830:cf23 with SMTP id 16-20020a170906029000b0099bc830cf23mr3308461ejf.27.1691605729050; Wed, 09 Aug 2023 11:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605729; cv=none; d=google.com; s=arc-20160816; b=zpFhVlpHTkbs0VaWWyLM8cGkR66z9ClkTgr8ZRpsrUMGCp/L6RYcWNpGLVwQaukt1O AjE+5jogz99g61MKXb8tQbHj/R2fL2E0zgMu2JOyaphTN/lU6PTQOsXqJH49/Tpplhph Y0fq8ius0UXL7pwG+Rk32aOimTBO37AJjBsOrPyt9TCEGAqtBXSP1Ud21y2l6laKE2lK ewV2bIHganqPdYsqgDmnbTFDXPB7mu5eB6SPYJHAYvlH5YBupJKysFZsXRh0m566zHLB 4eGG8UMuydcGwM+uMinCD74G2LCs5lClh8PKc2dJoiH56qvlVS6v2NCsHtd/JUxvIRkf Dqmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=/yhbi1tUTbeKDVfqS5Wtec4yPtJt6D5grPLYB6nzTKg=; fh=7ssu/fi36bU4aQaYzNG+jm0+RaedZIlpx6vlii65CBI=; b=goJ2d/NRQyGF7ntt9prWVuz0ZgL+L4CsYHvwRVx6tCVhtw/I3JKEzFpo55TRiFsWsp swWC5xxyt//HITg/DG6wIxkyBe1oGJFNsLhiif54ZIhA6C36spyrSjJFHzlPZhcfUR+8 0qmY8mi/S+1OVbOEmvLHfMxgP8Qbm1kjYoul1tEaRSbmx6LJzK7yvNTAVmtH0f8PJL7d ViOSjGXYmSGz9zkS9sH5Tux8/0jn9EOLRYpXo8W1/s+QGIr0wyZqaU4jknLmWzgqndrE J6WV577qCmdTSTtgJ4iJ/+XS1t8gyTXgFFX3oiiruzzndcPevoRvtu5/10IuOgl5po3v xUxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=kvXx8LUt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id jp10-20020a170906f74a00b00992dc9d6b8bsi3751458ejb.789.2023.08.09.11.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 11:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=kvXx8LUt; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 88DB33858298 for ; Wed, 9 Aug 2023 18:28:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88DB33858298 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691605727; bh=/yhbi1tUTbeKDVfqS5Wtec4yPtJt6D5grPLYB6nzTKg=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=kvXx8LUtuW65h1+AiEO0H6hnbukWj+AI830+H6BTqikNSs5zlyLLpIqBN/Oy2I0jV +sjkvUw1vBxX4edGc4JnMX0fTAbV/KGaBc0CxH/95MMRXVHPtzD39r5vupRD67GwVk AtBL8jz9C2Qk5ajMerCo6mk0BRh1Osi6/LhrtkRs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2AFCB3858002 for ; Wed, 9 Aug 2023 18:27:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AFCB3858002 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-KQfWr9S2MLuvud7ZQqtS3g-1; Wed, 09 Aug 2023 14:27:35 -0400 X-MC-Unique: KQfWr9S2MLuvud7ZQqtS3g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B086280557B; Wed, 9 Aug 2023 18:27:34 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D95C3C15BAE; Wed, 9 Aug 2023 18:27:33 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 379IRVW52043037 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 9 Aug 2023 20:27:31 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 379IRUeE2043036; Wed, 9 Aug 2023 20:27:30 +0200 Date: Wed, 9 Aug 2023 20:27:30 +0200 To: "Joseph S. Myers" , Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 12/12] testsuite part 2 for _BitInt support [PR102989] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773777169029221791 X-GMAIL-MSGID: 1773777169029221791 Hi! This is second part of the testcase additions in order to fit into mailing lists limits. Most of these tests are for the floating point conversions, atomics, __builtin_*_overflow and -fsanitize=undefined. 2023-08-09 Jakub Jelinek PR c/102989 gcc/testsuite/ * gcc.dg/torture/bitint-20.c: New test. * gcc.dg/torture/bitint-21.c: New test. * gcc.dg/torture/bitint-22.c: New test. * gcc.dg/torture/bitint-23.c: New test. * gcc.dg/torture/bitint-24.c: New test. * gcc.dg/torture/bitint-25.c: New test. * gcc.dg/torture/bitint-26.c: New test. * gcc.dg/torture/bitint-27.c: New test. * gcc.dg/torture/bitint-28.c: New test. * gcc.dg/torture/bitint-29.c: New test. * gcc.dg/torture/bitint-30.c: New test. * gcc.dg/torture/bitint-31.c: New test. * gcc.dg/torture/bitint-32.c: New test. * gcc.dg/torture/bitint-33.c: New test. * gcc.dg/torture/bitint-34.c: New test. * gcc.dg/torture/bitint-35.c: New test. * gcc.dg/torture/bitint-36.c: New test. * gcc.dg/torture/bitint-37.c: New test. * gcc.dg/torture/bitint-38.c: New test. * gcc.dg/torture/bitint-39.c: New test. * gcc.dg/torture/bitint-40.c: New test. * gcc.dg/torture/bitint-41.c: New test. * gcc.dg/torture/bitint-42.c: New test. * gcc.dg/atomic/stdatomic-bitint-1.c: New test. * gcc.dg/atomic/stdatomic-bitint-2.c: New test. * gcc.dg/dfp/bitint-1.c: New test. * gcc.dg/dfp/bitint-2.c: New test. * gcc.dg/dfp/bitint-3.c: New test. * gcc.dg/dfp/bitint-4.c: New test. * gcc.dg/dfp/bitint-5.c: New test. * gcc.dg/dfp/bitint-6.c: New test. * gcc.dg/ubsan/bitint-1.c: New test. * gcc.dg/ubsan/bitint-2.c: New test. * gcc.dg/ubsan/bitint-3.c: New test. Jakub --- gcc/testsuite/gcc.dg/torture/bitint-20.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-20.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,190 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && int32plus } } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test_135 (_BitInt(135) *p, _BitInt(39) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) void +test_192 (_BitInt(192) *p, _BitInt(62) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test_575 (_BitInt(575) *p, _BitInt(125) *q, int i) +{ + p[3] = p[0] / p[1]; + p[4] = p[2] / *q; + p[5] = p[i] % p[1 + i]; + p[6] = p[2 + i] % q[i]; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + static _BitInt(135) s135[] = { + 11379259456099690377988816293288418659013wb, + -18507519859761926375595173102925837392wb, + -3487341362606172228883239379216537732914wb, + 0, 0, 0, 0, + -18302253895694594136150902133229wb, + 2910721282054679865681699220999829323779wb, + -17020765241462394475777917185801328548533wb, + 0, 0, 0, 0, + 18652952612120070842749648336935165019219wb, + -1wb, + -2328827552140837061029007041281845428062wb, + 0, 0, 0, 0, + 4586448317141516754412034429451793085778wb, + 302326133131500453732826275685wb, + -13254392454085872482685218784341305341217wb, + 0, 0, 0, 0, + -614wb, + 16712959282178433685159137405wb, + 15642262205867583373380008091954500325wb, + -27731730774wb, + 0wb, + -75263829692564968827327018348wb, + -18302253895694594136150902133229wb, + -35227765213wb, + -18652952612120070842749648336935165019219wb, + 112934753510539598517482519823570410wb, + 0wb, + -3452wb, + 15170532132wb, + -315580772716330297206790923436697746219wb, + 126779339685614070998610275358wb, + -19wb + }; + static _BitInt(39) s39[] = { + -208660914188wb, + 226148009090wb, + -20621wb, + 42wb + }; + for (int i = 0; i < 4; ++i) + { + test_135 (s135 + 7 * i, s39 + i, 0); + for (int j = 0; j < 4; ++j) + if (s135[7 * i + 3 + j] != s135[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static _BitInt(192) s192[] = { + -2179289138164349400542345646041597314396798352437085702063wb, + -79910962432789464031897580939163427724139130993wb, + -3036473005246707700116012885952806814462013063553154406939wb, + 0, 0, 0, 0, + 641265343041674918120574087098wb, + -72968858271155659573911879940731439944647195520825153965wb, + 2701717062040203003887103138051480805185032453926240220524wb, + 0, 0, 0, 0, + -841691204113630961349106466971783187865820857103239354134wb, + 3wb, + -87971197399776002207343095550078219wb, + 0, 0, 0, 0, + 1975530920339244356926809414608241391203379490466789216052wb, + -1491609620853264847219953011450130087411551266523269wb, + -1446625088493520499379069533952596205wb, + 0, 0, 0, 0, + 27271466539wb, + 1706692225050149442221770028739016905019wb, + -79245495764706738784157700565393118980948358836wb, + -1501915295097973757wb, + 0wb, + 4771029735868622050569106388224414265428wb, + 641265343041674918120574087098wb, + 333711124246457812wb, + -280563734704543653783035488990594395955273619034413118044wb, + -11314906111712376578wb, + -2wb, + -2479408421589529wb, + -1324428wb, + -11301758503855628901398980734004657wb, + 1373411796501852981487559368499793073469647909100920wb, + -109wb + }; + static _BitInt(62) s62[] = { + -1779156757544544378wb, + 566275460772898254wb, + 7774805776666105wb, + 128wb + }; + for (int i = 0; i < 4; ++i) + { + test_192 (s192 + 7 * i, s62 + i, 0); + for (int j = 0; j < 4; ++j) + if (s192[7 * i + 3 + j] != s192[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _BitInt(575) s575[] = { + -46295454425650349106237210715560972814514774894381316941718135777652722445546437187679065682949497046056192846156902024414635126978980056110286059194406244047429103543013567wb, + 8168911130831183937943637579544406842555974190640492967747336926965525847745100099776294868623258477082653103560744709659980631459947315392636659059426713543595666476280533wb, + -35562636740560878776057515364478086997557966107967281638887951768166903062463010597490396666936792092197907362468852658846219038084825902297279012227062238709275022706654710wb, + 0, 0, 0, 0, + 8943720225181967953483417970wb, + -5686323784402794959708902425053022672027524027657863695096812917030055678499948429234881641591266594283291408732579354863768974925810198523510127753699305465302067821wb, + 45545655058039702583745674825335158540648677810736798412180196426599514263661272184545433928331514411963531127261916383264154901783937763805071704477825859668914160192614845wb, + 0, 0, 0, 0, + 50424935157410302671220896696045811569932594372403814676921199727418115659236492512040645301161966980307514350263276765199536014825688175664310129375564263158984wb, + -7wb, + -1570414268527860342275074326241251266943768106178059338676497087694509262100926288185672140837995480549018141550944901112529623354869552332831768648238175848946606383367442wb, + 0, 0, 0, 0, + 33743599683183012321962199340752013311691198627837686174760810997243129260923502613536719907475631360213576483574943246620765095970215288302282988013296681749186377007244629wb, + -241344364975185779312145695113143874342953936016290256207617251781961618409457239212648767218870128884542434148wb, + 264442076257762743508952577439304094891926651736030778233607159152726518015778933421402285405943871924053070093963838538880775338376789919798084050039162wb, + 0, 0, 0, 0, + -5wb, + 5102554304763340573123278154007968305825944534675387388100485979831828339912883404866537264221784637582259122678928387415569088293221166wb, + -5450898771494429416519022817838938601734903941178852102981451142825093206820936688797591339833204660642927328353178476114731969679243479147102763897272676329450771161610902wb, + -27841416716804082903535753217607970wb, + 0wb, + 2845786405948228702992300882035725001599103765023382470517698884483710061812613500615722877137078798659301720051530203483092161498954792wb, + 8943720225181967953483417970wb, + 14857023063025350938701283170104334549wb, + -7203562165344328953031556670863687367133227767486259239560171389631159379890927501720092185880280997186787764323325252171362287832241167952044304196509180451283wb, + 193782868826267453015550702420724985315443493285153355021508389301944425453072371810496604181725982879795555170278476391923261741289049794434571591514767wb, + 3wb, + -5203319495353646668wb, + -139815154526820696318711149230487844769233301636772309388492158wb, + -323204355193745164479045143032958628560847774063940216640778815817376770038460708119250193248428869489076997487384931038wb, + 180305213672139436589458419226578301650781616412684462286468318018185661952458180767935939240752755560277833245wb, + 316649622804067950787613592683370wb + }; + static _BitInt(125) s125[] = { + -6969575357064287919545125499931812390wb, + 16004593655673074838414651760840291513wb, + -8103989160857077722wb, + -818188468095495446473587377169784wb + }; + for (int i = 0; i < 4; ++i) + { + test_575 (s575 + 7 * i, s125 + i, 0); + for (int j = 0; j < 4; ++j) + if (s575[7 * i + 3 + j] != s575[7 * 4 + 4 * i + j]) + __builtin_abort (); + } +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-21.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-21.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,282 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __FLT_MANT_DIG__ == 24 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _BitInt(135) +testflt_135 (float d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(135) +testfltu_135 (float d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +testflt_192 (float d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testfltu_192 (float d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +testflt_575 (float d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testfltu_575 (float d) +{ + return d; +} +#endif +#endif + +#if __DBL_MANT_DIG__ == 53 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _BitInt(135) +testdbl_135 (double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(135) +testdblu_135 (double d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +testdbl_192 (double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testdblu_192 (double d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +testdbl_575 (double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testdblu_575 (double d) +{ + return d; +} +#endif +#endif + +int +main () +{ +#if __FLT_MANT_DIG__ == 24 +#if __BITINT_MAXWIDTH__ >= 135 + static float flt_135[] = { + 0.25f, 0.0f, 1.0f, -42.0f, 16777215.25f, + -50855501824.5f, 39580962846540824576.0f, + -122147759335346835551823516808712814592.0f, + -85070591730234615865843651857942052864.0f + }; + static _BitInt(135) fltr_135[] = { + 0wb, 0wb, 1wb, -42wb, 16777215wb, + -50855501824wb, 39580962846540824576wb, + -122147759335346835551823516808712814592wb, + -85070591730234615865843651857942052864wb + }; + for (int i = 0; i < 9; ++i) + if (testflt_135 (flt_135[i]) != fltr_135[i]) + __builtin_abort (); + static float fltu_135[] = { + 0.125f, 0.0f, 1.0f, 42.59375f, 16777215.75f, + 397530272.5f, 1557145973265213792232550652968960.0f, + 69722182498815269047577928656018735104.0f + }; + static unsigned _BitInt(135) fltur_135[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 16777216uwb, + 397530272uwb, 1557145973265213792232550652968960uwb, + 69722182498815269047577928656018735104uwb + }; + for (int i = 0; i < 8; ++i) + if (testfltu_135 (fltu_135[i]) != fltur_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static float flt_192[] = { + 0.625f, 0.0f, 1.0f, -42.0f, 16777215.25f, + -166724322197504.5f, 7557890186859550768856301568.0f, + 6614377725485260848635133905887821824.0f, + -85070591730234615865843651857942052864.0f + }; + static _BitInt(192) fltr_192[] = { + 0wb, 0wb, 1wb, -42wb, 16777215wb, + -166724322197504wb, 7557890186859550768856301568wb, + 6614377725485260848635133905887821824wb, + -85070591730234615865843651857942052864wb + }; + for (int i = 0; i < 9; ++i) + if (testflt_192 (flt_192[i]) != fltr_192[i]) + __builtin_abort (); + static float fltu_192[] = { + __FLT_MIN__, 0.0f, 1.0f, 42.125f, 16777216.75f, + 2197600337920.75f, 4591683053408742366929307227985543168.0f, + 89668786387864080590151097276117811200.0f + }; + static unsigned _BitInt(192) fltur_192[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 16777216uwb, + 2197600337920uwb, 4591683053408742366929307227985543168uwb, + 89668786387864080590151097276117811200uwb + }; + for (int i = 0; i < 8; ++i) + if (testfltu_192 (fltu_192[i]) != fltur_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static float flt_575[] = { + 0.0001f, 0.0f, 1.0f, -28.0f, 16777214.75f, + -1321998852554752.5f, 3447217350995641328695097279119360.0f, + -153684583933125564944797950598195445760.0f, + -6614377725485260848635133905887821824.0f + }; + static _BitInt(575) fltr_575[] = { + 0wb, 0wb, 1wb, -28wb, 16777215wb, + -1321998852554752wb, 3447217350995641328695097279119360wb, + -153684583933125564944797950598195445760wb, + -6614377725485260848635133905887821824wb + }; + for (int i = 0; i < 9; ++i) + if (testflt_575 (flt_575[i]) != fltr_575[i]) + __builtin_abort (); + static float fltu_575[] = { + 4.0f * __FLT_MIN__, 0.0f, 1.0f, 38.125f, 16777210.75f, + 450604433408.75f, 49420393052787309452540595771398946816.0f, + 144076816645080570490809349637635309568.0f + }; + static unsigned _BitInt(575) fltur_575[] = { + 0uwb, 0uwb, 1uwb, 38uwb, 16777211uwb, + 450604433408uwb, 49420393052787309452540595771398946816uwb, + 144076816645080570490809349637635309568uwb + }; + for (int i = 0; i < 8; ++i) + if (testfltu_575 (fltu_575[i]) != fltur_575[i]) + __builtin_abort (); +#endif +#endif +#if __DBL_MANT_DIG__ == 53 +#if __BITINT_MAXWIDTH__ >= 135 + static double dbl_135[] = { + 0.25, 0.0, 1.0, -42.0, 4294967295.25, + -600381955574889.5, 31830517255028909053694705664.0, + -18738990071541038357046558935673124945920.0, + -21778071482940061661655974875633165533184.0 + }; + static _BitInt(135) dblr_135[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -600381955574889wb, 31830517255028909053694705664wb, + -18738990071541038357046558935673124945920wb, + -21778071482940061661655974875633165533183wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testdbl_135 (dbl_135[i]) != dblr_135[i]) + __builtin_abort (); + static double dblu_135[] = { + 0.125, 0.0, 1.0, 42.59375, 4294967295.75, + 1379919377114330.5, 1887176628826898072984354816.0, + 28122698032432725461429202074509590396928.0 + }; + static unsigned _BitInt(135) dblur_135[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967295uwb, + 1379919377114330uwb, 1887176628826898072984354816uwb, + 28122698032432725461429202074509590396928uwb + }; + for (int i = 0; i < 8; ++i) + if (testdblu_135 (dblu_135[i]) != dblur_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static double dbl_192[] = { + 0.625, 0.0, 1.0, -42.0, 4294967295.25, + -334692618508390720.5, 7241713824636372052614321786924022698463985664.0, + 1051470826442514757151114043324296190023320100185399361536.0, + -3138550867693340381917894711603833208051177722232017256448.0 + }; + static _BitInt(192) dblr_192[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -334692618508390720wb, 7241713824636372052614321786924022698463985664wb, + 1051470826442514757151114043324296190023320100185399361536wb, + -3138550867693340381917894711603833208051177722232017256447wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testdbl_192 (dbl_192[i]) != dblr_192[i]) + __builtin_abort (); + static double dblu_192[] = { + __DBL_MIN__, 0.0, 1.0, 42.125, 4294967296.75, + 85543274084479312.75, 1452517026416706854711122198528.0, + 4878159368183578289135952951143197426988727705359645409280.0 + }; + static unsigned _BitInt(192) dblur_192[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967296uwb, + 85543274084479312uwb, 1452517026416706854711122198528uwb, + 4878159368183578289135952951143197426988727705359645409280uwb + }; + for (int i = 0; i < 8; ++i) + if (testdblu_192 (dblu_192[i]) != dblur_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static double dbl_575[] = { + 0.0001, 0.0, 1.0, -28.0, 4294967294.75, + -37518052491018912.5, 103740344328578397848785318842252129922803939603530145015162908477052192630505472.0, + -60264112735379285992549557294906950572505306720710356591257742566415478531569283626542380634430345616295459560427283714375540825055746407845009719778430303250931745441185792.0, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174784.0 + }; + static _BitInt(575) dblr_575[] = { + 0wb, 0wb, 1wb, -28wb, 4294967294wb, + -37518052491018912wb, 103740344328578397848785318842252129922803939603530145015162908477052192630505472wb, + -60264112735379285992549557294906950572505306720710356591257742566415478531569283626542380634430345616295459560427283714375540825055746407845009719778430303250931745441185792wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testdbl_575 (dbl_575[i]) != dblr_575[i]) + __builtin_abort (); + static double dblu_575[] = { + 4.0 * __DBL_MIN__, 0.0, 1.0, 38.125, 4294967297.75, + 138240328005104064.75, 1588129215384992270224118343146332410113351482118715170651778867930903010675691494429363974899842924150784.0, + 106390366882040443685518677989907085524608028099417390750037507495093586319031581000179209552004867195248003952212636389496136628539779816025838629984567658036669448510767104.0 + }; + static unsigned _BitInt(575) dblur_575[] = { + 0uwb, 0uwb, 1uwb, 38uwb, 4294967297uwb, + 138240328005104064uwb, 1588129215384992270224118343146332410113351482118715170651778867930903010675691494429363974899842924150784uwb, + 106390366882040443685518677989907085524608028099417390750037507495093586319031581000179209552004867195248003952212636389496136628539779816025838629984567658036669448510767104uwb + }; + for (int i = 0; i < 8; ++i) + if (testdblu_575 (dblu_575[i]) != dblur_575[i]) + __builtin_abort (); +#endif +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-22.c.jj 2023-08-08 16:12:02.343939602 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-22.c 2023-08-08 16:12:02.343939602 +0200 @@ -0,0 +1,282 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __LDBL_MANT_DIG__ == 64 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _BitInt(135) +testldbl_135 (long double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(135) +testldblu_135 (long double d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +testldbl_192 (long double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testldblu_192 (long double d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +testldbl_575 (long double d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testldblu_575 (long double d) +{ + return d; +} +#endif +#endif + +#if __FLT128_MANT_DIG__ == 113 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _BitInt(135) +testflt128_135 (_Float128 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(135) +testflt128u_135 (_Float128 d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +testflt128_192 (_Float128 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testflt128u_192 (_Float128 d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +testflt128_575 (_Float128 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testflt128u_575 (_Float128 d) +{ + return d; +} +#endif +#endif + +int +main () +{ +#if __LDBL_MANT_DIG__ == 64 +#if __BITINT_MAXWIDTH__ >= 135 + static long double ldbl_135[] = { + 0.25L, 0.0L, 1.0L, -42.0L, 4294967295.25L, + -8790480341948727187.25L, 27274375615880435204096.0L, + -14925443517338257613013233930892304449536.0L, + -21778071482940061661655974875633165533184.0L + }; + static _BitInt(135) ldblr_135[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -8790480341948727187wb, 27274375615880435204096wb, + -14925443517338257613013233930892304449536wb, + -21778071482940061661655974875633165533183wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testldbl_135 (ldbl_135[i]) != ldblr_135[i]) + __builtin_abort (); + static long double ldblu_135[] = { + 0.125L, 0.0L, 1.0L, 42.59375L, 4294967295.75L, + 176563931524327024.5L, 33864941055480177570480471932928.0L, + 25454535165593017203571842988709209178112.0L + }; + static unsigned _BitInt(135) ldblur_135[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967295uwb, + 176563931524327024uwb, 33864941055480177570480471932928uwb, + 25454535165593017203571842988709209178112uwb + }; + for (int i = 0; i < 8; ++i) + if (testldblu_135 (ldblu_135[i]) != ldblur_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static long double ldbl_192[] = { + 0.625L, 0.0L, 1.0L, -42.0L, 4294967295.25L, + -5824742198306330891.5L, 440458331210868742661519441920.0L, + 1835666805014205039814897225189119947560942436848001613824.0L, + -3138550867693340381917894711603833208051177722232017256448.0L + }; + static _BitInt(192) ldblr_192[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -5824742198306330891wb, 440458331210868742661519441920wb, + 1835666805014205039814897225189119947560942436848001613824wb, + -3138550867693340381917894711603833208051177722232017256447wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testldbl_192 (ldbl_192[i]) != ldblr_192[i]) + __builtin_abort (); + static long double ldblu_192[] = { + __LDBL_MIN__, 0.0L, 1.0L, 42.125L, 4294967296.75L, + 2076918887405157419.75L, 20675944534182826922963677915852149395069559898112.0L, + 5501434424609388038261967254007295028886638351806353113088.0L + }; + static unsigned _BitInt(192) ldblur_192[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967296uwb, + 2076918887405157419uwb, 20675944534182826922963677915852149395069559898112uwb, + 5501434424609388038261967254007295028886638351806353113088uwb + }; + for (int i = 0; i < 8; ++i) + if (testldblu_192 (ldblu_192[i]) != ldblur_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static long double ldbl_575[] = { + 0.0001L, 0.0L, 1.0L, -28.0L, 4294967294.75L, + -3665832965020207456.5L, 163698889538251840454153874702336.0L, + 32915174451748642699300864037265677114762093753017270154115822402734463611341115095984060833654391570465670441530007982951775959694729040694137686724336684263404019031998464.0L, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174784.0L + }; + static _BitInt(575) ldblr_575[] = { + 0wb, 0wb, 1wb, -28wb, 4294967294wb, + -3665832965020207456wb, 163698889538251840454153874702336wb, + 32915174451748642699300864037265677114762093753017270154115822402734463611341115095984060833654391570465670441530007982951775959694729040694137686724336684263404019031998464wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testldbl_575 (ldbl_575[i]) != ldblr_575[i]) + __builtin_abort (); + static long double ldblu_575[] = { + 4.0L * __LDBL_MIN__, 0.0L, 1.0L, 38.125L, 4294967297.75L, + 1378703406647015633.75L, 611519358004879551476944320883148018860550235384446976.0L, + 115943866857281393364910134541262519802574312323472821552898049002204954780753923929784955305825114286696121504922573067409422635510048274769753298552619702526028834918105088.0L + }; + static unsigned _BitInt(575) ldblur_575[] = { + 0uwb, 0uwb, 1uwb, 38uwb, 4294967297uwb, + 1378703406647015633uwb, 611519358004879551476944320883148018860550235384446976uwb, + 115943866857281393364910134541262519802574312323472821552898049002204954780753923929784955305825114286696121504922573067409422635510048274769753298552619702526028834918105088uwb + }; + for (int i = 0; i < 8; ++i) + if (testldblu_575 (ldblu_575[i]) != ldblur_575[i]) + __builtin_abort (); +#endif +#endif +#if __FLT128_MANT_DIG__ == 113 +#if __BITINT_MAXWIDTH__ >= 135 + static _Float128 flt128_135[] = { + 0.25F128, 0.0F128, 1.0F128, -42.0F128, 4294967295.25F128, + -622114258022893415468272077014949.5F128, 6846686534183872435237780851340978176.0F128, + -18109992041001989671440396535501724581888.0F128, + -21778071482940061661655974875633165533184.0F128 + }; + static _BitInt(135) flt128r_135[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -622114258022893415468272077014949wb, 6846686534183872435237780851340978176wb, + -18109992041001989671440396535501724581888wb, + -21778071482940061661655974875633165533183wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testflt128_135 (flt128_135[i]) != flt128r_135[i]) + __builtin_abort (); + static _Float128 flt128u_135[] = { + 0.125F128, 0.0F128, 1.0F128, 42.59375F128, 4294967295.75F128, + 3866883549893778868343627501393297.5F128, 1884508847679496004639718578196282112.0F128, + 40418154190724512480670668005754087145472.0F128 + }; + static unsigned _BitInt(135) flt128ur_135[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967295uwb, + 3866883549893778868343627501393297uwb, 1884508847679496004639718578196282112uwb, + 40418154190724512480670668005754087145472uwb + }; + for (int i = 0; i < 8; ++i) + if (testflt128u_135 (flt128u_135[i]) != flt128ur_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static _Float128 flt128_192[] = { + 0.625F128, 0.0F128, 1.0F128, -42.0F128, 4294967295.25F128, + -2985198467222342042164811285508981.5F128, 431282768955649236431442335280406747022360576.0F128, + 1589969577168452878096502186670522088231011726426596442112.0F128, + -3138550867693340381917894711603833208051177722232017256448.0F128 + }; + static _BitInt(192) flt128r_192[] = { + 0wb, 0wb, 1wb, -42wb, 4294967295wb, + -2985198467222342042164811285508981wb, 431282768955649236431442335280406747022360576wb, + 1589969577168452878096502186670522088231011726426596442112wb, + -3138550867693340381917894711603833208051177722232017256447wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testflt128_192 (flt128_192[i]) != flt128r_192[i]) + __builtin_abort (); + static _Float128 flt128u_192[] = { + __FLT128_MIN__, 0.0F128, 1.0F128, 42.125F128, 4294967296.75F128, + 1198221816583045676753413578483973.75F128, 321058543109670204450967161534914741927936.0F128, + 4124250833671183507048495617931376186682553019928355536896.0F128 + }; + static unsigned _BitInt(192) flt128ur_192[] = { + 0uwb, 0uwb, 1uwb, 42uwb, 4294967296uwb, + 1198221816583045676753413578483973uwb, 321058543109670204450967161534914741927936uwb, + 4124250833671183507048495617931376186682553019928355536896uwb + }; + for (int i = 0; i < 8; ++i) + if (testflt128u_192 (flt128u_192[i]) != flt128ur_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _Float128 flt128_575[] = { + 0.0001F128, 0.0F128, 1.0F128, -28.0F128, 4294967294.75F128, + -4434536963340205213805292449887836.5F128, 7798956314177801818163892326325236647148010864640.0F128, + -48379475169482975928082617475070980956970510451882414558095669485086407691242420689411465910847147042640064381848760072045866350077715681395831023828798188292450661613699072.0F128, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174784.0F128 + }; + static _BitInt(575) flt128r_575[] = { + 0wb, 0wb, 1wb, -28wb, 4294967294wb, + -4434536963340205213805292449887836wb, 7798956314177801818163892326325236647148010864640wb, + -48379475169482975928082617475070980956970510451882414558095669485086407691242420689411465910847147042640064381848760072045866350077715681395831023828798188292450661613699072wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb + }; + for (int i = 0; i < 9; ++i) + if (testflt128_575 (flt128_575[i]) != flt128r_575[i]) + __builtin_abort (); + static _Float128 flt128u_575[] = { + 4.0F128 * __FLT128_MIN__, 0.0F128, 1.0F128, 38.125F128, 4294967297.75F128, + 1286565442597535616086070715374552.75F128, 2888274376848382435313359223769917404575136171432777745913780227423600640.0F128, + 101012352069182509789055890148950528106809264092697629422634347377509770791198015780931797016594366657511165718215124632216959526129296364564413818230848005073384975475146752.0F128 + }; + static unsigned _BitInt(575) flt128ur_575[] = { + 0uwb, 0uwb, 1uwb, 38uwb, 4294967297uwb, + 1286565442597535616086070715374552uwb, 2888274376848382435313359223769917404575136171432777745913780227423600640uwb, + 101012352069182509789055890148950528106809264092697629422634347377509770791198015780931797016594366657511165718215124632216959526129296364564413818230848005073384975475146752uwb + }; + for (int i = 0; i < 8; ++i) + if (testflt128u_575 (flt128u_575[i]) != flt128ur_575[i]) + __builtin_abort (); +#endif +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-23.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-23.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,804 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __FLT_MANT_DIG__ == 24 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) float +testflt_135 (_BitInt(135) b) +{ + return b; +} + +__attribute__((noipa)) float +testfltu_135 (unsigned _BitInt(135) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) float +testflt_192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) float +testfltu_192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) float +testflt_575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) float +testfltu_575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif +#endif + +#if __DBL_MANT_DIG__ == 53 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) double +testdbl_135 (_BitInt(135) b) +{ + return b; +} + +__attribute__((noipa)) double +testdblu_135 (unsigned _BitInt(135) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) double +testdbl_192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) double +testdblu_192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) double +testdbl_575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) double +testdblu_575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + static _BitInt(135) s_135[] = { + -39242093wb, + -36246971635108657318127321wb, + -816440703352wb, + 8409360wb, + 231875wb, + -1859wb, + 8123250453541347379290840008816194983wb, + 42642091wb, + -2499664813007708583619356686wb, + -14022533493907734339644wb, + 737816709430180009697449492wb, + 3094418595787172583521548578719419wb, + 84096wb, + -3856393637064417wb, + 5494wb, + -7227655824382622730861wb, + 185250722103742953wb, + -266695839223233222300219080587185431wb, + 124wb, + -4540724906728461994579131745203067wb, + -34474123wb, + 6171186wb, + -1738448518309495501564259945530043942wb, + 3714wb, + 22759310366655438105064084505115489wb, + -461wb, + -1891475049610273521994429918325638525836wb, + -350wb, + 3721759411106519959861226774340wb, + -42485872965031409753wb, + 4362279409022137273490486629950wb, + 521928664204421037572709995195346211111wb, + -50129wb, + -21525556783117336078661729wb + }; + static unsigned _BitInt(135) u_135[] = { + 773802493804221964748670742461281016363uwb, + 897485218654369665002411485681173uwb, + 37306898634990773758633uwb, + 3uwb, + 920156uwb, + 15230973698181139105641901258312096uwb, + 1383843491123931387484696uwb, + 143810081711544975903357370071668200uwb, + 83615891310230331473978uwb, + 1239150390uwb, + 39792042288uwb, + 20985035121604uwb, + 3700707uwb, + 14510535740825uwb, + 5675982879048653163399531637816917uwb, + 593909622129190124122830uwb, + 413008891327830587264uwb, + 34694483328uwb, + 592129uwb, + 2649uwb, + 154468451808267466822214091328849uwb, + 8905088171048376399858691570634230197204uwb, + 456uwb, + 12101uwb, + 5879086272uwb, + 115170058487623uwb, + 2274163249406113742515726136586945854500uwb, + 63923152267905666653uwb, + 624302860090054295150365837280525227924uwb, + 9uwb, + 5703520721951508439418uwb, + 44653119094uwb, + 1440439605268989101uwb, + 3496654014361uwb + }; +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static _BitInt(192) s_192[] = { + 81945579384314684613279565479277935940wb, + 1640150770700583136800158704601080wb, + 432402469012491481987292073086668wb, + -15369197386440508323548800500962985157137866798390wb, + 217705797486262wb, + 1wb, + -150837356854711044278780637wb, + 1247354027519369533750440146304wb, + -700073531555662209687924602081wb, + -441651351073606706893667405889558445894wb, + -743993151249791392844844248857961054wb, + 1681039wb, + -170386616439159353410812029301398243129730wb, + -97703172400304820221345002831889wb, + 9wb, + 7277656199366069102639319241893wb, + 7201222364wb, + -4671533967546296507223686237333335wb, + 13311155734490577635922550wb, + 76150533189365685907637983428512213977569647wb, + -283560863483321465221194695455688610811wb, + 6438368552004797088499844257634549000496626110080371wb, + 1122038765213390728664343086041576wb, + -9541613313421359977755878156940wb, + 21551012076757076795102244535269250wb, + -4794294047755173531367558272wb, + -5708612827808554221wb, + -2649648007071280662902443553973167294046518180wb, + -35698660478241255546377wb, + -79587921140918wb, + 469393710173925646wb, + -261330983098092746969723637867599382044980841179747207wb, + -115wb, + -1717706681396wb + }; + static unsigned _BitInt(192) u_192[] = { + 87197051833867272589618945858714291675632402028uwb, + 175207476610687227705633653396153452205075322355946uwb, + 289472685412214318981767004188uwb, + 58352315342320048378103056601781218026976uwb, + 68512267071922032916894194298300228491490143452269uwb, + 8654067584750856592691725728280108682858075uwb, + 57027948061283099317671673937496946487124629uwb, + 512829256101uwb, + 8815296701808550493421309771596155666520uwb, + 1918805208198312310092547265227uwb, + 99680639255733807uwb, + 313647272226958893709907781719uwb, + 534434342549592762863366619879590694414818uwb, + 1751643652514709uwb, + 24084146046683127013882581681582087uwb, + 1282076uwb, + 13590701668411111769uwb, + 62207549230439503653uwb, + 144040025133692457990548614076288499046uwb, + 11981724905403945793356785358565398049196880116uwb, + 1823479497818478859136796209626920064416489979129893695uwb, + 4649uwb, + 2095541338428713427585867932062430293488017906261402uwb, + 605377488765896342050766363050545164888333863362uwb, + 11488350477184223uwb, + 9492972359709013710789022084605392630683565515935199uwb, + 36826148417259uwb, + 554404239122129842026250702689uwb, + 2804528919100uwb, + 127uwb, + 66823885107232870336040073990324uwb, + 297736625249uwb, + 3701132312864550550157874952341371502832960625370598966uwb, + 107247048428uwb + }; +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _BitInt(575) s_575[] = { + 822555268170764275096048134868384963633463468104839796862654006268369616wb, + -960580267694575830808697063169243963045681635800151938720065734940592300657700227419337766780029829446319203wb, + 33504080263976494448954627475165765154890874061543914469206217657999706310163279811015042121096338719830090426757797138233202615461wb, + 275983725374553564148936957707321552749wb, + 5534912144897227754137156977371639235252437172582938580045103986268272085395760563838753817115093434280932847973705994570261258933419373885658991359441723005813683395590541wb, + 1412920302762671055711845665320769771488824036206881359103417821581950493952853265134760513685359011001836948515905971331797139790wb, + -262974997977953570994865210107604152900839198803859287819970850481583440338320059wb, + -92488905333378799268618025132022462336176863903734682501838771365453998891689279398wb, + 242604167696163732697906496386839396751068wb, + -3523803651131338645439245946293wb, + -5147220779398204849222374563179412010462379234108857688330486391319694172748210918710342389194957287070617133280194810193962683650761347126311504766504260691wb, + -126995956651641937332005246092202755154992252553028943468563459072746155379181900761169956344678911600wb, + 8137926360495wb, + -15994393111836746332671329788635258wb, + -277068516868681202554828866807401284583187899477211188256772654837767448404666578906477389363058609157862574wb, + 12643256666940489874033990964997310860090310878838229112053311027168830831623703103010815387wb, + 197250790460297242975596746662998763328365874997wb, + 2003391279347376998472wb, + -199877387236416475658211887841938073691092213166438343739wb, + 683783725793437346966376731991835336458591392078548990419792641719902684445391913394174240265031277360362886303597899811253111402611797905136669wb, + 13527430925075101894748577029275389339063875642859674079897983403256wb, + 539267000300803493510458136103246878203019746178696339759252798818676107273127463057162208073142618039409911wb, + 25132435181738021677664552852329012363786311024121402747618663944355967806315928846073722774898wb, + -24501129715197464074815490290653wb, + -26621511339033230503491791253914731850253401wb, + 219726795681725191949095808767196099036895435893837474958165415185577738548053399820419849wb, + 142706206515281341916417852232439287400819155237127620529348000437671770471697052705666056232742428920527wb, + -1272097813202031618710288063584910456400985264371503722255927680393419899507092728461wb, + 104580584066897755717617980935051171929519336855902844943415231226523598033953128466889325153396268078513996620240379420239887wb, + -10163452549280413821027501723364683075067110986059205073343287754152825761658667193285948456506970145368258900765489010580419998927374372004822965287098902519382wb, + -1462817702603947401421838547412731208810505797188084686210372939517152226213737422286025118826482655559744680456146694118022879735528111700409wb, + -1004473459167555639043426932334304398038355185104669wb, + 383945882095471823332216311173956104021530654187057868803605149628498470119801535759629951357637987556377174553957515312582545289930138018wb, + 147266903774875157001493887893421901156259749590403482558013070wb + }; + static unsigned _BitInt(575) u_575[] = { + 340315902121482071031uwb, + 9193736781349493374149172723522049938732355975055uwb, + 121133456126887617775249483436586396232697894267611535022240817951287068117843073672uwb, + 1253811282917666038992497uwb, + 279807426767721176279253888473522991149118862415710500804613956730247764438409575562386uwb, + 4763192686302836059965684032432862167583119264783uwb, + 19433750446582365356875213925336734177599085624532213292961813424848222698351037862663241858724337375675uwb, + 8615689860907972907203187028321798323548254692780962654211537619771698680316938530412569744897459065621193843349775333790731199245018643579445580816793381624810616262uwb, + 126055589776274659515356020606486923511478187977197128509709117843059226901071386846700207970626608150351060714322162254429913496135590117225450775153364768928781244uwb, + 34636325529158225079379169125604752070369970834816893592982969115088710130160324580864333959889906313467177163564702338046445540uwb, + 2295982750677874548137685137480985649627965059590627454944uwb, + 22288650253829612832302454550260146151077393473uwb, + 61551827uwb, + 948415991495935226718622697967024251064408554619458611515264819726244946850447758605031396753280209023664964305741301009407513619686102uwb, + 7599947921908039117808602805272900633862767543347735124983729771592896283177667324402886239291446uwb, + 3064098671438076295010586583414642866550259610904044948559784636731818131096680869327433283805326015689481397549653557650965154282598345191654721039973597171695049076467uwb, + 26163216482276433755253744705785501134309546797499410671258175352214852627310317854549342428286751107453875459uwb, + 1083530146709801198539441549736949256980046185455966999062614188586191607484611079705240990524552846829821534154580456458426794497253838343299379036578711641930103uwb, + 241446995995054305582384233456322509709013171336859127uwb, + 224319712854uwb, + 1851847735563213275uwb, + 3517907813008404838784133683859253992uwb, + 57026061017409510123542169719303829618100077009666501089739966522905673377916488253uwb, + 218054639772618074096850378810323560503313926757275788155487065187235936858569852576120793613879980uwb, + 1035184782769221379uwb, + 20229959242348674822834301353257599618846169820699281424077697412860273533283192155424030349307384555863768665398854990uwb, + 48688062002166777196074419660880812175599377353811333642743225865182422320253615211852611218169059717666168172585704763331192485699241038689921302806665184uwb, + 38974159722814402881994907079236516884965127718714589284306855526034875317101125387287977578141556918226042568695412232uwb, + 195268331869690963115384309853070889302314974440838447729079592004150231uwb, + 131384791058457562831689753115846222538215620945564207628285200123621656731679644407994773520965uwb, + 1334982489788592107403503927792629194402uwb, + 2146uwb, + 25165296015221802429838428736907886uwb, + 6254uwb + }; +#endif +#if __FLT_MANT_DIG__ == 24 +#if __BITINT_MAXWIDTH__ >= 135 + static float flt_135[] = { + -39242092.0f, + -36246971272809749294350336.0f, + -816440672256.0f, + 8409360.0f, + 231875.0f, + -1859.0f, + 8123250192256220137057345512566423552.0f, + 42642092.0f, + -2499664867657543876622680064.0f, + -14022533900570342719488.0f, + 737816710112426075969552384.0f, + 3094418676109759732222008215207936.0f, + 84096.0f, + -3856393689890816.0f, + 5494.0f, + -7227655905181068951552.0f, + 185250718389633024.0f, + -266695840144413128032863408636297216.0f, + 124.0f, + -4540724759502527537506259606437888.0f, + -34474124.0f, + 6171186.0f, + -1738448585705717460364844982721314816.0f, + 3714.0f, + 22759309744814802127092016612376576.0f, + -461.0f, + -__builtin_inff (), + -350.0f, + 3721759435945004998144961806336.0f, + -42485872567125016576.0f, + 4362279465016690611605542535168.0f, + __builtin_inff (), + -50129.0f, + -21525556388157878481977344.0f + }; + static float fltu_135[] = { + __builtin_inff (), + 897485251387475481828390233702400.0f, + 37306898327013391597568.0f, + 3.0f, + 920156.0f, + 15230974228367008360756701604872192.0f, + 1383843467413878101508096.0f, + 143810078160377684059996776503967744.0f, + 83615893330389964423168.0f, + 1239150336.0f, + 39792041984.0f, + 20985036144640.0f, + 3700707.0f, + 14510535475200.0f, + 5675982933774352481468669797335040.0f, + 593909606786098794594304.0f, + 413008901830615236608.0f, + 34694483968.0f, + 592129.0f, + 2649.0f, + 154468455934475733304034734374912.0f, + __builtin_inff (), + 456.0f, + 12101.0f, + 5879086080.0f, + 115170059747328.0f, + __builtin_inff (), + 63923151928943443968.0f, + __builtin_inff (), + 9.0f, + 5703520697688581472256.0f, + 44653117440.0f, + 1440439672101666816.0f, + 3496654143488.0f + }; + for (int i = 0; i < 34; ++i) + if (testflt_135 (s_135[i]) != flt_135[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testfltu_135 (u_135[i]) != fltu_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static float flt_192[] = { + 81945579470551984745273979116049137664.0f, + 1640150781354328003699743106531328.0f, + 432402474830816591643797717254144.0f, + -__builtin_inff (), + 217705802104832.0f, + 1.0f, + -150837356860384332849610752.0f, + 1247354020200583118196884635648.0f, + -700073528334631668550369017856.0f, + -__builtin_inff (), + -743993169284474461872900775245512704.0f, + 1681039.0f, + -__builtin_inff (), + -97703169989152795899105082605568.0f, + 9.0f, + 7277656062827612295463998324736.0f, + 7201222144.0f, + -4671533860148685993668956641034240.0f, + 13311155535609252557094912.0f, + __builtin_inff (), + -283560864177100653079149659746813870080.0f, + __builtin_inff (), + 1122038754191063555360632711675904.0f, + -9541613258608657772880016179200.0f, + 21551010941830070997495077018796032.0f, + -4794294027361853497357107200.0f, + -5708612694366486528.0f, + -__builtin_inff (), + -35698660648279573790720.0f, + -79587925032960.0f, + 469393711604695040.0f, + -__builtin_inff (), + -115.0f, + -1717706686464.0f + }; + static float fltu_192[] = { + __builtin_inff (), + __builtin_inff (), + 289472678477035675109665275904.0f, + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + 512829259776.0f, + __builtin_inff (), + 1918805247503610004149880487936.0f, + 99680641842413568.0f, + 313647265860414511058971000832.0f, + __builtin_inff (), + 1751643624308736.0f, + 24084145747217780385007409962156032.0f, + 1282076.0f, + 13590701491613597696.0f, + 62207548751752462336.0f, + 144040024354059546360660309323802476544.0f, + __builtin_inff (), + __builtin_inff (), + 4649.0f, + __builtin_inff (), + __builtin_inff (), + 11488350322032640.0f, + __builtin_inff (), + 36826148503552.0f, + 554404238373758103887118598144.0f, + 2804528971776.0f, + 127.0f, + 66823887263746144234653953818624.0f, + 297736634368.0f, + __builtin_inff (), + 107247050752.0f + }; + for (int i = 0; i < 34; ++i) + if (testflt_192 (s_192[i]) != flt_192[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testfltu_192 (u_192[i]) != fltu_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static float flt_575[] = { + __builtin_inff (), + -__builtin_inff (), + __builtin_inff (), + 275983721032549254738830597716881440768.0f, + __builtin_inff (), + __builtin_inff (), + -__builtin_inff (), + -__builtin_inff (), + __builtin_inff (), + -3523803575380752640275405340672.0f, + -__builtin_inff (), + -__builtin_inff (), + 8137926508544.0f, + -15994393281493713095582868026949632.0f, + -__builtin_inff (), + __builtin_inff (), + __builtin_inff (), + 2003391250601164668928.0f, + -__builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + -24501130336514943435685610127360.0f, + -__builtin_inff (), + __builtin_inff (), + __builtin_inff (), + -__builtin_inff (), + __builtin_inff (), + -__builtin_inff (), + -__builtin_inff (), + -__builtin_inff (), + __builtin_inff (), + __builtin_inff () + }; + static float fltu_575[] = { + 340315913217135083520.0f, + __builtin_inff (), + __builtin_inff (), + 1253811215516794865319936.0f, + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + 61551828.0f, + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + 224319717376.0f, + 1851847786157309952.0f, + 3517907886717368541269560933367152640.0f, + __builtin_inff (), + __builtin_inff (), + 1035184768712441856.0f, + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + __builtin_inff (), + 2146.0f, + 25165295728767510106569460506689536.0f, + 6254.0f + }; + for (int i = 0; i < 34; ++i) + if (testflt_575 (s_575[i]) != flt_575[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testfltu_575 (u_575[i]) != fltu_575[i]) + __builtin_abort (); +#endif +#endif +#if __DBL_MANT_DIG__ == 53 +#if __BITINT_MAXWIDTH__ >= 135 + static double dbl_135[] = { + -39242093.0, + -36246971635108657531715584.0, + -816440703352.0, + 8409360.0, + 231875.0, + -1859.0, + 8123250453541346905042562585110511616.0, + 42642091.0, + -2499664813007708750469922816.0, + -14022533493907733348352.0, + 737816709430180073007218688.0, + 3094418595787172340280288631324672.0, + 84096.0, + -3856393637064417.0, + 5494.0, + -7227655824382622695424.0, + 185250722103742944.0, + -266695839223233236177082217685581824.0, + 124.0, + -4540724906728462124105811223379968.0, + -34474123.0, + 6171186.0, + -1738448518309495524665904679484391424.0, + 3714.0, + 22759310366655439518928576500989952.0, + -461.0, + -1891475049610273567723258005078180626432.0, + -350.0, + 3721759411106519834940439265280.0, + -42485872965031411712.0, + 4362279409022137156015669379072.0, + 521928664204421058633672118513103273984.0, + -50129.0, + -21525556783117337240797184.0 + }; + static double dblu_135[] = { + 773802493804221992623001034499154771968.0, + 897485218654369723848104601452544.0, + 37306898634990774386688.0, + 3.0, + 920156.0, + 15230973698181137968871516305096704.0, + 1383843491123931258028032.0, + 143810081711544982658521010624528384.0, + 83615891310230336700416.0, + 1239150390.0, + 39792042288.0, + 20985035121604.0, + 3700707.0, + 14510535740825.0, + 5675982879048652786568565738176512.0, + 593909622129190116524032.0, + 413008891327830556672.0, + 34694483328.0, + 592129.0, + 2649.0, + 154468451808267468485637384962048.0, + 8905088171048376547587929854079236308992.0, + 456.0, + 12101.0, + 5879086272.0, + 115170058487623.0, + 2274163249406113722963963066981556420608.0, + 63923152267905662976.0, + 624302860090054299856857502421553774592.0, + 9.0, + 5703520721951508135936.0, + 44653119094.0, + 1440439605268989184.0, + 3496654014361.0 + }; + for (int i = 0; i < 34; ++i) + if (testdbl_135 (s_135[i]) != dbl_135[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testdblu_135 (u_135[i]) != dblu_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static double dbl_192[] = { + 81945579384314687557742233571238608896.0, + 1640150770700583037463354142621696.0, + 432402469012491501348574281596928.0, + -15369197386440508938509968376382119346509732380672.0, + 217705797486262.0, + 1.0, + -150837356854711041828847616.0, + 1247354027519369502575283929088.0, + -700073531555662276303601532928.0, + -441651351073606679519160525300938309632.0, + -743993151249791396098631688421113856.0, + 1681039.0, + -170386616439159361826828161968707433660416.0, + -97703172400304826279491553722368.0, + 9.0, + 7277656199366069333121407385600.0, + 7201222364.0, + -4671533967546296379435628906938368.0, + 13311155734490577941561344.0, + 76150533189365686624757419076841278552408064.0, + -283560863483321472582205283908875976704.0, + 6438368552004797730833578371043525700779108699471872.0, + 1122038765213390753205991088586752.0, + -9541613313421359725756721135616.0, + 21551012076757076520029583197601792.0, + -4794294047755173506637103104.0, + -5708612827808553984.0, + -2649648007071280532341234166535418312753414144.0, + -35698660478241256505344.0, + -79587921140918.0, + 469393710173925632.0, + -261330983098092727670915068943820759127419298070396928.0, + -115.0, + -1717706681396.0 + }; + static double dblu_192[] = { + 87197051833867272390202829166908318800909697024.0, + 175207476610687217879860344599290566299997853188096.0, + 289472685412214309690412105728.0, + 58352315342320052737011578650960945217536.0, + 68512267071922037583525562378571212344840731754496.0, + 8654067584750856522039960763727020807946240.0, + 57027948061283101680073163019018106591772672.0, + 512829256101.0, + 8815296701808550079625439512864915193856.0, + 1918805208198312244509799350272.0, + 99680639255733808.0, + 313647272226958910616850399232.0, + 534434342549592748637063994840786615140352.0, + 1751643652514709.0, + 24084146046683127568067882664329216.0, + 1282076.0, + 13590701668411111424.0, + 62207549230439505920.0, + 144040025133692463994664792383004082176.0, + 11981724905403944877595374666928320404518862848.0, + 1823479497818478827998416063488921051624645800235106304.0, + 4649.0, + 2095541338428713553559812835366404384524126144954368.0, + 605377488765896315082607405999750595789425999872.0, + 11488350477184224.0, + 9492972359709013522794710883315474336917948771336192.0, + 36826148417259.0, + 554404239122129838954063593472.0, + 2804528919100.0, + 127.0, + 66823885107232869968562331058176.0, + 297736625249.0, + 3701132312864550589964164920177814261972243111315767296.0, + 107247048428.0 + }; + for (int i = 0; i < 34; ++i) + if (testdbl_192 (s_192[i]) != dbl_192[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testdblu_192 (u_192[i]) != dblu_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static double dbl_575[] = { + 822555268170764297634225399451759946746992540590809881338557024729825280.0, + -960580267694575822855611495941585347204287976360447994911667455476231250947192048882720653908949004193890304.0, + 33504080263976494977558165276907141142985667083206076858318677497395449849522674033540660299812700936436629271063580537369602818048.0, + 275983725374553560382241222733294731264.0, + 5534912144897227981721785252365318913099024300479520929615780375858014135428545244514013933284386952701873840884059278413011909801315647098618874845818373456314285330268160.0, + 1412920302762670981724654587829101441064363178039081649317449002875219686863615617096481906597938056255380563207859934619548778496.0, + -262974997977953547412616819382246513411941636601411079958856272578116216992825344.0, + -92488905333378800887332041285981414442679115849793894833270926171369794209000194048.0, + 242604167696163745705487164545064266366976.0, + -3523803651131338905043794395136.0, + -5147220779398204956062097693667869669268514878983078506579452381903246893001528080183706343394366450560829994902536411900094807055106480897434592050304516096.0, + -126995956651641932664992814931771424612524306428042763656077526441611704177400372487041993300114407424.0, + 8137926360495.0, + -15994393111836745817684083180830720.0, + -277068516868681208843378539444762089120272250101874770818281861285776026097252118136221894703961747524419584.0, + 12643256666940490094502018407000917191440297183002304612995222607645672663994449919572180992.0, + 197250790460297249337611855831853736085011038208.0, + 2003391279347377111040.0, + -199877387236416487880239440186867935179678108631030562816.0, + 683783725793437376953847532054635915450883103104150353591684114076623183460343349044869993313461680324691804857056989176851941526653681669242880.0, + 13527430925075103137395594360375039920265895975276069404569617039360.0, + 539267000300803467143224409095377978528526384444410994726548852694612047977432378724606879533366903144710144.0, + 25132435181738021158181758368227989609664280796006529821958155232496895580737809559413590065152.0, + -24501129715197465145324272091136.0, + -26621511339033229577933593130365525581365248.0, + 219726795681725203086615878008721704050996541338139327356409273606611142342004775592132608.0, + 142706206515281338563561427905630882997359612390115520631287147248801675296196390219660900162069776564224.0, + -1272097813202031695774673850580967606153271008283204619545732236750677292631566843904.0, + 104580584066897764106493049954563517551311873970918028573957449051117037877644455167894862496406485527470814840408584063287296.0, + -10163452549280414266636885849517652803498703924514090324303688401722691539656540095676077155202913299163727204412770763270991539282383353646632785170429061890048.0, + -1462817702603947424514705987528105462111189926351038186632282100495484739291866737828490405005509893174352599206536639203945990323918788886528.0, + -1004473459167555693379448563952458083163231922159616.0, + 383945882095471809778477642717090299126500715170441296829413124731981221073489411436597060515704853514279862909459893170581511755452645376.0, + 147266903774875160122803299680751368800498930915627484017852416.0 + }; + static double dblu_575[] = { + 340315902121482059776.0, + 9193736781349493621405581031201638729956693377024.0, + 121133456126887614949840563267333164930922114527830924098169755757644187539060293632.0, + 1253811282917665907146752.0, + 279807426767721167224232624903862775521562023356169096523467570552357504424852523581440.0, + 4763192686302836266016084152796744123294035214336.0, + 19433750446582363914783523863519537892469170046699527182095230312993931481088146791402683275534315552768.0, + 8615689860907973684813089916677872622369301590036773127424335682014143120538819857749267776316706246365207593078790418785926108454964638864284607647395585351338688512.0, + 126055589776274664055563357164473926765229686711256362550309370211691455811892471436667901827515295553040869973224666092493870267949222939304809964524921924217733120.0, + 34636325529158225609732004478359404024810355780116436151965488784911880463832346975056353708910319963631363476007842111096356864.0, + 2295982750677874440830690242430022722310395038479306194944.0, + 22288650253829611656582899585105561922738061312.0, + 61551827.0, + 948415991495935277158065207187216102893971687538169358437498088171511819979329197955070708594226287655578579327935243978625908341735424.0, + 7599947921908039201020389523460283262016591366306988284476594385856376859892071911998135440769024.0, + 3064098671438076262631558926659124050612030123593391586289496610357367704588066201089697403929948683093930760302363801622713089626566308942422673109893593769913375260672.0, + 26163216482276434323059552752807045466093212833119225389172469300377369630622147477953596829696868035573317632.0, + 1083530146709801287488575139896111218252634145778954464029109940268038137024528653987999105697728348938546608345738475665376063185384327227976954513446733080428544.0, + 241446995995054294694559180878245213888164982782164992.0, + 224319712854.0, + 1851847735563213312.0, + 3517907813008404560136740290886107136.0, + 57026061017409511227244639666735331364603008817984523485318163959373956415485902848.0, + 218054639772618086702097627512642011917064593803091900409463425864524464099706282773581011770933248.0, + 1035184782769221376.0, + 20229959242348673341261734187831508959698424427160892456742004821954487315365414763816110107652513076773401171962363904.0, + 48688062002166779121886848500298978377358186775166569744218208875095511886249915901603271262547063601222998163903380246886122115788425950691666910366400512.0, + 38974159722814403783188765470424741900583576369459629735378952745201038923704525454001059605107694314700748523810324480.0, + 195268331869690962780067959053006275481517082721312675880802634445094912.0, + 131384791058457555617616111281677184113372650274571562034279153020161645779289769480396688326656.0, + 1334982489788592098527293353260669206528.0, + 2146.0, + 25165296015221801457062319885385728.0, + 6254.0 + }; + for (int i = 0; i < 34; ++i) + if (testdbl_575 (s_575[i]) != dbl_575[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testdblu_575 (u_575[i]) != dblu_575[i]) + __builtin_abort (); +#endif +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-24.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-24.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,804 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __LDBL_MANT_DIG__ == 64 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) long double +testldbl_135 (_BitInt(135) b) +{ + return b; +} + +__attribute__((noipa)) long double +testldblu_135 (unsigned _BitInt(135) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) long double +testldbl_192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) long double +testldblu_192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) long double +testldbl_575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) long double +testldblu_575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif +#endif + +#if __FLT128_MANT_DIG__ == 113 +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _Float128 +testflt128_135 (_BitInt(135) b) +{ + return b; +} + +__attribute__((noipa)) _Float128 +testflt128u_135 (unsigned _BitInt(135) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _Float128 +testflt128_192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) _Float128 +testflt128u_192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _Float128 +testflt128_575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) _Float128 +testflt128u_575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + static _BitInt(135) s_135[] = { + -39242093wb, + -36246971635108657318127321wb, + -816440703352wb, + 8409360wb, + 231875wb, + -1859wb, + 8123250453541347379290840008816194983wb, + 42642091wb, + -2499664813007708583619356686wb, + -14022533493907734339644wb, + 737816709430180009697449492wb, + 3094418595787172583521548578719419wb, + 84096wb, + -3856393637064417wb, + 5494wb, + -7227655824382622730861wb, + 185250722103742953wb, + -266695839223233222300219080587185431wb, + 124wb, + -4540724906728461994579131745203067wb, + -34474123wb, + 6171186wb, + -1738448518309495501564259945530043942wb, + 3714wb, + 22759310366655438105064084505115489wb, + -461wb, + -1891475049610273521994429918325638525836wb, + -350wb, + 3721759411106519959861226774340wb, + -42485872965031409753wb, + 4362279409022137273490486629950wb, + 521928664204421037572709995195346211111wb, + -50129wb, + -21525556783117336078661729wb + }; + static unsigned _BitInt(135) u_135[] = { + 773802493804221964748670742461281016363uwb, + 897485218654369665002411485681173uwb, + 37306898634990773758633uwb, + 3uwb, + 920156uwb, + 15230973698181139105641901258312096uwb, + 1383843491123931387484696uwb, + 143810081711544975903357370071668200uwb, + 83615891310230331473978uwb, + 1239150390uwb, + 39792042288uwb, + 20985035121604uwb, + 3700707uwb, + 14510535740825uwb, + 5675982879048653163399531637816917uwb, + 593909622129190124122830uwb, + 413008891327830587264uwb, + 34694483328uwb, + 592129uwb, + 2649uwb, + 154468451808267466822214091328849uwb, + 8905088171048376399858691570634230197204uwb, + 456uwb, + 12101uwb, + 5879086272uwb, + 115170058487623uwb, + 2274163249406113742515726136586945854500uwb, + 63923152267905666653uwb, + 624302860090054295150365837280525227924uwb, + 9uwb, + 5703520721951508439418uwb, + 44653119094uwb, + 1440439605268989101uwb, + 3496654014361uwb + }; +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static _BitInt(192) s_192[] = { + 81945579384314684613279565479277935940wb, + 1640150770700583136800158704601080wb, + 432402469012491481987292073086668wb, + -15369197386440508323548800500962985157137866798390wb, + 217705797486262wb, + 1wb, + -150837356854711044278780637wb, + 1247354027519369533750440146304wb, + -700073531555662209687924602081wb, + -441651351073606706893667405889558445894wb, + -743993151249791392844844248857961054wb, + 1681039wb, + -170386616439159353410812029301398243129730wb, + -97703172400304820221345002831889wb, + 9wb, + 7277656199366069102639319241893wb, + 7201222364wb, + -4671533967546296507223686237333335wb, + 13311155734490577635922550wb, + 76150533189365685907637983428512213977569647wb, + -283560863483321465221194695455688610811wb, + 6438368552004797088499844257634549000496626110080371wb, + 1122038765213390728664343086041576wb, + -9541613313421359977755878156940wb, + 21551012076757076795102244535269250wb, + -4794294047755173531367558272wb, + -5708612827808554221wb, + -2649648007071280662902443553973167294046518180wb, + -35698660478241255546377wb, + -79587921140918wb, + 469393710173925646wb, + -261330983098092746969723637867599382044980841179747207wb, + -115wb, + -1717706681396wb + }; + static unsigned _BitInt(192) u_192[] = { + 87197051833867272589618945858714291675632402028uwb, + 175207476610687227705633653396153452205075322355946uwb, + 289472685412214318981767004188uwb, + 58352315342320048378103056601781218026976uwb, + 68512267071922032916894194298300228491490143452269uwb, + 8654067584750856592691725728280108682858075uwb, + 57027948061283099317671673937496946487124629uwb, + 512829256101uwb, + 8815296701808550493421309771596155666520uwb, + 1918805208198312310092547265227uwb, + 99680639255733807uwb, + 313647272226958893709907781719uwb, + 534434342549592762863366619879590694414818uwb, + 1751643652514709uwb, + 24084146046683127013882581681582087uwb, + 1282076uwb, + 13590701668411111769uwb, + 62207549230439503653uwb, + 144040025133692457990548614076288499046uwb, + 11981724905403945793356785358565398049196880116uwb, + 1823479497818478859136796209626920064416489979129893695uwb, + 4649uwb, + 2095541338428713427585867932062430293488017906261402uwb, + 605377488765896342050766363050545164888333863362uwb, + 11488350477184223uwb, + 9492972359709013710789022084605392630683565515935199uwb, + 36826148417259uwb, + 554404239122129842026250702689uwb, + 2804528919100uwb, + 127uwb, + 66823885107232870336040073990324uwb, + 297736625249uwb, + 3701132312864550550157874952341371502832960625370598966uwb, + 107247048428uwb + }; +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _BitInt(575) s_575[] = { + 822555268170764275096048134868384963633463468104839796862654006268369616wb, + -960580267694575830808697063169243963045681635800151938720065734940592300657700227419337766780029829446319203wb, + 33504080263976494448954627475165765154890874061543914469206217657999706310163279811015042121096338719830090426757797138233202615461wb, + 275983725374553564148936957707321552749wb, + 5534912144897227754137156977371639235252437172582938580045103986268272085395760563838753817115093434280932847973705994570261258933419373885658991359441723005813683395590541wb, + 1412920302762671055711845665320769771488824036206881359103417821581950493952853265134760513685359011001836948515905971331797139790wb, + -262974997977953570994865210107604152900839198803859287819970850481583440338320059wb, + -92488905333378799268618025132022462336176863903734682501838771365453998891689279398wb, + 242604167696163732697906496386839396751068wb, + -3523803651131338645439245946293wb, + -5147220779398204849222374563179412010462379234108857688330486391319694172748210918710342389194957287070617133280194810193962683650761347126311504766504260691wb, + -126995956651641937332005246092202755154992252553028943468563459072746155379181900761169956344678911600wb, + 8137926360495wb, + -15994393111836746332671329788635258wb, + -277068516868681202554828866807401284583187899477211188256772654837767448404666578906477389363058609157862574wb, + 12643256666940489874033990964997310860090310878838229112053311027168830831623703103010815387wb, + 197250790460297242975596746662998763328365874997wb, + 2003391279347376998472wb, + -199877387236416475658211887841938073691092213166438343739wb, + 683783725793437346966376731991835336458591392078548990419792641719902684445391913394174240265031277360362886303597899811253111402611797905136669wb, + 13527430925075101894748577029275389339063875642859674079897983403256wb, + 539267000300803493510458136103246878203019746178696339759252798818676107273127463057162208073142618039409911wb, + 25132435181738021677664552852329012363786311024121402747618663944355967806315928846073722774898wb, + -24501129715197464074815490290653wb, + -26621511339033230503491791253914731850253401wb, + 219726795681725191949095808767196099036895435893837474958165415185577738548053399820419849wb, + 142706206515281341916417852232439287400819155237127620529348000437671770471697052705666056232742428920527wb, + -1272097813202031618710288063584910456400985264371503722255927680393419899507092728461wb, + 104580584066897755717617980935051171929519336855902844943415231226523598033953128466889325153396268078513996620240379420239887wb, + -10163452549280413821027501723364683075067110986059205073343287754152825761658667193285948456506970145368258900765489010580419998927374372004822965287098902519382wb, + -1462817702603947401421838547412731208810505797188084686210372939517152226213737422286025118826482655559744680456146694118022879735528111700409wb, + -1004473459167555639043426932334304398038355185104669wb, + 383945882095471823332216311173956104021530654187057868803605149628498470119801535759629951357637987556377174553957515312582545289930138018wb, + 147266903774875157001493887893421901156259749590403482558013070wb + }; + static unsigned _BitInt(575) u_575[] = { + 340315902121482071031uwb, + 9193736781349493374149172723522049938732355975055uwb, + 121133456126887617775249483436586396232697894267611535022240817951287068117843073672uwb, + 1253811282917666038992497uwb, + 279807426767721176279253888473522991149118862415710500804613956730247764438409575562386uwb, + 4763192686302836059965684032432862167583119264783uwb, + 19433750446582365356875213925336734177599085624532213292961813424848222698351037862663241858724337375675uwb, + 8615689860907972907203187028321798323548254692780962654211537619771698680316938530412569744897459065621193843349775333790731199245018643579445580816793381624810616262uwb, + 126055589776274659515356020606486923511478187977197128509709117843059226901071386846700207970626608150351060714322162254429913496135590117225450775153364768928781244uwb, + 34636325529158225079379169125604752070369970834816893592982969115088710130160324580864333959889906313467177163564702338046445540uwb, + 2295982750677874548137685137480985649627965059590627454944uwb, + 22288650253829612832302454550260146151077393473uwb, + 61551827uwb, + 948415991495935226718622697967024251064408554619458611515264819726244946850447758605031396753280209023664964305741301009407513619686102uwb, + 7599947921908039117808602805272900633862767543347735124983729771592896283177667324402886239291446uwb, + 3064098671438076295010586583414642866550259610904044948559784636731818131096680869327433283805326015689481397549653557650965154282598345191654721039973597171695049076467uwb, + 26163216482276433755253744705785501134309546797499410671258175352214852627310317854549342428286751107453875459uwb, + 1083530146709801198539441549736949256980046185455966999062614188586191607484611079705240990524552846829821534154580456458426794497253838343299379036578711641930103uwb, + 241446995995054305582384233456322509709013171336859127uwb, + 224319712854uwb, + 1851847735563213275uwb, + 3517907813008404838784133683859253992uwb, + 57026061017409510123542169719303829618100077009666501089739966522905673377916488253uwb, + 218054639772618074096850378810323560503313926757275788155487065187235936858569852576120793613879980uwb, + 1035184782769221379uwb, + 20229959242348674822834301353257599618846169820699281424077697412860273533283192155424030349307384555863768665398854990uwb, + 48688062002166777196074419660880812175599377353811333642743225865182422320253615211852611218169059717666168172585704763331192485699241038689921302806665184uwb, + 38974159722814402881994907079236516884965127718714589284306855526034875317101125387287977578141556918226042568695412232uwb, + 195268331869690963115384309853070889302314974440838447729079592004150231uwb, + 131384791058457562831689753115846222538215620945564207628285200123621656731679644407994773520965uwb, + 1334982489788592107403503927792629194402uwb, + 2146uwb, + 25165296015221802429838428736907886uwb, + 6254uwb + }; +#endif +#if __LDBL_MANT_DIG__ == 64 +#if __BITINT_MAXWIDTH__ >= 135 + static long double ldbl_135[] = { + -39242093.0L, + -36246971635108657317806080.0L, + -816440703352.0L, + 8409360.0L, + 231875.0L, + -1859.0L, + 8123250453541347379469761730828042240.0L, + 42642091.0L, + -2499664813007708583503069184.0L, + -14022533493907734339584.0L, + 737816709430180009723559936.0L, + 3094418595787172583474668509331456.0L, + 84096.0L, + -3856393637064417.0L, + 5494.0L, + -7227655824382622730752.0L, + 185250722103742953.0L, + -266695839223233222305995365384454144.0L, + 124.0L, + -4540724906728461994627321936478208.0L, + -34474123.0L, + 6171186.0L, + -1738448518309495501607474587347451904.0L, + 3714.0L, + 22759310366655438104798293506654208.0L, + -461.0L, + -1891475049610273521975332702278492618752.0L, + -350.0L, + 3721759411106519959735009017856.0L, + -42485872965031409752.0L, + 4362279409022137273388535644160.0L, + 521928664204421037567490386336795328512.0L, + -50129.0L, + -21525556783117336078974976.0L + }; + static long double ldblu_135[] = { + 773802493804221964731523995050312728576.0L, + 897485218654369665019834468925440.0L, + 37306898634990773757952.0L, + 3.0L, + 920156.0L, + 15230973698181139106030422216146944.0L, + 1383843491123931387527168.0L, + 143810081711544975903121569568784384.0L, + 83615891310230331473920.0L, + 1239150390.0L, + 39792042288.0L, + 20985035121604.0L, + 3700707.0L, + 14510535740825.0L, + 5675982879048653163182084577034240.0L, + 593909622129190124126208.0L, + 413008891327830587264.0L, + 34694483328.0L, + 592129.0L, + 2649.0L, + 154468451808267466823175803764736.0L, + 8905088171048376400013977264402823380992.0L, + 456.0L, + 12101.0L, + 5879086272.0L, + 115170058487623.0L, + 2274163249406113742443724808818842927104.0L, + 63923152267905666652.0L, + 624302860090054295134491019551908560896.0L, + 9.0L, + 5703520721951508439552.0L, + 44653119094.0L, + 1440439605268989101.0L, + 3496654014361.0L + }; + for (int i = 0; i < 34; ++i) + if (testldbl_135 (s_135[i]) != ldbl_135[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testldblu_135 (u_135[i]) != ldblu_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static long double ldbl_192[] = { + 81945579384314684615486553814565126144.0L, + 1640150770700583136824020921483264.0L, + 432402469012491481997169632739328.0L, + -15369197386440508323699427265690859620608677773312.0L, + 217705797486262.0L, + 1.0L, + -150837356854711044278321152.0L, + 1247354027519369533773926367232.0L, + -700073531555662209714428575744.0L, + -441651351073606706894128730685912907776.0L, + -743993151249791392856039956714356736.0L, + 1681039.0L, + -170386616439159353411571089494999662854144.0L, + -97703172400304820218983461421056.0L, + 9.0L, + 7277656199366069102773721366528.0L, + 7201222364.0L, + -4671533967546296507225268333576192.0L, + 13311155734490577636425728.0L, + 76150533189365685909073333864980807126351872.0L, + -283560863483321465221954398498764881920.0L, + 6438368552004797088286842127358606670130187958484992.0L, + 1122038765213390728647299370582016.0L, + -9541613313421359977544883896320.0L, + 21551012076757076794749160467202048.0L, + -4794294047755173531333165056.0L, + -5708612827808554221.0L, + -2649648007071280662943908311143037314611019776.0L, + -35698660478241255546880.0L, + -79587921140918.0L, + 469393710173925646.0L, + -261330983098092746965490195259240226746743657452273664.0L, + -115.0L, + -1717706681396.0L + }; + static long double ldblu_192[] = { + 87197051833867272588273235452569162784769572864.0L, + 175207476610687227706687797568524886702441101262848.0L, + 289472685412214318984721334272.0L, + 58352315342320048378267314962278412976128.0L, + 68512267071922032918571353538687014836972935970816.0L, + 8654067584750856592762121211182827528257536.0L, + 57027948061283099315414259852803440866492416.0L, + 512829256101.0L, + 8815296701808550493422802574317577043968.0L, + 1918805208198312310068180156416.0L, + 99680639255733807.0L, + 313647272226958893711859122176.0L, + 534434342549592762879721307175636579647488.0L, + 1751643652514709.0L, + 24084146046683127014125128497758208.0L, + 1282076.0L, + 13590701668411111769.0L, + 62207549230439503652.0L, + 144040025133692457990249596390545031168.0L, + 11981724905403945793671003738109723829870788608.0L, + 1823479497818478859069120464961329580751135834288160768.0L, + 4649.0L, + 2095541338428713427646614015896834392659590161367040.0L, + 605377488765896342059796742106757546391141089280.0L, + 11488350477184223.0L, + 9492972359709013711015472005202975871148440705564672.0L, + 36826148417259.0L, + 554404239122129842012080308224.0L, + 2804528919100.0L, + 127.0L, + 66823885107232870337998237990912.0L, + 297736625249.0L, + 3701132312864550550087325046630338074858031302905430016.0L, + 107247048428.0L + }; + for (int i = 0; i < 34; ++i) + if (testldbl_192 (s_192[i]) != ldbl_192[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testldblu_192 (u_192[i]) != ldblu_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static long double ldbl_575[] = { + 822555268170764275077806657331958312785072234722196584950240570089930752.0L, + -960580267694575830812783278498171621690403946709581436518965868233794729994615679173272606109483012722786304.0L, + 33504080263976494448478492229617991564043478238504231331124912879329149376584163966764611121993710792934518914942887118335291424768.0L, + 275983725374553564145377013770043260928.0L, + 5534912144897227754208044441151874379702287612174069453950291607680839007181861996360330547973886690095069343864416739797783816199380471673982675880600014677768303758278656.0L, + 1412920302762671055675563434211562120848328209741725967322941102900395775694793728702679689406728724040334624347456855689117302784.0L, + -262974997977953570989611804750151836163609455430948784164618597359252696534614016.0L, + -92488905333378799268155556881914668962189440213360997930258834387927208673968914432.0L, + 242604167696163732690645137756322057420800.0L, + -3523803651131338645559050240000.0L, + -5147220779398204849257508190774210744388677252688140210517976277065981842998232251783846790859222005317012238819263034139406832143929230632126090335152504832.0L, + -126995956651641937331951286489675247329200371648605762035297081195775007184684091195737834711064510464.0L, + 8137926360495.0L, + -15994393111836746332220340607909888.0L, + -277068516868681202557212831225058932276240633526059351948516115207300877649787450206685852465539880786591744.0L, + 12643256666940489873646135309702875993528109590137490134559735498193302898793674757994708992.0L, + 197250790460297242979551814062140644203109023744.0L, + 2003391279347376998528.0L, + -199877387236416475651341878965641904464653154051860463616.0L, + 683783725793437346957771892228315489408774085809131650337993219889398577200119614673432810174598052160906191944536223932553104679193775255322624.0L, + 13527430925075101895119202629107559447133788166435502697026955509760.0L, + 539267000300803493497377352922791719626542478240740953329921195747662290582499442246914945221535539392413696.0L, + 25132435181738021677436908541817803462240416694341366601465742717478799945180412844899030794240.0L, + -24501129715197464074399946637312.0L, + -26621511339033230503970770955171473406296064.0L, + 219726795681725191947197274288751751131300579623020247100319392523607242309690678380068864.0L, + 142706206515281341912722598102787801262511939753862115682796537774690209934320984609531887855849227419648.0L, + -1272097813202031618686076349197106943277274743836448162114522403548727854475931287552.0L, + 104580584066897755721462109894862071102150680746488173021715848651881249493019658369304827516906027223482984669789074019581952.0L, + -10163452549280413820781685181828332647679763634230328394877439998644536448688077844493834184118223902098524496370094218227350253632267534838755399334577766924288.0L, + -1462817702603947401460379075968185573663143558708148172616668782116177216739740002633588435639151707520878885121466080144202470951229168025600.0L, + -1004473459167555639022590826165981346984598475636736.0L, + 383945882095471823335289502673360394820076368186253637060368537085404663434451033274997076104121125319917967630183508209073164612376985600.0L, + 147266903774875157000698971886464128985498372744856873180594176.0L + }; + static long double ldblu_575[] = { + 340315902121482071040.0L, + 9193736781349493374213713986696905438099568328704.0L, + 121133456126887617773526383630522733268849231796244390648544501184867233045273378816.0L, + 1253811282917666039005184.0L, + 279807426767721176282774705066477746529679092594765002865548096525989858075665567318016.0L, + 4763192686302836060022861615709466380079764340736.0L, + 19433750446582365356243841895010508514709904909750555910761104889681456249932954817669662897799021199360.0L, + 8615689860907972907222987015567999691990010815316564361117521521881809095333131098584672097178927461838400993199702306526955489286031755082939241644835174978131329024.0L, + 126055589776274659510297467904389237873624120132406221380350474491493460160959938222126650105936552657875183912780356083785858555181180003532557375481178518259236864.0L, + 34636325529158225078961380771473094521787740905726267965061232731631589683984587408777114033008811740835389841050115225879052288.0L, + 2295982750677874548189777005986107945005083683202176909312.0L, + 22288650253829612832625936906216823076906074112.0L, + 61551827.0L, + 948415991495935226723497275802282711176800359354343687935431821975740085005513640520546841077796705045317773075243223746142080749010944.0L, + 7599947921908039117650085272592622557045482160051694630122205426595170751482611426300682100015104.0L, + 3064098671438076294956291179633525016992278379765933214428836815032632500735568461039018643426109912566222922020667353487719095386222010158443081500511850171532585205760.0L, + 26163216482276433754726515355485427397196865766902718455812787467581155703138962108081214195725927010405449728.0L, + 1083530146709801198518741455890332623877113096673714750194062874316360337538555304664904549334408175509822671036217297610308526225295574707709647653730601851158528.0L, + 241446995995054305577613396367243923288085288827486208.0L, + 224319712854.0L, + 1851847735563213275.0L, + 3517907813008404838855514029591363584.0L, + 57026061017409510124756586261527283120773656504559685146885133984875447971917856768.0L, + 218054639772618074103918318492639949832541424857847525973689094242831096606721142712632506945896448.0L, + 1035184782769221379.0L, + 20229959242348674822030474865930581759882432185790556800837709536659306775612115303354290565630013099091822016569802752.0L, + 48688062002166777197217906565531932202748743487730562775775885775077288260863868471270436338269362633469095873857458641986964902395586782692041797794791424.0L, + 38974159722814402882041466859823829059112658796999627209873147217197515116287035613100423934964813946613319590312148992.0L, + 195268331869690963115301358617419463247405494910442809797401817422757888.0L, + 131384791058457562832910671881942611444639653628436820141165072497889292487990472973483579015168.0L, + 1334982489788592107381730508641253982208.0L, + 2146.0L, + 25165296015221802429839839397412864.0L, + 6254.0L + }; + for (int i = 0; i < 34; ++i) + if (testldbl_575 (s_575[i]) != ldbl_575[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testldblu_575 (u_575[i]) != ldblu_575[i]) + __builtin_abort (); +#endif +#endif +#if __FLT128_MANT_DIG__ == 113 +#if __BITINT_MAXWIDTH__ >= 135 + static _Float128 flt128_135[] = { + -39242093.0F128, + -36246971635108657318127321.0F128, + -816440703352.0F128, + 8409360.0F128, + 231875.0F128, + -1859.0F128, + 8123250453541347379290840008816194560.0F128, + 42642091.0F128, + -2499664813007708583619356686.0F128, + -14022533493907734339644.0F128, + 737816709430180009697449492.0F128, + 3094418595787172583521548578719419.0F128, + 84096.0F128, + -3856393637064417.0F128, + 5494.0F128, + -7227655824382622730861.0F128, + 185250722103742953.0F128, + -266695839223233222300219080587185440.0F128, + 124.0F128, + -4540724906728461994579131745203067.0F128, + -34474123.0F128, + 6171186.0F128, + -1738448518309495501564259945530043904.0F128, + 3714.0F128, + 22759310366655438105064084505115488.0F128, + -461.0F128, + -1891475049610273521994429918325638430720.0F128, + -350.0F128, + 3721759411106519959861226774340.0F128, + -42485872965031409753.0F128, + 4362279409022137273490486629950.0F128, + 521928664204421037572709995195346190336.0F128, + -50129.0F128, + -21525556783117336078661729.0F128 + }; + static _Float128 flt128u_135[] = { + 773802493804221964748670742461281075200.0F128, + 897485218654369665002411485681173.0F128, + 37306898634990773758633.0F128, + 3.0F128, + 920156.0F128, + 15230973698181139105641901258312096.0F128, + 1383843491123931387484696.0F128, + 143810081711544975903357370071668192.0F128, + 83615891310230331473978.0F128, + 1239150390.0F128, + 39792042288.0F128, + 20985035121604.0F128, + 3700707.0F128, + 14510535740825.0F128, + 5675982879048653163399531637816917.0F128, + 593909622129190124122830.0F128, + 413008891327830587264.0F128, + 34694483328.0F128, + 592129.0F128, + 2649.0F128, + 154468451808267466822214091328849.0F128, + 8905088171048376399858691570634230595584.0F128, + 456.0F128, + 12101.0F128, + 5879086272.0F128, + 115170058487623.0F128, + 2274163249406113742515726136586945953792.0F128, + 63923152267905666653.0F128, + 624302860090054295150365837280525221888.0F128, + 9.0F128, + 5703520721951508439418.0F128, + 44653119094.0F128, + 1440439605268989101.0F128, + 3496654014361.0F128, + }; + for (int i = 0; i < 34; ++i) + if (testflt128_135 (s_135[i]) != flt128_135[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testflt128u_135 (u_135[i]) != flt128u_135[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static _Float128 flt128_192[] = { + 81945579384314684613279565479277936640.0F128, + 1640150770700583136800158704601080.0F128, + 432402469012491481987292073086668.0F128, + -15369197386440508323548800500962985275185701060608.0F128, + 217705797486262.0F128, + 1.0F128, + -150837356854711044278780637.0F128, + 1247354027519369533750440146304.0F128, + -700073531555662209687924602081.0F128, + -441651351073606706893667405889558413312.0F128, + -743993151249791392844844248857961088.0F128, + 1681039.0F128, + -170386616439159353410812029301398240755712.0F128, + -97703172400304820221345002831889.0F128, + 9.0F128, + 7277656199366069102639319241893.0F128, + 7201222364.0F128, + -4671533967546296507223686237333335.0F128, + 13311155734490577635922550.0F128, + 76150533189365685907637983428512210753683456.0F128, + -283560863483321465221194695455688622080.0F128, + 6438368552004797088499844257634549357780509986390016.0F128, + 1122038765213390728664343086041576.0F128, + -9541613313421359977755878156940.0F128, + 21551012076757076795102244535269248.0F128, + -4794294047755173531367558272.0F128, + -5708612827808554221.0F128, + -2649648007071280662902443553973167373493993472.0F128, + -35698660478241255546377.0F128, + -79587921140918.0F128, + 469393710173925646.0F128, + -261330983098092746969723637867599366653101971873988608.0F128, + -115.0F128, + -1717706681396.0F128 + }; + static _Float128 flt128u_192[] = { + 87197051833867272589618945858714289326891466752.0F128, + 175207476610687227705633653396153448946982933495808.0F128, + 289472685412214318981767004188.0F128, + 58352315342320048378103056601781215690752.0F128, + 68512267071922032916894194298300226631128387158016.0F128, + 8654067584750856592691725728280108697911296.0F128, + 57027948061283099317671673937496946996412416.0F128, + 512829256101.0F128, + 8815296701808550493421309771596155584512.0F128, + 1918805208198312310092547265227.0F128, + 99680639255733807.0F128, + 313647272226958893709907781719.0F128, + 534434342549592762863366619879590707855360.0F128, + 1751643652514709.0F128, + 24084146046683127013882581681582088.0F128, + 1282076.0F128, + 13590701668411111769.0F128, + 62207549230439503653.0F128, + 144040025133692457990548614076288499712.0F128, + 11981724905403945793356785358565397335132602368.0F128, + 1823479497818478859136796209626919944362858664695955456.0F128, + 4649.0F128, + 2095541338428713427585867932062430298743231209275392.0F128, + 605377488765896342050766363050545174870818291712.0F128, + 11488350477184223.0F128, + 9492972359709013710789022084605392379617455653257216.0F128, + 36826148417259.0F128, + 554404239122129842026250702689.0F128, + 2804528919100.0F128, + 127.0F128, + 66823885107232870336040073990324.0F128, + 297736625249.0F128, + 3701132312864550550157874952341371337719347203092250624.0F128, + 107247048428.0F128 + }; + for (int i = 0; i < 34; ++i) + if (testflt128_192 (s_192[i]) != flt128_192[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testflt128u_192 (u_192[i]) != flt128u_192[i]) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _Float128 flt128_575[] = { + 822555268170764275096048134868384975231305202380698070398256893835345920.0F128, + -960580267694575830808697063169243925424347053477730475548747760281578375092219925810414573005477242346668032.0F128, + 33504080263976494448954627475165766133582184724974885918953650948043300306793972216863395126909133067122418159809305365193504587776.0F128, + 275983725374553564148936957707321540608.0F128, + 5534912144897227754137156977371639095192412221957522338641107839687274928618580082609389790489874004597965113744368228739650952266120186965187634240183436521269153476116480.0F128, + 1412920302762671055711845665320769739585982745090302228751251561257591917233120715027663177911819317605963828665882521916923707392.0F128, + -262974997977953570994865210107604174211285573449595140085961138156042539763761152.0F128, + -92488905333378799268618025132022457141142846570320249542701164032605273639863975936.0F128, + 242604167696163732697906496386839380754432.0F128, + -3523803651131338645439245946293.0F128, + -5147220779398204849222374563179412133730483913244844947741095427844771020506369407923839149503287374038736861390994705329184147880909168291858806583886610432.0F128, + -126995956651641937332005246092202760396991711130361124184051111962275756857424469430504968451843424256.0F128, + 8137926360495.0F128, + -15994393111836746332671329788635258.0F128, + -277068516868681202554828866807401284897736575250260327862135188106751832616437168642952110232327515317207040.0F128, + 12643256666940489874033990964997310311509982541568852403544135424197738165753506401380990976.0F128, + 197250790460297242975596746662998771990764978176.0F128, + 2003391279347376998472.0F128, + -199877387236416475658211887841938078116745459015943716864.0F128, + 683783725793437346966376731991835350216389560350369725901413018663785858547865033572885485563448799017573485017347368404816660544180811049467904.0F128, + 13527430925075101894748577029275390536381026872613143284679822016512.0F128, + 539267000300803493510458136103246882259019817595681864105782809148075261013592028608675098514927074416787456.0F128, + 25132435181738021677664552852329012575221796248107329953164935247044160207130354864627942162432.0F128, + -24501129715197464074815490290653.0F128, + -26621511339033230503491791253914733242220544.0F128, + 219726795681725191949095808767196088027323027463729625239897408186970438805069530998505472.0F128, + 142706206515281341916417852232439290189748851664859866651282555201592789754864805842059991220441617268736.0F128, + -1272097813202031618710288063584910381967486400606337174633920325485235383013308628992.0F128, + 104580584066897755717617980935051170305797669115984125432799736278374300011999760896397625133977276440200975782266619201323008.0F128, + -10163452549280413821027501723364683055953700133730297193238300661557892457130680244331940377983114543931479834308368189407852102459256936746559008186557007921152.0F128, + -1462817702603947401421838547412731245576629932826602450317303690796368281340685443455159080277069867736216994863788876540424722028886424027136.0F128, + -1004473459167555639043426932334304453164309296447488.0F128, + 383945882095471823332216311173956128684860565442900813809054240626596219564185981250247929792487147923720686617427927221102360379955085312.0F128, + 147266903774875157001493887893421894471609745020407505370480640.0F128 + }; + static _Float128 flt128u_575[] = { + 340315902121482071031.0F128, + 9193736781349493374149172723522049989237037596672.0F128, + 121133456126887617775249483436586393077503068671965236572261282102895601164339904512.0F128, + 1253811282917666038992497.0F128, + 279807426767721176279253888473523001912720192704990464927491539867791671603022985691136.0F128, + 4763192686302836059965684032432862322867369410560.0F128, + 19433750446582365356875213925336732513880424973437320406724993874129714386347241802580335495811686203392.0F128, + 8615689860907972907203187028321797859877386013383767881250826182682427913148188824772809437492048511967461413139431335435390421932095562711387007040942408370667651072.0F128, + 126055589776274659515356020606486933259536337762793314648917307764206055685941649262118277933003906979239670868955670671312897309994725986907806357486538234999603200.0F128, + 34636325529158225079379169125604750695785810484482739930710385070599465675115027923570016766582469711320673437462251387815460864.0F128, + 2295982750677874548137685137480985746757882615322149650432.0F128, + 22288650253829612832302454550260146257726013440.0F128, + 61551827.0F128, + 948415991495935226718622697967024239258764159275032239689900905479457935391294424204960412146551901344394652585549587358170098052366336.0F128, + 7599947921908039117808602805272900645537701743475990438308994289927813380793983514791799884349440.0F128, + 3064098671438076295010586583414642942579869059363710430687661115226367832562244997089071440248013792356608654440236754254640577193658338300579944911876551907294312398848.0F128, + 26163216482276433755253744705785501643665555701904644656073951369763934041725743914298920119135277939192496128.0F128, + 1083530146709801198539441549736949272615707866142747675126337487600174059213906750437224937669383865518151504262638122920877713397402240447485732907072897115226112.0F128, + 241446995995054305582384233456322524985744615968604160.0F128, + 224319712854.0F128, + 1851847735563213275.0F128, + 3517907813008404838784133683859253760.0F128, + 57026061017409510123542169719303831161096310734855482941686454210514675616939245568.0F128, + 218054639772618074096850378810323562095353038053985944696037552052916135283715799629412817614929920.0F128, + 1035184782769221379.0F128, + 20229959242348674822834301353257600173306714018005091825486635184900252137125196224692061477495530409091482128339697664.0F128, + 48688062002166777196074419660880812364369698930536203875840059698600317657977119368587792531578529291152047948106379901115479025495192432692355212848922624.0F128, + 38974159722814402881994907079236517852974167599450685098668223152330886687288507721175784841029076691372600892770484224.0F128, + 195268331869690963115384309853070885336463825745125450367383853651197952.0F128, + 131384791058457562831689753115846222841883611947373268365763186683292391066729693706687923355648.0F128, + 1334982489788592107403503927792629186560.0F128, + 2146.0F128, + 25165296015221802429838428736907888.0F128, + 6254.0F128 + }; + for (int i = 0; i < 34; ++i) + if (testflt128_575 (s_575[i]) != flt128_575[i]) + __builtin_abort (); + for (int i = 0; i < 34; ++i) + if (testflt128u_575 (u_575[i]) != flt128u_575[i]) + __builtin_abort (); +#endif +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-25.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-25.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,91 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint && float16_runtime } } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ +/* { dg-add-options float16 } */ + +int +main () +{ +#if __FLT16_MANT_DIG__ == 11 + static volatile _Float16 s[] = { + 0.0F16, + 42.0F16, + -65504.0F16, + 65504.0F16 + }; + static volatile _Float16 u[] = { + 0.0F16, + 1.0F16, + 178.0F16, + 65504.0F16 + }; +#if __BITINT_MAXWIDTH__ >= 135 + static volatile _BitInt(135) s_135[] = { + 0wb, + 42wb, + -65504wb, + 65504wb + }; + static volatile unsigned _BitInt(135) u_135[] = { + 0uwb, + 1uwb, + 178uwb, + 65504uwb + }; + for (int i = 0; i < 4; ++i) + { + if (s[i] != (_Float16) s_135[i] + || u[i] != (_Float16) u_135[i] + || (_BitInt(135)) s[i] != s_135[i] + || (unsigned _BitInt(135)) u[i] != u_135[i]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 192 + static volatile _BitInt(192) s_192[] = { + 0wb, + 42wb, + -65504wb, + 65504wb + }; + static volatile unsigned _BitInt(192) u_192[] = { + 0uwb, + 1uwb, + 178uwb, + 65504uwb + }; + for (int i = 0; i < 4; ++i) + { + if (s[i] != (_Float16) s_192[i] + || u[i] != (_Float16) u_192[i] + || (_BitInt(192)) s[i] != s_192[i] + || (unsigned _BitInt(192)) u[i] != u_192[i]) + __builtin_abort (); + } +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static volatile _BitInt(575) s_575[] = { + 0wb, + 42wb, + -65504wb, + 65504wb + }; + static volatile unsigned _BitInt(575) u_575[] = { + 0uwb, + 1uwb, + 178uwb, + 65504uwb + }; + for (int i = 0; i < 4; ++i) + { + if (s[i] != (_Float16) s_575[i] + || u[i] != (_Float16) u_575[i] + || (_BitInt(575)) s[i] != s_575[i] + || (unsigned _BitInt(575)) u[i] != u_575[i]) + __builtin_abort (); + } +#endif +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-26.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-26.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,66 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) _BitInt(135) +test_135 (_BitInt(135) x) +{ + return x; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) unsigned _BitInt(192) +test_192 (unsigned _BitInt(192) x) +{ + return x; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +test_575 (_BitInt(575) x) +{ + return x; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + if (test_135 (-3544625980220396993429741165699996713118wb) + != -3544625980220396993429741165699996713118wb) + __builtin_abort (); + if (test_135 (2169804wb) != 2169804wb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 192 + if (test_192 (3548247468860296534428690122730090696161878417599647607527uwb) + != 3548247468860296534428690122730090696161878417599647607527uwb) + __builtin_abort (); + if (test_192 (2169804wb) != 2169804wb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (test_575 (-33874713055088145128482141398907153733216500583643955589065159154103468056485975553675944430696955474989655597693729139818286384955989466009330817447458608627989731550807841wb) + != -33874713055088145128482141398907153733216500583643955589065159154103468056485975553675944430696955474989655597693729139818286384955989466009330817447458608627989731550807841wb) + __builtin_abort (); + if (test_575 (-3433547832854987708194667330190358661244810661613962474981319303539871wb) + != -3433547832854987708194667330190358661244810661613962474981319303539871wb) + __builtin_abort (); + if (test_575 (-49693319wb) != -49693319wb) + __builtin_abort (); + if (test_575 (57563058931861084391041643822550577259264793697002277417254009715684553274763772399490655207001200602249198262962055591804634113396033194657392511369609233430583407788096333wb) + != 57563058931861084391041643822550577259264793697002277417254009715684553274763772399490655207001200602249198262962055591804634113396033194657392511369609233430583407788096333wb) + __builtin_abort (); + if (test_575 (158093724114624905837287422406159616673122916308832353wb) + != 158093724114624905837287422406159616673122916308832353wb) + __builtin_abort (); + if (test_575 (3807354285642wb) != 3807354285642wb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-27.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-27.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,373 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +int expected; + +__attribute__((noipa)) void +test (int x, int y, int z) +{ + (void) x; + (void) y; + if (z != expected) + __builtin_abort (); +} + +#if __BITINT_MAXWIDTH__ >= 135 +__attribute__((noipa)) void +test_135 (_BitInt(135) a) +{ + switch (a) + { + case -33841133710wb: + test (1, 2, 1); break; + case -55283508608004252890371630137wb: + test (2, 3, 2); break; + case -1065119162618253595246332535wb: + test (3, 4, 3); break; + case 265225687803630460135wb: + test (4, 5, 4); break; + case 12802219454007328327057691wb: + test (5, 6, 5); break; + case -59157301wb: + test (6, 7, 6); break; + case 28029296819738wb: + test (7, 8, 7); break; + case 23771967952817687922824184198772908114wb: + test (8, 9, 8); break; + case -528wb: + test (10, 9, 9); break; + case -21743705968wb: + test (11, 8, 10); break; + case 3761322442803929370621734404255158wb: + test (12, 7, 11); break; + case 7581882536870984828946588790215963wb: + test (13, 6, 12); break; + case -3601335158354600803149652143011wb: + test (14, 5, 13); break; + case 104802210847691888333394846958wb: + test (15, 4, 14); break; + case 145823237253137988087297wb: + test (16, 3, 15); break; + case 3871725619091wb: + test (17, 2, 16); break; + case -480987385702wb: + test (18, 1, 17); break; + case -1084968414543030wb: + test (19, 0, 18); break; + case -12928976wb: + test (20, -1, 19); break; + case -268774wb: + test (21, -2, 20); break; + case 532464351235328336949014678wb: + test (22, -3, 21); break; + case -1145290618187237284790705482290160wb: + test (23, -4, 22); break; + case -249459466889744wb: + test (24, -5, 23); break; + case -1403065236wb: + test (25, 1, 24); break; + case -25456270573862478377606wb: + test (26, 2, 25); break; + case 33340794611915791wb: + test (27, 3, 26); break; + case -674079586163272813wb: + test (28, 4, 27); break; + case -41952758959718119236303556590897001668wb: + test (29, 5, 28); break; + case 2947453415wb: + test (30, 6, 29); break; + case -677wb: + test (31, 7, 30); break; + case -463646803422851872253575745194919wb: + test (32, 8, 31); break; + case -71367919591514155952975401251963194wb: + test (33, 7, 32); break; + case -14346961913818709867962386609601wb: + test (34, 6, 33); break; + case 690wb: + test (35, 5, 34); break; + default: + test (36, 4, 35); break; + break; + } +} +#endif + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) int +test_192 (unsigned _BitInt(192) a) +{ + switch (a) + { + case 1505160143063006983093195408894239764415303566721254616896uwb + 48: + case 1505160143063006983093195408894239764415303566721254616896uwb + 49: + case 1505160143063006983093195408894239764415303566721254616896uwb + 50: + case 1505160143063006983093195408894239764415303566721254616896uwb + 51: + case 1505160143063006983093195408894239764415303566721254616896uwb + 52: + case 1505160143063006983093195408894239764415303566721254616896uwb + 53: + case 1505160143063006983093195408894239764415303566721254616896uwb + 54: + case 1505160143063006983093195408894239764415303566721254616896uwb + 55: + case 1505160143063006983093195408894239764415303566721254616896uwb + 56: + case 1505160143063006983093195408894239764415303566721254616896uwb + 57: + case 1505160143063006983093195408894239764415303566721254616896uwb + 65: + case 1505160143063006983093195408894239764415303566721254616896uwb + 66: + case 1505160143063006983093195408894239764415303566721254616896uwb + 67: + case 1505160143063006983093195408894239764415303566721254616896uwb + 68: + case 1505160143063006983093195408894239764415303566721254616896uwb + 69: + case 1505160143063006983093195408894239764415303566721254616896uwb + 70: + return 1; + default: + return 0; + } +} +#endif + +#if __BITINT_MAXWIDTH__ >= 574 +__attribute__((noipa)) void +test_574 (unsigned _BitInt(574) a) +{ + switch (a) + { + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246uwb: + test (22, -3, 1); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891247uwb: + test (23, -4, 2); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891248uwb: + test (24, -5, 3); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891249uwb: + test (25, 1, 4); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891250uwb: + test (26, 2, 5); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891251uwb: + test (27, 3, 6); break; + case 6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891257uwb: + test (28, 4, 7); break; + default: + test (29, 5, 8); break; + break; + } +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) void +test_575 (_BitInt(575) a) +{ + switch (a) + { + case 57158236877324191282832099954551676419657688516114213070568173374483038461911230482096734270573673572006270803057167488583704wb: + test (1, 2, 1); break; + case 55932752002978259755258693759201176077252755664748wb: + test (2, 3, 2); break; + case -4218363291370143377367234486177453689054229233132334373089588356145503900632432151470684730299990106009156255994430506676467506300235609892554834254413957477779209219867825wb: + test (3, 4, 3); break; + case -19380856704203460544565443028wb: + test (4, 5, 4); break; + case 37691457600250454282496246135038751153145234859661859831059667050412054918743986000946778819692986258358820458161034213280wb: + test (5, 6, 5); break; + case 827003152758795459486819489974390601625339063627401335603123746581523657253393870961575744071183196915560771288079061574485309986042624106685495948664669wb: + test (6, 7, 6); break; + case 2001882657256786505981789524889669355393757203160978wb: + test (7, 8, 7); break; + case 2273951349206310803215316642428483249009583047771549wb: + test (8, 9, 8); break; + case -63640037492105525397657594648433413082358686497544854829581174487203243151113011293858381773246wb: + test (10, 9, 9); break; + case -5043989193130150016980754467018673356423436330428309162407512361831163237wb: + test (11, 8, 10); break; + case -86904413785414524864201428752820860524832869110219388825241400306401wb: + test (12, 7, 11); break; + case -7159581406wb: + test (13, 6, 12); break; + case -430416863734662045942802859497964wb: + test (14, 5, 13); break; + case -282099469984391093781566wb: + test (15, 4, 14); break; + case 259191242782270578340350840252447902477249511321245827805053349778984004438373803812874430619356951005300429wb: + test (16, 3, 15); break; + case -17427431700557396203431wb: + test (17, 2, 16); break; + case -324305733281944621534wb: + test (18, 1, 17); break; + case 39167932287702074309519944575154814029176054304655900600154735991016090154633448789399330wb: + test (19, 0, 18); break; + case 198828227576458371467364915441164050473274232622009526563856039032wb: + test (20, -1, 19); break; + case 7522018863556878842079508104211164618555wb: + test (21, -2, 20); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246wb: + test (22, -3, 21); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891247wb: + test (23, -4, 22); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891248wb: + test (24, -5, 23); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891249wb: + test (25, 1, 24); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891250wb: + test (26, 2, 25); break; + case -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891251wb: + test (27, 3, 26); break; + case 25232715496072790939146860623749108256506615788345509143038026592127702780903347954226870163752427434085269890371577229233150314692259399042327414965711510629wb: + test (28, 4, 27); break; + case 21376200838998904075479297127185224975235208544658573531790808467114261325514834503383673531634166234wb: + test (29, 5, 28); break; + case -12950763061001084589012736558965423479147155000678492177259830314151681149963956790935448632739537613359984550457633150573373wb: + test (30, 6, 29); break; + case -2588834879960231787797472372536501710262304078735816335394876043103825991870347510560085648304946wb: + test (31, 7, 30); break; + case -2701643349985817058465875459099740236751728453427684wb: + test (32, 8, 31); break; + case 5836201004021438163265930908885473220627459728279406489088525555799694670629946003808237930825748wb: + test (33, 7, 32); break; + case 44108809764408326456612205445124618284924483635588993217673301668963284129265963564132943970751645671455967029559660507196902756491684232894669648136319146730wb: + test (34, 6, 33); break; + case 2296104972770686523043774188826290903188890257660332269411533641473619626906874515994186550107564291006924533677263136416982312042wb: + test (35, 5, 34); break; + case 2194074380385385359486226752708738wb: + test (36, 4, 35); break; + case 538995045833371297308662695915673724930785814100527903453604wb: + test (37, 3, 36); break; + case 2085626377217975761550063150555904902911153438008474368944585344266562733501648381wb: + test (38, 2, 37); break; + case -33688835949886075020354777490957071wb: + test (39, 1, 38); break; + case 1391419408329070356813886663340861253838000363084420822349730519562112746630131027735880100996653wb: + test (40, 0, 39); break; + default: + test (41, -1, 40); break; + break; + } +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + static _BitInt(135) a_135[] = { + -33841133710wb, + -55283508608004252890371630137wb, + -1065119162618253595246332535wb, + 265225687803630460135wb, + 12802219454007328327057691wb, + -59157301wb, + 28029296819738wb, + 23771967952817687922824184198772908114wb, + -528wb, + -21743705968wb, + 3761322442803929370621734404255158wb, + 7581882536870984828946588790215963wb, + -3601335158354600803149652143011wb, + 104802210847691888333394846958wb, + 145823237253137988087297wb, + 3871725619091wb, + -480987385702wb, + -1084968414543030wb, + -12928976wb, + -268774wb, + 532464351235328336949014678wb, + -1145290618187237284790705482290160wb, + -249459466889744wb, + -1403065236wb, + -25456270573862478377606wb, + 33340794611915791wb, + -674079586163272813wb, + -41952758959718119236303556590897001668wb, + 2947453415wb, + -677wb, + -463646803422851872253575745194919wb, + -71367919591514155952975401251963194wb, + -14346961913818709867962386609601wb, + 690wb + }; + for (int i = 0; i < 34; ++i) + { + expected = i + 1; + test_135 (a_135[i]); + expected = 35; + test_135 (a_135[i] - 1); + test_135 (a_135[i] + 1); + } +#endif +#if __BITINT_MAXWIDTH__ >= 192 + if (test_192 (0uwb) + || test_192 (1505160143063006983093195408894239764415303566721254616896uwb) + || test_192 (1505160143063006983093195408894239764415303566721254616896uwb + 47) + || test_192 (1505160143063006983093195408894239764415303566721254616896uwb + 71) + || test_192 (-1uwb)) + __builtin_abort (); + for (int i = 48; i <= 70; ++i) + if (test_192 (1505160143063006983093195408894239764415303566721254616896uwb + i) != (i < 58 || i > 64)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 574 + expected = 8; + test_574 (0uwb); + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246uwb - 0x10000000000000000uwb); + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891245uwb); + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891258uwb); + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246uwb + 0x10000000000000000uwb); + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891258uwb + 0x10000000000000000uwb); + for (int i = 0; i <= 11; ++i) + { + expected = i == 11 ? 7 : i > 5 ? 8 : i + 1; + test_574 (6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246uwb + i); + } +#endif +#if __BITINT_MAXWIDTH__ >= 575 + static _BitInt(575) a_575[] = { + 57158236877324191282832099954551676419657688516114213070568173374483038461911230482096734270573673572006270803057167488583704wb, + 55932752002978259755258693759201176077252755664748wb, + -4218363291370143377367234486177453689054229233132334373089588356145503900632432151470684730299990106009156255994430506676467506300235609892554834254413957477779209219867825wb, + -19380856704203460544565443028wb, + 37691457600250454282496246135038751153145234859661859831059667050412054918743986000946778819692986258358820458161034213280wb, + 827003152758795459486819489974390601625339063627401335603123746581523657253393870961575744071183196915560771288079061574485309986042624106685495948664669wb, + 2001882657256786505981789524889669355393757203160978wb, + 2273951349206310803215316642428483249009583047771549wb, + -63640037492105525397657594648433413082358686497544854829581174487203243151113011293858381773246wb, + -5043989193130150016980754467018673356423436330428309162407512361831163237wb, + -86904413785414524864201428752820860524832869110219388825241400306401wb, + -7159581406wb, + -430416863734662045942802859497964wb, + -282099469984391093781566wb, + 259191242782270578340350840252447902477249511321245827805053349778984004438373803812874430619356951005300429wb, + -17427431700557396203431wb, + -324305733281944621534wb, + 39167932287702074309519944575154814029176054304655900600154735991016090154633448789399330wb, + 198828227576458371467364915441164050473274232622009526563856039032wb, + 7522018863556878842079508104211164618555wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891246wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891247wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891248wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891249wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891250wb, + -6286965391667017312339071741838237504698922691411382973783611300502970166307629280084891251wb, + 25232715496072790939146860623749108256506615788345509143038026592127702780903347954226870163752427434085269890371577229233150314692259399042327414965711510629wb, + 21376200838998904075479297127185224975235208544658573531790808467114261325514834503383673531634166234wb, + -12950763061001084589012736558965423479147155000678492177259830314151681149963956790935448632739537613359984550457633150573373wb, + -2588834879960231787797472372536501710262304078735816335394876043103825991870347510560085648304946wb, + -2701643349985817058465875459099740236751728453427684wb, + 5836201004021438163265930908885473220627459728279406489088525555799694670629946003808237930825748wb, + 44108809764408326456612205445124618284924483635588993217673301668963284129265963564132943970751645671455967029559660507196902756491684232894669648136319146730wb, + 2296104972770686523043774188826290903188890257660332269411533641473619626906874515994186550107564291006924533677263136416982312042wb, + 2194074380385385359486226752708738wb, + 538995045833371297308662695915673724930785814100527903453604wb, + 2085626377217975761550063150555904902911153438008474368944585344266562733501648381wb, + -33688835949886075020354777490957071wb, + 1391419408329070356813886663340861253838000363084420822349730519562112746630131027735880100996653wb + }; + for (int i = 0; i < 39; ++i) + { + expected = i + 1; + test_575 (a_575[i]); + expected = 40; + if (i < 20 || i >= 25) + test_575 (a_575[i] - 1); + if (i <= 20 || i > 25) + test_575 (a_575[i] + 1); + } +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-28.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-28.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,20 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#include "../../c-c++-common/torture/builtin-arith-overflow-1.h" + +#define U(s, op) op +TESTS (_BitInt(19), (-262143wb - 1), 262143wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); + +int +main () +{ + TESTS (_BitInt(19), (-262143wb - 1), 262143wb) + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-29.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-29.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,24 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 119 +#include "../../c-c++-common/torture/builtin-arith-overflow-1.h" + +#define U(s, op) op +TESTS (_BitInt(119), (-332306998946228968225951765070086143wb - 1), 332306998946228968225951765070086143wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 119 + TESTS (_BitInt(119), (-332306998946228968225951765070086143wb - 1), 332306998946228968225951765070086143wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-30.c.jj 2023-08-08 16:12:02.344939588 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-30.c 2023-08-08 16:12:02.344939588 +0200 @@ -0,0 +1,19 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#include "../../c-c++-common/torture/builtin-arith-overflow-12.h" + +TESTS (_BitInt(19), (-262143wb - 1), 262143wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); + +int +main () +{ + TESTS (_BitInt(19), (-262143wb - 1), 262143wb) + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-31.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-31.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,23 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 119 +#include "../../c-c++-common/torture/builtin-arith-overflow-12.h" + +TESTS (_BitInt(119), (-332306998946228968225951765070086143wb - 1), 332306998946228968225951765070086143wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 119 + TESTS (_BitInt(119), (-332306998946228968225951765070086143wb - 1), 332306998946228968225951765070086143wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-32.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-32.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,24 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +#include "../../c-c++-common/torture/builtin-arith-overflow-1.h" + +#define U(s, op) op +TESTS (_BitInt(135), (-21778071482940061661655974875633165533183wb - 1), 21778071482940061661655974875633165533183wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + TESTS (_BitInt(135), (-21778071482940061661655974875633165533183wb - 1), 21778071482940061661655974875633165533183wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-33.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-33.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,24 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 192 +#include "../../c-c++-common/torture/builtin-arith-overflow-1.h" + +#define U(s, op) op +TESTS (_BitInt(192), (-3138550867693340381917894711603833208051177722232017256447wb - 1), 3138550867693340381917894711603833208051177722232017256447wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + TESTS (_BitInt(192), (-3138550867693340381917894711603833208051177722232017256447wb - 1), 3138550867693340381917894711603833208051177722232017256447wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-34.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-34.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,24 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 575 +#include "../../c-c++-common/torture/builtin-arith-overflow-1.h" + +#define U(s, op) op +TESTS (_BitInt(575), (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1), 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + TESTS (_BitInt(575), (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1), 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-35.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-35.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,23 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 135 +#include "../../c-c++-common/torture/builtin-arith-overflow-12.h" + +TESTS (_BitInt(135), (-21778071482940061661655974875633165533183wb - 1), 21778071482940061661655974875633165533183wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 135 + TESTS (_BitInt(135), (-21778071482940061661655974875633165533183wb - 1), 21778071482940061661655974875633165533183wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-36.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-36.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,23 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 192 +#include "../../c-c++-common/torture/builtin-arith-overflow-12.h" + +TESTS (_BitInt(192), (-3138550867693340381917894711603833208051177722232017256447wb - 1), 3138550867693340381917894711603833208051177722232017256447wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + TESTS (_BitInt(192), (-3138550867693340381917894711603833208051177722232017256447wb - 1), 3138550867693340381917894711603833208051177722232017256447wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-37.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-37.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,23 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 575 +#include "../../c-c++-common/torture/builtin-arith-overflow-12.h" + +TESTS (_BitInt(575), (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1), 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb) + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + TESTS (_BitInt(575), (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1), 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb) +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-38.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-38.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,56 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 575 +#include "../../c-c++-common/torture/builtin-arith-overflow.h" + +#ifdef __SIZEOF_INT128__ +#define WTYPE __int128 +#else +#define WTYPE long long int +#endif + +#define TESTS \ +T (100, signed _BitInt(38), signed char, unsigned _BitInt(162), -1wb, 0, -1wb, add, 1) \ +T (101, unsigned char, unsigned _BitInt(38), unsigned _BitInt(162), 5, 5wb, 10wb, add, 0) \ +T (102, signed _BitInt(38), unsigned short, unsigned _BitInt(162), 5wb, 5, 0wb, sub, 0) \ +T (103, signed _BitInt(38), unsigned _BitInt(72), unsigned _BitInt(162), 5wb, 6wb, -1wb, sub, 1) \ +T (104, signed _BitInt(38), signed _BitInt(38), unsigned _BitInt(162), -1wb, -1wb, 1wb, mul, 0) \ +T (105, unsigned _BitInt(38), signed _BitInt(38), unsigned _BitInt(162), 17wb, -2wb, -34wb, mul, 1) \ +T (106, unsigned _BitInt(162), signed _BitInt(162), signed _BitInt(38), 5wb, -2wb, -10wb, mul, 0) \ +T (107, signed _BitInt(321), signed _BitInt(321), unsigned _BitInt(38), -3wb, 5wb, 2wb, add, 0) \ +T (108, signed _BitInt(321), int, unsigned _BitInt(38), -5wb, 3, -2wb, add, 1) \ +T (109, int, _BitInt(162), unsigned _BitInt(38), -3, 5wb, 2wb, add, 0) \ +T (110, unsigned _BitInt(38), unsigned _BitInt(38), unsigned _BitInt(162), 137438953471wb - 1, (unsigned _BitInt(38)) 137438953471wb + 4, -5wb, sub, 1) \ +T (111, signed _BitInt(315), signed _BitInt(315), unsigned, -1wb, 0wb, -1, add, 1) \ +T (112, signed _BitInt(315), signed _BitInt(315), unsigned, 5wb, 42wb, 47, add, 0) \ +T (113, signed _BitInt(315), signed _BitInt(315), unsigned WTYPE, -1wb, 0wb, -1, add, 1) \ +T (114, signed _BitInt(315), signed _BitInt(315), unsigned WTYPE, 15wb, 5wb, 20, add, 0) +T (115, signed _BitInt(315), signed _BitInt(315), unsigned _BitInt(135), -1wb, 0wb, -1wb, add, 1) \ +T (116, signed _BitInt(315), signed _BitInt(315), unsigned _BitInt(135), 5wb, 125wb, 130wb, add, 0) \ +T (117, signed _BitInt(275), signed _BitInt(275), unsigned _BitInt(125), -1wb, 0wb, -1wb, add, 1) \ +T (118, signed _BitInt(275), signed _BitInt(275), unsigned _BitInt(125), 5wb, 125wb, 130wb, add, 0) \ +T (119, signed _BitInt(415), signed _BitInt(415), signed _BitInt(178), 95780971304118053647396689196894323976171195136475135wb, 95780971304118053647396689196894323976171195136475137wb, -191561942608236107294793378393788647952342390272950271wb - 1, add, 1) \ +T (120, signed _BitInt(415), signed _BitInt(415), signed _BitInt(178), 95780971304118053647396689196894323976171195136475135wb, 95780971304118053647396689196894323976171195136475136wb, 191561942608236107294793378393788647952342390272950271wb, add, 0) \ +T (121, signed _BitInt(439), signed _BitInt(439), signed _BitInt(192), 1569275433846670190958947355801916604025588861116008628223wb, 1569275433846670190958947355801916604025588861116008628225wb, -3138550867693340381917894711603833208051177722232017256447wb - 1, add, 1) \ +T (122, signed _BitInt(439), signed _BitInt(439), signed _BitInt(192), 1569275433846670190958947355801916604025588861116008628223wb, 1569275433846670190958947355801916604025588861116008628224wb, 3138550867693340381917894711603833208051177722232017256447wb, add, 0) \ +T (123, signed _BitInt(575), signed _BitInt(575), signed _BitInt(193), 3138550867693340381917894711603833208051177722232017256447wb, 3138550867693340381917894711603833208051177722232017256449wb, -6277101735386680763835789423207666416102355444464034512895wb - 1, add, 1) \ +T (124, signed _BitInt(575), signed _BitInt(575), signed _BitInt(193), 3138550867693340381917894711603833208051177722232017256447wb, 3138550867693340381917894711603833208051177722232017256448wb, 6277101735386680763835789423207666416102355444464034512895wb, add, 0) + +TESTS + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + TESTS +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-39.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-39.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,57 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 575 +#define OVFP +#include "../../c-c++-common/torture/builtin-arith-overflow.h" + +#ifdef __SIZEOF_INT128__ +#define WTYPE __int128 +#else +#define WTYPE long long int +#endif + +#define TESTS \ +T (100, signed _BitInt(38), signed char, unsigned _BitInt(162), -1wb, 0, -1wb, add, 1) \ +T (101, unsigned char, unsigned _BitInt(38), unsigned _BitInt(162), 5, 5wb, 10wb, add, 0) \ +T (102, signed _BitInt(38), unsigned short, unsigned _BitInt(162), 5wb, 5, 0wb, sub, 0) \ +T (103, signed _BitInt(38), unsigned _BitInt(72), unsigned _BitInt(162), 5wb, 6wb, -1wb, sub, 1) \ +T (104, signed _BitInt(38), signed _BitInt(38), unsigned _BitInt(162), -1wb, -1wb, 1wb, mul, 0) \ +T (105, unsigned _BitInt(38), signed _BitInt(38), unsigned _BitInt(162), 17wb, -2wb, -34wb, mul, 1) \ +T (106, unsigned _BitInt(162), signed _BitInt(162), signed _BitInt(38), 5wb, -2wb, -10wb, mul, 0) \ +T (107, signed _BitInt(321), signed _BitInt(321), unsigned _BitInt(38), -3wb, 5wb, 2wb, add, 0) \ +T (108, signed _BitInt(321), int, unsigned _BitInt(38), -5wb, 3, -2wb, add, 1) \ +T (109, int, _BitInt(162), unsigned _BitInt(38), -3, 5wb, 2wb, add, 0) \ +T (110, unsigned _BitInt(38), unsigned _BitInt(38), unsigned _BitInt(162), 137438953471wb - 1, (unsigned _BitInt(38)) 137438953471wb + 4, -5wb, sub, 1) \ +T (111, signed _BitInt(315), signed _BitInt(315), unsigned, -1wb, 0wb, -1, add, 1) \ +T (112, signed _BitInt(315), signed _BitInt(315), unsigned, 5wb, 42wb, 47, add, 0) \ +T (113, signed _BitInt(315), signed _BitInt(315), unsigned WTYPE, -1wb, 0wb, -1, add, 1) \ +T (114, signed _BitInt(315), signed _BitInt(315), unsigned WTYPE, 15wb, 5wb, 20, add, 0) +T (115, signed _BitInt(315), signed _BitInt(315), unsigned _BitInt(135), -1wb, 0wb, -1wb, add, 1) \ +T (116, signed _BitInt(315), signed _BitInt(315), unsigned _BitInt(135), 5wb, 125wb, 130wb, add, 0) \ +T (117, signed _BitInt(275), signed _BitInt(275), unsigned _BitInt(125), -1wb, 0wb, -1wb, add, 1) \ +T (118, signed _BitInt(275), signed _BitInt(275), unsigned _BitInt(125), 5wb, 125wb, 130wb, add, 0) \ +T (119, signed _BitInt(415), signed _BitInt(415), signed _BitInt(178), 95780971304118053647396689196894323976171195136475135wb, 95780971304118053647396689196894323976171195136475137wb, -191561942608236107294793378393788647952342390272950271wb - 1, add, 1) \ +T (120, signed _BitInt(415), signed _BitInt(415), signed _BitInt(178), 95780971304118053647396689196894323976171195136475135wb, 95780971304118053647396689196894323976171195136475136wb, 191561942608236107294793378393788647952342390272950271wb, add, 0) \ +T (121, signed _BitInt(439), signed _BitInt(439), signed _BitInt(192), 1569275433846670190958947355801916604025588861116008628223wb, 1569275433846670190958947355801916604025588861116008628225wb, -3138550867693340381917894711603833208051177722232017256447wb - 1, add, 1) \ +T (122, signed _BitInt(439), signed _BitInt(439), signed _BitInt(192), 1569275433846670190958947355801916604025588861116008628223wb, 1569275433846670190958947355801916604025588861116008628224wb, 3138550867693340381917894711603833208051177722232017256447wb, add, 0) \ +T (123, signed _BitInt(575), signed _BitInt(575), signed _BitInt(193), 3138550867693340381917894711603833208051177722232017256447wb, 3138550867693340381917894711603833208051177722232017256449wb, -6277101735386680763835789423207666416102355444464034512895wb - 1, add, 1) \ +T (124, signed _BitInt(575), signed _BitInt(575), signed _BitInt(193), 3138550867693340381917894711603833208051177722232017256447wb, 3138550867693340381917894711603833208051177722232017256448wb, 6277101735386680763835789423207666416102355444464034512895wb, add, 0) + +TESTS + +#undef T +#define T(n, t1, t2, tr, v1, v2, vr, b, o) t##n##b (); +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + TESTS +#endif + return 0; +} --- gcc/testsuite/gcc.dg/torture/bitint-40.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-40.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,40 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 323 +__attribute__((noipa)) _BitInt(323) +foo (_BitInt(318) x, _BitInt(323) y) +{ + return x + y; +} + +__attribute__((noipa)) _BitInt(323) +bar (_BitInt(117) x, _BitInt(323) y) +{ + return x + y; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 323 + if (foo (-27733041854193447641086572824547940096595738628642819753407953445763239714154199953745005898992wb, + 4767458710334760668834645815738583537909191474644120198636728988961922824468904018596948147773722wb) + != 4739725668480567221193559242914035597812595736015477378883321035516159584754749818643203141874730wb + || (foo (22167179033351019542845489620035412963406090796537167425591583962059414367893933412196721063711wb, + 5235750662037407195417484618645691209305675673195256409842928988743249911043551311451335001624960wb) + != 5257917841070758214960330108265726622269081763991793577268520572705309325411445244863531722688671wb)) + __builtin_abort (); + if (bar (-12653567664155974398995022748067044wb, + 7190977642064159111525225823679712940862545424809645152399787447341776579576645887978584020321431wb) + != 7190977642064159111525225823679712940862545424809645152399787434688208915420671488983561272254387wb + || (bar (30518211833575333685611432934770228wb, + 2152360419596992042662178082767272400451689654640037233902067223067458441134717528282349099466966wb) + != 2152360419596992042662178082767272400451689654640037233902067253585670274710051213893782034237194wb)) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-41.c.jj 2023-08-08 16:12:02.345939574 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-41.c 2023-08-08 16:12:02.345939574 +0200 @@ -0,0 +1,34 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 256 +__attribute__((noipa)) _Bool +test256 (_BitInt(256) *q) +{ + return __builtin_sub_overflow ((_BitInt(256)) 0, q[0], q + 1); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 256 + static _BitInt(256) q256[] = { + 45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + 0wb, + -45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + -45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + 0wb, + 45345032714412617256156490782169070529322290545773058110333871537162440472587wb, + -57896044618658097711785492504343953926634992332820282019728792003956564819967wb - 1, + 0wb, + -57896044618658097711785492504343953926634992332820282019728792003956564819967wb - 1 + }; + for (int i = 0; i < 3; ++i) + if (test256 (q256 + 3 * i) != (i == 2) || q256[3 * i + 1] != q256[3 * i + 2]) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/torture/bitint-42.c.jj 2023-08-08 16:15:41.009877752 +0200 +++ gcc/testsuite/gcc.dg/torture/bitint-42.c 2023-08-08 16:15:41.009877752 +0200 @@ -0,0 +1,184 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ +/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ + +#if __BITINT_MAXWIDTH__ >= 156 +struct S156 { unsigned _BitInt(156) a : 135; _BitInt(156) b : 2; }; +struct T156 { _BitInt(156) a : 2; unsigned _BitInt(156) b : 135; _BitInt(156) c : 2; }; + +__attribute__((noipa)) _BitInt(156) +test156 (struct S156 *p, struct T156 *q, struct T156 *r, int n) +{ + r[0].b = p[0].a + q[0].b; + r[1].b = p[1].a * q[1].b; + r[2].a = p[2].a == q[2].b; + r[3].a = p[3].a < q[3].b; + r[4].b = p[4].a << n; + return p[5].a + q[5].b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 495 +struct S495 { unsigned _BitInt(495) a : 471; _BitInt(495) b : 2; }; +struct T495 { _BitInt(495) a : 2; unsigned _BitInt(495) b : 471; _BitInt(495) c : 2; }; + +__attribute__((noipa)) _BitInt(495) +test495 (struct S495 *p, struct T495 *q, struct T495 *r, int n) +{ + r[0].b = p[0].a + q[0].b; + r[1].b = p[1].a * q[1].b; + r[2].a = p[2].a == q[2].b; + r[3].a = p[3].a < q[3].b; + r[4].b = p[4].a << n; + return p[5].a + q[5].b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +struct T575 { _BitInt(575) a : 2; _BitInt(575) b : 382; _BitInt(575) c : 2; }; + +__attribute__((noipa)) _BitInt(575) +test575 (struct T575 *q, _BitInt(575) x) +{ + return q->b + x; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 156 + static struct S156 p156[] = { + { 6086908847973295618751425718189955476089uwb, 0wb }, + { 22782605434509677806291360175224474025979uwb, 1wb }, + { 37470702016132547913133822619863997855935uwb, -1wb }, + { 35506973813062189967442086745146532460068uwb, -2wb }, + { 30541197841349399254932135707861871578815uwb, -2wb }, + { 42800615576623455179183425579556615564998uwb, 1wb }, + { 83771790414073692613953222993102430597uwb, 0wb }, + { 36412564746565547536452588666710660799602uwb, 1wb }, + { 33301340481967309644890101787523367044846uwb, -1wb }, + { 12245185680611854260212331160624126801841uwb, -2wb }, + { 35828279900949208432533857460683046288424uwb, -1wb }, + { 4123278359205456806488911776768785478962uwb, 1wb } + }; + static struct T156 q156[] = { + { -2wb, 20935792668463008606182638244678610336415uwb, 0wb }, + { -1wb, 209336580249060835473242979959042853484uwb, -1wb }, + { 0wb, 26553091584512375040647771207085289684805uwb, -2wb }, + { 1wb, 8584102019879028804166913978503267690027uwb, 1wb }, + { -2wb, 3364986457594728242491236670969190237662uwb, 0wb }, + { 1wb, 28487958103578401823549712846248514887291uwb, -1wb }, + { 1wb, 30323438060061607929914857363700386658179uwb, -2wb }, + { -2wb, 38436123658875864126535628489050345446219uwb, 1wb }, + { -1wb, 33301340481967309644890101787523367044846uwb, -1wb }, + { 0wb, 18081372790322879821963779970917788200718uwb, 0wb }, + { 1wb, 35310198378318023568520640435634029391465uwb, -2wb }, + { -2wb, 16532060682830030166332649597929082719904uwb, -1wb } + }; + struct T156 r156[12]; + static unsigned _BitInt(135) e156[] = { + 27022701516436304224934063962868565812504uwb, + 29613894605882195495382184794066465590244uwb, + 0uwb, + 0uwb, + 25008039169844990156837660987808592822272uwb, + 27732430714321733679421188674538799385921uwb, + 30407209850475681622528810586693489088776uwb, + 9125928536800138281422179636318960655206uwb, + 1uwb, + 1uwb, + 27059094310193532424702800326126974533632uwb, + 20655339042035486972821561374697868198866uwb + }; + for (int i = 0; i < 12; ++i) + { + r156[i].a = (i & 1) ? 1wb : -2wb; + r156[i].b = (i & 1) ? 14518714321960041107770649917088777022122uwb : 29037428643920082215541299834177554044245uwb; + r156[i].c = (i & 1) ? -2wb : 1wb; + } + r156[5].b = test156 (&p156[0], &q156[0], &r156[0], 17); + r156[11].b = test156 (&p156[6], &q156[6], &r156[6], 117); + for (int i = 0; i < 12; ++i) + if ((((i % 6) - 2U <= 1U) ? r156[i].a : r156[i].b) != e156[i]) + __builtin_abort (); + else if ((((i % 6) - 2U > 1U) && r156[i].a != ((i & 1) ? 1wb : -2wb)) + || (((i % 6) - 2U <= 1U) && r156[i].b != ((i & 1) ? 14518714321960041107770649917088777022122uwb : 29037428643920082215541299834177554044245uwb)) + || r156[i].c != ((i & 1) ? -2wb : 1wb)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 495 + static struct S495 p495[] = { + { 5900641461698162830220261443910312286116186030711054026202132317287171989449954433727605565187406942318472276126021616097079737645240098454013uwb, 0wb }, + { 5619335266199392590390116416034736345432323405939461237257863293465693217703812518219356211176818397041537700744525965483063880249177661765822uwb, -1wb }, + { 744675643612988167093151199551285556694415176163561012938968935653355128760309622135847398882788196739068398576440472762370028310765535983503uwb, 1wb }, + { 4710120587609940729927891635083547264060530096467790505615232580303577049694742313824211264116793595223025831432779325089965241897060863692416uwb, -2wb }, + { 4700240735957362687308898816111021174982406591648489926246999776223031821022674194534613241738369983608058217658021289655774135981827101958355uwb, -1wb }, + { 1876262100946684033144524627883805711239772124030259629263615724983251183045150901527994496938087455223125779829665212386349414296844947524925uwb, 0wb }, + { 2635441776228543412090459941414006837629084474712903013295503578947861806271451688519107975488661564459243720565422264844084425272156107387136uwb, 1wb }, + { 2630153258749552262848995430888671592867309014306367216498408256861265344131972108995527284590063838830515851856437258905217521364301962720643uwb, -2wb }, + { 2745338434240621337939928605056928843351970485626602387969150293308450866745407501724727739848971206349186529783705440219203189970551219879381uwb, 1wb }, + { 2688974451781009079406742432598239379065348006788221659938456041627730645258351669705421830999330571339577238631004906071154604486839621759962uwb, -1wb }, + { 4974200409958136921019163732486769139044513968318459321751943678326303994594283963911023171617076265195547773578798591476134329493900866070930uwb, -2wb }, + { 5308892348567193242289576342108929297198516978578910066291782408432432101971103786646801744963140659914127252602243854634890888430591500677669uwb, 0wb } + }; + static struct T495 q495[] = { + { 0wb, 4301604554146816407338627211447119428992719156607107928889754501636100741327050147838502142108071735464603549268761292458205988617578325763173uwb, -2wb }, + { -1wb, 2715194601730000102297343743781623149283369741076005412784114057373119142888076403665408178274328506558203084450300859444566357959934633829946uwb, -1wb }, + { -2wb, 744675643612988167093151199551285556694415176163561012938968935653355128760309622135847398882788196739068398576440472762370028310765535983503uwb, 0wb }, + { 1wb, 2905575297593112682176271367301360286079539486548283169761776505152778266677295498111968142984117916873706310434203454796302860902084876845657uwb, 1wb }, + { -2wb, 1837917528781539509450058185492923533367227689379651913582946492506072644598679412452807791857307066254676899775684162126897712525287848351976uwb, -2wb }, + { -1wb, 2319680246150988952074978951387405463389161562155916967834748191217991286707290863021474691040798411643120909475843121856853198824610064919029uwb, -1wb }, + { 0wb, 995091385198857217634636856758679675740255626224651591597840191331701102225958567078470825514618566121501749811346910563358603344922083332530uwb, 0wb }, + { 1wb, 1935767072657166967374130326547364176008146414333487504728787607207566058414790635912675474199093488415105292641061350133643468776770358124726uwb, 1wb }, + { -1wb, 2323578462079768493720340989036535936419394491913499982954052044299468738290318204298367303716254084159730145465632640799602734853085685711959uwb, -1wb }, + { 0wb, 3134743387837581735890167538039234659353143305621277824366534871456819272038615182289564667918939704822338586693965843434870517084569520632192uwb, 1wb }, + { -2wb, 6069214031750054027161180881734548627596253190931156326304738913835931214674310539698411833298960086513572699541120829870803305974299213978797uwb, -2wb }, + { 1wb, 3475118701665891960802877416318617212624733636229950713368672781946851382777667645205965216548373630879140490108440746796343158443948723601215uwb, 0wb } + }; + struct T495 r495[12]; + static unsigned _BitInt(471) e495[] = { + 4105080878509056910641706565917653774193674439925640176070095882154968553394649854768634849749595921611538850548285598212613898764208491978338uwb, + 4272455060900825442658035799123612713461581925816375155025420465351224978751666594799676382302564435552275519560187020810679530912731598360332uwb, + 1uwb, + 0uwb, + 193936707178394586072944129724741337251602515686017126954836162236154016065720970574348980545042390967692432385246117380757295497134607826944uwb, + 4195942347097672985219503579271211174628933686186176597098363916201242469752441764549469187978885866866246689305508334243202613121455012443954uwb, + 3630533161427400629725096798172686513369340100937554604893343770279562908497410255597578801003280130580745470376769175407443028617078190719666uwb, + 3017199903252810774645258484587879229328468140025245420287647204420639096996138928094942159316263828975261069022192893745856107126530044652322uwb, + 0uwb, + 1uwb, + 4881485695834897810379845656011652834144895329454510745024612553531749469753415260371487385803388022234443037087409795804654957238790836453376uwb, + 2686845912897162876175271668987768568908019867416339000638664253610979307366416705055294103965631534621730767864187291088562219375930292040036uwb + }; + for (int i = 0; i < 12; ++i) + { + r495[i].a = (i & 1) ? 1wb : -2wb; + r495[i].b = (i & 1) ? 4064776758223948217944788059626518627276820498261681186014527291178869451588236484531648571697255170781024649897664873561781218332406621492565uwb : 2032388379111974108972394029813259313638410249130840593007263645589434725794118242265824285848627585390512324948832436780890609166203310746282uwb; + r495[i].c = (i & 1) ? -2wb : 1wb; + } + r495[5].b = test495 (&p495[0], &q495[0], &r495[0], 17); + r495[11].b = test495 (&p495[6], &q495[6], &r495[6], 117); + for (int i = 0; i < 12; ++i) + if ((((i % 6) - 2U <= 1U) ? r495[i].a : r495[i].b) != e495[i]) + __builtin_abort (); + else if ((((i % 6) - 2U > 1U) && r495[i].a != ((i & 1) ? 1wb : -2wb)) + || (((i % 6) - 2U <= 1U) && r495[i].b != ((i & 1) ? 4064776758223948217944788059626518627276820498261681186014527291178869451588236484531648571697255170781024649897664873561781218332406621492565uwb : 2032388379111974108972394029813259313638410249130840593007263645589434725794118242265824285848627585390512324948832436780890609166203310746282uwb)) + || r495[i].c != ((i & 1) ? -2wb : 1wb)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + struct T575 q575[] = { + { 0wb, 96684809381001318096256993724350755663760586347837309196134430400012751231961429238828670682891585656560169817843wb, -2wb }, + { -1wb, -2736587102891263842950610428227571747319762162345429601728737031966764668220310874246707348170368842425752759862563wb, 1wb } + }; + if (test575 (&q575[0], -20620110861486347200204305994458440394552720887062830768778333216240622422772611435913937143052282943196256683484434522946545384240670168537704102522242938522404309878852322wb) + != -20620110861486347200204305994458440394552720887062830768778236531431241421454515178920212792296619182609908846175238388516145371489438207108465273851560046936747749709034479wb) + __builtin_abort (); + if (test575 (&q575[1], 42621052848920155042866550876502212956983884683310087431575669593007353224147609487103322505341199223508939436382180596125666953651582557283994756434373621037386194691552808wb) + != 42621052848920155042866550876502212956983884683310087431572933005904461960304658876675094933593879461346594006780451859093700188983362246409748049086203252194960441931690245wb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/atomic/stdatomic-bitint-1.c.jj 2023-08-08 16:22:34.070094908 +0200 +++ gcc/testsuite/gcc.dg/atomic/stdatomic-bitint-1.c 2023-08-08 16:22:34.070094908 +0200 @@ -0,0 +1,442 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +#include + +extern void abort (void); + +#if __BITINT_MAXWIDTH__ >= 127 +_Atomic _BitInt(127) v; +_BitInt(127) count, res; +const _BitInt(127) init = ~(_BitInt(127)) 0wb; + +void +test_fetch_add () +{ + atomic_init (&v, 13505789527944801758751150119415226784wb); + count = -64910836855286429164283779649638556795wb; + + if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) + != 13505789527944801758751150119415226784wb) + abort (); + + if (atomic_fetch_add_explicit (&v, 2227507280963412295355244564739509222wb, + memory_order_consume) + != -51405047327341627405532629530223330011wb) + abort (); + + if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) + != -49177540046378215110177384965483820789wb) + abort (); + + if (atomic_fetch_add_explicit (&v, 42245667388877614520169143618236120405wb, + memory_order_release) + != 56052806558804587457226139100761728144wb) + abort (); + + if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) + != -71842709512787029754292020996886257179wb) + abort (); + + if (atomic_fetch_add_explicit (&v, 77995075987640754057679086146674392947wb, + memory_order_seq_cst) + != 33387637092395772813111503069359291754wb) + abort (); + + if (atomic_fetch_add (&v, 11810767284628435493328779846084830297wb) + != -58758470380432704860896714499850421027wb) + abort (); + + if (atomic_load (&v) != -46947703095804269367567934653765590730wb) + abort (); +} + +void +test_fetch_sub () +{ + atomic_store_explicit (&v, 30796781768365552851024605388374299173wb, + memory_order_release); + count = 32457177597484647488149720668185011722wb; + + if (atomic_fetch_sub_explicit (&v, count, memory_order_relaxed) + != 30796781768365552851024605388374299173wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, 54614103079293459991417218347656369566wb, + memory_order_consume) + != -1660395829119094637125115279810712549wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, count, memory_order_acquire) + != -56274498908412554628542333627467082115wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, -44514083923735151931107302009741400482wb, + memory_order_release) + != 81409506954572029614995249420232011891wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, count, memory_order_acq_rel) + != -44217592582162050185584752285910693355wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, 30348078982452392099140613411731040827wb, + memory_order_seq_cst) + != -76674770179646697673734472954095705077wb) + abort (); + + if (atomic_fetch_sub (&v, -82224045897086857020012824788652775087wb) + != 63118334298370141958812217350057359824wb) + abort (); + + if (atomic_load_explicit (&v, memory_order_acquire) + != -24798803265012232752862261577173970817wb) + abort (); +} + +void +test_fetch_and () +{ + atomic_store (&v, init); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0) + abort (); + + v = ~v; + if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0) + abort (); + + if (atomic_fetch_and (&v, 0) != 0) + abort (); +} + +void +test_fetch_xor () +{ + v = init; + count = 0; + + if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0) + abort (); + + if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init) + abort (); + + if (atomic_fetch_xor (&v, ~count) != 0) + abort (); +} + +void +test_fetch_or () +{ + v = 0; + count = 17592186044416wb; + + if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, 35184372088832wb, memory_order_consume) + != 17592186044416wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) + != 52776558133248wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, 140737488355328wb, memory_order_release) + != 123145302310912wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) + != 263882790666240wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) + != 545357767376896wb) + abort (); + + count *= 2; + if (atomic_fetch_or (&v, count) != 1108307720798208wb) + abort (); +} + + +/* Test the OP routines with a result which isn't used. */ + +void +test_add () +{ + v = 0; + count = 4722366482869645213696wb; + + atomic_fetch_add (&v, count); + if (v != 4722366482869645213696wb) + abort (); + + atomic_fetch_add_explicit (&v, count, memory_order_consume); + if (v != 9444732965739290427392wb) + abort (); + + atomic_fetch_add (&v, 4722366482869645213696wb); + if (v != 14167099448608935641088wb) + abort (); + + atomic_fetch_add_explicit (&v, 4722366482869645213696wb, + memory_order_release); + if (v != 18889465931478580854784wb) + abort (); + + atomic_fetch_add (&v, 4722366482869645213696wb); + if (v != 23611832414348226068480wb) + abort (); + + atomic_fetch_add_explicit (&v, count, memory_order_seq_cst); + if (v != 28334198897217871282176wb) + abort (); +} + +void +test_sub () +{ + v = res = -3638804536836293398783417724445294828wb; + count = 0; + + atomic_fetch_sub (&v, count + 1); + if (v != --res) + abort (); + + atomic_fetch_sub_explicit (&v, count + 1, memory_order_consume); + if (v != --res) + abort (); + + atomic_fetch_sub (&v, 1); + if (v != --res) + abort (); + + atomic_fetch_sub_explicit (&v, 1, memory_order_release); + if (v != --res) + abort (); + + atomic_fetch_sub (&v, count + 1); + if (v != --res) + abort (); + + atomic_fetch_sub_explicit (&v, count + 1, memory_order_seq_cst); + if (v != --res) + abort (); +} + +void +test_and () +{ + v = init; + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = init; + atomic_fetch_and_explicit (&v, init, memory_order_consume); + if (v != init) + abort (); + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = ~v; + atomic_fetch_and_explicit (&v, init, memory_order_release); + if (v != init) + abort (); + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = ~v; + atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst); + if (v != 0) + abort (); +} + +void +test_xor () +{ + v = init; + count = 0; + + atomic_fetch_xor (&v, count); + if (v != init) + abort (); + + atomic_fetch_xor_explicit (&v, ~count, memory_order_consume); + if (v != 0) + abort (); + + atomic_fetch_xor (&v, 0); + if (v != 0) + abort (); + + atomic_fetch_xor_explicit (&v, ~count, memory_order_release); + if (v != init) + abort (); + + atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel); + if (v != init) + abort (); + + atomic_fetch_xor (&v, ~count); + if (v != 0) + abort (); +} + +void +test_or () +{ + v = 0; + count = 19342813113834066795298816wb; + + atomic_fetch_or (&v, count); + if (v != 19342813113834066795298816wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, count, memory_order_consume); + if (v != 58028439341502200385896448wb) + abort (); + + count *= 2; + atomic_fetch_or (&v, 77371252455336267181195264wb); + if (v != 135399691796838467567091712wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, 154742504910672534362390528wb, + memory_order_release); + if (v != 290142196707511001929482240wb) + abort (); + + count *= 2; + atomic_fetch_or (&v, count); + if (v != 599627206528856070654263296wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, count, memory_order_seq_cst); + if (v != 1218597226171546208103825408wb) + abort (); +} + +void +test_exchange (void) +{ + atomic_store (&v, 15794812138349191682564933935017390008wb); + if (atomic_exchange (&v, -2166613183393424891717146518563613668wb) + != 15794812138349191682564933935017390008wb + || atomic_load (&v) != -2166613183393424891717146518563613668wb) + abort (); + if (atomic_exchange_explicit (&v, 61251098386268815852902382804483910638wb, + memory_order_relaxed) + != -2166613183393424891717146518563613668wb + || (atomic_load_explicit (&v, memory_order_acquire) + != 61251098386268815852902382804483910638wb)) + abort (); + + count = -2166613183393424891717146518563613668wb; + if (atomic_compare_exchange_strong (&v, &count, + -36677332297536901313774263310237646448wb)) + abort (); + if (count != 61251098386268815852902382804483910638wb + || atomic_load (&v) != 61251098386268815852902382804483910638wb) + abort (); + if (!atomic_compare_exchange_strong (&v, &count, + -36677332297536901313774263310237646448wb)) + abort (); + if (count != 61251098386268815852902382804483910638wb + || atomic_load (&v) != -36677332297536901313774263310237646448wb) + abort (); + + count = -2166613183393424891717146518563613668wb; + if (atomic_compare_exchange_strong_explicit (&v, &count, + 73949932022761409003352953944661689416wb, + memory_order_seq_cst, + memory_order_relaxed)) + abort (); + if (count != -36677332297536901313774263310237646448wb + || atomic_load (&v) != -36677332297536901313774263310237646448wb) + abort (); + if (!atomic_compare_exchange_strong_explicit (&v, &count, + 73949932022761409003352953944661689416wb, + memory_order_seq_cst, + memory_order_seq_cst)) + abort (); + if (count != -36677332297536901313774263310237646448wb + || atomic_load (&v) != 73949932022761409003352953944661689416wb) + abort (); + + count = atomic_load (&v); + do + res = count + -82256758205518164043596305502815392646wb; + while (!atomic_compare_exchange_weak (&v, &count, res)); + if (atomic_load (&v) != -8306826182756755040243351558153703230wb) + abort (); + + count = atomic_load_explicit (&v, memory_order_acquire); + do + res = count + 48855144829609538366772317026461909818wb; + while (!atomic_compare_exchange_weak_explicit (&v, &count, res, + memory_order_relaxed, + memory_order_relaxed)); + if (atomic_load (&v) != 40548318646852783326528965468308206588wb) + abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 127 + test_fetch_add (); + test_fetch_sub (); + test_fetch_and (); + test_fetch_xor (); + test_fetch_or (); + test_add (); + test_sub (); + test_and (); + test_xor (); + test_or (); + test_exchange (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/atomic/stdatomic-bitint-2.c.jj 2023-08-08 16:22:34.070094908 +0200 +++ gcc/testsuite/gcc.dg/atomic/stdatomic-bitint-2.c 2023-08-08 16:22:34.070094908 +0200 @@ -0,0 +1,450 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +#include + +extern void abort (void); + +#if __BITINT_MAXWIDTH__ >= 575 +_Atomic _BitInt(575) v; +_BitInt(575) count, res; +const _BitInt(575) init = ~(_BitInt(575)) 0wb; + +void +test_fetch_add () +{ + atomic_init (&v, 59465222573183779324781274162178653782927579944977967117312772499849358939735575735090252965265846823956223131844773977101864574011188590603103408821590130462520809924774161wb); + count = 21849324526703540909725517290562575722142104889154621021004438836543599493803029317660194646869455042293514095831327249339063542203879269024249546998746919066599380031180974wb; + + if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) + != 59465222573183779324781274162178653782927579944977967117312772499849358939735575735090252965265846823956223131844773977101864574011188590603103408821590130462520809924774161wb) + abort (); + + if (atomic_fetch_add_explicit (&v, -48324598397571087754171506195219221853271763472221035086980364394554212400270766919963305485900701475788840363160834710492683133292253640988518950921616217692973141455340373wb, + memory_order_consume) + != -42350653636664946795744469057082365512495989716473331818714316710055654119727328532407752918486220628549098485331968443234754400938307745356420121730609534429183196118394433wb) + abort (); + + if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) + != 32989948702316232480335285257522007651797921361911553051336846941838746033267838132787142126234600390460896864515266515948244982922814218638834004898720831836147048500614762wb) + abort (); + + if (atomic_fetch_add_explicit (&v, 6958312589905983216078981134518695082538588883298046610645489916662738759809700053844918067866491080683973037493524864531300139437943661326918145212620326291059845453630984wb, + memory_order_release) + != 54839273229019773390060802548084583373940026251066174072341285778382345527070867450447336773104055432754410960346593765287308525126693487663083551897467750902746428531795736wb) + abort (); + + if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) + != 61797585818925756606139783682603278456478615134364220682986775695045084286880567504292254840970546513438383997840118629818608664564637148990001697110088077193806273985426720wb) + abort (); + + if (atomic_fetch_add_explicit (&v, -40070085597220253007443375012839311464160438432662764715171645999337062215395237625623334979615599652975898123428005079853660189572782012739700306191422569739682093304494995wb, + memory_order_seq_cst) + != -40018290390922969514385959536657740838944954527087078253040313514859928772582336763205751042781520939066937619336623790518010310384859186969521833442111587697897732057741874wb) + abort (); + + if (atomic_fetch_add (&v, 7196090098608011755205055682070541953902689411792805630101863619558545582022760829169235622333653743217332966939875542415224317593660770300818700993340012969018217868600175wb) + != 43576824748409044508421925960326542714460281590856076988819568532251621565288359196329114508224401902755999970243440799304012017195734405274550937917412426520723560712112699wb) + abort (); + + if (atomic_load (&v) != 50772914847017056263626981642397084668362971002648882618921432151810167147311120025498350130558055645973332937183316341719236334789395175575369638910752439489741778580712874wb) + abort (); +} + +void +test_fetch_sub () +{ + atomic_store_explicit (&v, -24875491091433158113922205635657739252057730543056417031972993454853665637813018617125143194799847437263037065304695383952916979113678037118532311779822859742705294727822376wb, + memory_order_release); + count = 6813702694653136917886567607003795360731391695538381923575500076220746287948057449348609672603971831069550813465757196210073636056135824219022209113495061317682354090030599wb; + + if (atomic_fetch_sub_explicit (&v, count, memory_order_relaxed) + != -24875491091433158113922205635657739252057730543056417031972993454853665637813018617125143194799847437263037065304695383952916979113678037118532311779822859742705294727822376wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, 8502925336737158389204618905966437550402192530184998378452912098895816391400915282714213521081597588768568861040471642522181200007537708168290327879425612502090295717806034wb, + memory_order_consume) + != -31689193786086295031808773242661534612789122238594798955548493531074411925761076066473752867403819268332587878770452580162990615169813861337554520893317921060387648817852975wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, count, memory_order_acquire) + != -40192119122823453421013392148627972163191314768779797334001405629970228317161991349187966388485416857101156739810924222685171815177351569505844848772743533562477944535659009wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, -14654459030451169455889477114198307761108411115104251375487725308584250511764953921137486025925617622862411621191578047606524662379041353882420330350079004108508600686109553wb, + memory_order_release) + != -47005821817476590338899959755631767523922706464318179257576905706190974605110048798536576061089388688170707553276681418895245451233487393724867057886238594880160298625689608wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, count, memory_order_acq_rel) + != -32351362787025420883010482641433459762814295349213927882089180397606724093345094877399090035163771065308295932085103371288720788854446039842446727536159590771651697939580055wb) + abort (); + + if (atomic_fetch_sub_explicit (&v, 22886836433700729148520267039236396292049781709943309196356241086882444816631218673962641435859436811686812355905147988710440709035301495069683757516099446883747069843672565wb, + memory_order_seq_cst) + != -39165065481678557800897050248437255123545687044752309805664680473827470381293152326747699707767742896377846745550860567498794424910581864061468936649654652089334052029610654wb) + abort (); + + if (atomic_fetch_sub (&v, 49406467535448986167225179068150076098092817730200780462287871488076089290458383699602612866098591282427581289588523598202726797161439183859560135056424525356253246480887928wb) + != 61613298821172980080833943222149943601970205795910300955010606485738697355341562584447859386994342786734176611552061113466447383207492245852620383385192484985222264201066349wb) + abort (); + + if (atomic_load_explicit (&v, memory_order_acquire) + != 12206831285723993913608764153999867503877388065709520492722734997662608064883178884845246520895751504306595321963537515263720586046053061993060248328767959628969017720178421wb) + abort (); +} + +void +test_fetch_and () +{ + atomic_store (&v, init); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0) + abort (); + + v = ~v; + if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init) + abort (); + + if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0) + abort (); + + if (atomic_fetch_and (&v, 0) != 0) + abort (); +} + +void +test_fetch_xor () +{ + v = init; + count = 0; + + if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0) + abort (); + + if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init) + abort (); + + if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init) + abort (); + + if (atomic_fetch_xor (&v, ~count) != 0) + abort (); +} + +void +test_fetch_or () +{ + v = 0wb; + count = 28269553036454149273332760011886696253239742350009903329945699220681916416wb; + + if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, 56539106072908298546665520023773392506479484700019806659891398441363832832wb, + memory_order_consume) + != 28269553036454149273332760011886696253239742350009903329945699220681916416wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) + != 84808659109362447819998280035660088759719227050029709989837097662045749248wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, 226156424291633194186662080095093570025917938800079226639565593765455331328wb, + memory_order_release) + != 197886871255179044913329320083206873772678196450069323309619894544773414912wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) + != 424043295546812239099991400178300443798596135250148549949185488310228746240wb) + abort (); + + count *= 2; + if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) + != 876356144130078627473315560368487583850432012850307003228316675841139408896wb) + abort (); + + count *= 2; + if (atomic_fetch_or (&v, count) != 1780981841296611404219963880748861863954103768050623909786579050902960734208wb) + abort (); +} + + +/* Test the OP routines with a result which isn't used. */ + +void +test_add () +{ + v = 0; + count = 1486842905609751694333995980623369134886360644481888406879896752089037065255179570086557965294767349553406889549100250674362935254187127254353474822610854717612397677wb; + + atomic_fetch_add (&v, count); + if (v != 1486842905609751694333995980623369134886360644481888406879896752089037065255179570086557965294767349553406889549100250674362935254187127254353474822610854717612397677wb) + abort (); + + atomic_fetch_add_explicit (&v, count, memory_order_consume); + if (v != 2973685811219503388667991961246738269772721288963776813759793504178074130510359140173115930589534699106813779098200501348725870508374254508706949645221709435224795354wb) + abort (); + + atomic_fetch_add (&v, 1486842905609751694333995980623369134886360644481888406879896752089037065255179570086557965294767349553406889549100250674362935254187127254353474822610854717612397677wb); + if (v != 4460528716829255083001987941870107404659081933445665220639690256267111195765538710259673895884302048660220668647300752023088805762561381763060424467832564152837193031wb) + abort (); + + atomic_fetch_add_explicit (&v, 1486842905609751694333995980623369134886360644481888406879896752089037065255179570086557965294767349553406889549100250674362935254187127254353474822610854717612397677wb, + memory_order_release); + if (v != 5947371622439006777335983922493476539545442577927553627519587008356148261020718280346231861179069398213627558196401002697451741016748509017413899290443418870449590708wb) + abort (); + + atomic_fetch_add (&v, 1486842905609751694333995980623369134886360644481888406879896752089037065255179570086557965294767349553406889549100250674362935254187127254353474822610854717612397677wb); + if (v != 7434214528048758471669979903116845674431803222409442034399483760445185326275897850432789826473836747767034447745501253371814676270935636271767374113054273588061988385wb) + abort (); + + atomic_fetch_add_explicit (&v, count, memory_order_seq_cst); + if (v != 8921057433658510166003975883740214809318163866891330441279380512534222391531077420519347791768604097320441337294601504046177611525122763526120848935665128305674386062wb) + abort (); +} + +void +test_sub () +{ + v = res = 55339930658115792138308584702507715233391812567721958037499562620485942364609138719919541704955047331226014242859673113345829202990143617633801993282898070230404539826267403wb; + count = 0; + + atomic_fetch_sub (&v, count + 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); + + atomic_fetch_sub_explicit (&v, count + 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb, memory_order_consume); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); + + atomic_fetch_sub (&v, 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); + + atomic_fetch_sub_explicit (&v, 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb, memory_order_release); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); + + atomic_fetch_sub (&v, count + 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); + + atomic_fetch_sub_explicit (&v, count + 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb, memory_order_seq_cst); + res -= 2266681016524228072657464685355732111725088152428495977635446886262656759828446929716740827028716649170693025791717921736186782036315322643449879013364541057wb; + if (v != res) + abort (); +} + +void +test_and () +{ + v = init; + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = init; + atomic_fetch_and_explicit (&v, init, memory_order_consume); + if (v != init) + abort (); + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = ~v; + atomic_fetch_and_explicit (&v, init, memory_order_release); + if (v != init) + abort (); + + atomic_fetch_and (&v, 0); + if (v != 0) + abort (); + + v = ~v; + atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst); + if (v != 0) + abort (); +} + +void +test_xor () +{ + v = init; + count = 0; + + atomic_fetch_xor (&v, count); + if (v != init) + abort (); + + atomic_fetch_xor_explicit (&v, ~count, memory_order_consume); + if (v != 0) + abort (); + + atomic_fetch_xor (&v, 0); + if (v != 0) + abort (); + + atomic_fetch_xor_explicit (&v, ~count, memory_order_release); + if (v != init) + abort (); + + atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel); + if (v != init) + abort (); + + atomic_fetch_xor (&v, ~count); + if (v != 0) + abort (); +} + +void +test_or () +{ + v = 0; + count = 19342813113834066795298816wb; + + atomic_fetch_or (&v, count); + if (v != 19342813113834066795298816wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, count, memory_order_consume); + if (v != 58028439341502200385896448wb) + abort (); + + count *= 2; + atomic_fetch_or (&v, 77371252455336267181195264wb); + if (v != 135399691796838467567091712wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, 154742504910672534362390528wb, + memory_order_release); + if (v != 290142196707511001929482240wb) + abort (); + + count *= 2; + atomic_fetch_or (&v, count); + if (v != 599627206528856070654263296wb) + abort (); + + count *= 2; + atomic_fetch_or_explicit (&v, count, memory_order_seq_cst); + if (v != 1218597226171546208103825408wb) + abort (); +} + +void +test_exchange (void) +{ + atomic_store (&v, -285679222948993342888321238830899996788334328454283006589115162661816862491992700267590986826514460282130796141107636816730207482542791159837024986802592659048696136633096wb); + if (atomic_exchange (&v, 5310030317361876753340683501073244375280341322936688061997080395958520351093955920782059690068348979597317732862920837580508090330213951646930178946470395395144632931547601wb) + != -285679222948993342888321238830899996788334328454283006589115162661816862491992700267590986826514460282130796141107636816730207482542791159837024986802592659048696136633096wb + || atomic_load (&v) != 5310030317361876753340683501073244375280341322936688061997080395958520351093955920782059690068348979597317732862920837580508090330213951646930178946470395395144632931547601wb) + abort (); + if (atomic_exchange_explicit (&v, -4427613371507571222951705350055906255006016685171218855857415580222001757304647519678682295710994407542058879878792272713121656498918585491540313864044915269100507689612649wb, + memory_order_relaxed) + != 5310030317361876753340683501073244375280341322936688061997080395958520351093955920782059690068348979597317732862920837580508090330213951646930178946470395395144632931547601wb + || (atomic_load_explicit (&v, memory_order_acquire) + != -4427613371507571222951705350055906255006016685171218855857415580222001757304647519678682295710994407542058879878792272713121656498918585491540313864044915269100507689612649wb)) + abort (); + + count = 5310030317361876753340683501073244375280341322936688061997080395958520351093955920782059690068348979597317732862920837580508090330213951646930178946470395395144632931547601wb; + if (atomic_compare_exchange_strong (&v, &count, + 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb)) + abort (); + if (count != -4427613371507571222951705350055906255006016685171218855857415580222001757304647519678682295710994407542058879878792272713121656498918585491540313864044915269100507689612649wb + || atomic_load (&v) != -4427613371507571222951705350055906255006016685171218855857415580222001757304647519678682295710994407542058879878792272713121656498918585491540313864044915269100507689612649wb) + abort (); + if (!atomic_compare_exchange_strong (&v, &count, + 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb)) + abort (); + if (count != -4427613371507571222951705350055906255006016685171218855857415580222001757304647519678682295710994407542058879878792272713121656498918585491540313864044915269100507689612649wb + || atomic_load (&v) != 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb) + abort (); + + count = 5310030317361876753340683501073244375280341322936688061997080395958520351093955920782059690068348979597317732862920837580508090330213951646930178946470395395144632931547601wb; + if (atomic_compare_exchange_strong_explicit (&v, &count, + -20263258027145541347005514871938569231358927704236809883668741851321168433670480594273940614283839738125120292424689828120954658857299483460682957837178666219043928324493674wb, + memory_order_seq_cst, + memory_order_relaxed)) + abort (); + if (count != 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb + || atomic_load (&v) != 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb) + abort (); + if (!atomic_compare_exchange_strong_explicit (&v, &count, + -20263258027145541347005514871938569231358927704236809883668741851321168433670480594273940614283839738125120292424689828120954658857299483460682957837178666219043928324493674wb, + memory_order_seq_cst, + memory_order_seq_cst)) + abort (); + if (count != 8894166061872682036448354332319628975793195843703235778626260413018342611721096976767565811189387129127069300488196032026080940074010266394902215699511191435840967345778707wb + || atomic_load (&v) != -20263258027145541347005514871938569231358927704236809883668741851321168433670480594273940614283839738125120292424689828120954658857299483460682957837178666219043928324493674wb) + abort (); + + count = atomic_load (&v); + do + res = count + 3438682542819842029328613486899299339199839206022263296398180581126218550036955367421469273900216774711772362599086182416923053671263751262393559525082445581168420546542404wb; + while (!atomic_compare_exchange_weak (&v, &count, res)); + if (atomic_load (&v) != -16824575484325699317676901385039269892159088498214546587270561270194949883633525226852471340383622963413347929825603645704031605186035732198289398312096220637875507777951270wb) + abort (); + + count = atomic_load_explicit (&v, memory_order_acquire); + do + res = count + 55351299008567209999272942257960316150846002020561006740901388462123844029522178721330031429855007927083338249659817829635668878607777961512926342979905691183772323299904096wb; + while (!atomic_compare_exchange_weak_explicit (&v, &count, res, + memory_order_relaxed, + memory_order_relaxed)); + if (atomic_load (&v) != 38526723524241510681596040872921046258686913522346460153630827191928894145888653494477560089471384963669990319834214183931637273421742229314636944667809470545896815521952826wb) + abort (); +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 575 + test_fetch_add (); + test_fetch_sub (); + test_fetch_and (); + test_fetch_xor (); + test_fetch_or (); + test_add (); + test_sub (); + test_and (); + test_xor (); + test_or (); + test_exchange (); +#endif + return 0; +} --- gcc/testsuite/gcc.dg/dfp/bitint-1.c.jj 2023-08-08 16:21:45.952768387 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-1.c 2023-08-08 16:21:45.952768387 +0200 @@ -0,0 +1,98 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +tests192 (_Decimal64 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testu192 (_Decimal64 d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +tests575 (_Decimal64 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testu575 (_Decimal64 d) +{ + return d; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + if (tests192 (0.DD) != 0wb + || tests192 (0.9999999999999999DD) != 0wb + || tests192 (7.999999999999999DD) != 7wb + || tests192 (-42.5DD) != -42wb + || tests192 (-34242319854.45429e+27DD) != -34242319854454290000000000000000000000wb + || tests192 (-213855087769445.9e+43DD) != -2138550877694459000000000000000000000000000000000000000000wb + || tests192 (313855086769334.0e+43DD) != 3138550867693340000000000000000000000000000000000000000000wb + || tests192 (-313855086769334.0e+43DD) != -3138550867693340000000000000000000000000000000000000000000wb) + __builtin_abort (); + if (tests192 (313855086769334.1e+43DD) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (9999999999999999e+369DD) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (-313855086769334.1e+43DD) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb + || tests192 (-9999999999999999e+369DD) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb) + __builtin_abort (); + if (testu192 (0.DD) != 0uwb + || testu192 (0.9999999999999999DD) != 0uwb + || testu192 (-0.9999999999999999DD) != 0uwb + || testu192 (-0.5DD) != 0uwb + || testu192 (42.99999999999999DD) != 42uwb + || testu192 (42.e+21DD) != 42000000000000000000000uwb + || testu192 (34272319854.45429e+27DD) != 34272319854454290000000000000000000000uwb + || testu192 (627710173538668.0e+43DD) != 6277101735386680000000000000000000000000000000000000000000uwb) + __builtin_abort (); + if (testu192 (-1.DD) != 0uwb + || testu192 (-42.5e+15DD) != 0uwb + || testu192 (-9999999999999999e+369DD) != 0uwb + || testu192 (627710173538668.1e+43DD) != 6277101735386680763835789423207666416102355444464034512895uwb + || testu192 (9999999999999999e+369DD) != 6277101735386680763835789423207666416102355444464034512895uwb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (tests575 (0.DD) != 0wb + || tests575 (0.999999DD) != 0wb + || tests575 (12.9999999999999DD) != 12wb + || tests575 (-89.5DD) != -89wb + || tests575 (-34242319854.45429e+37DD) != -342423198544542900000000000000000000000000000000wb + || tests575 (-518326003682761.2e+158DD) != -51832600368276120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (6183260036827613.0e+157DD) != 61832600368276130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (-6183260036827613.0e+157DD) != -61832600368276130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb) + __builtin_abort (); + if (tests575 (6183260036827614.0e+157DD) != 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb + || tests575 (9999999999999999e+369DD) != 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb + || tests575 (-6183260036827614.0e+157DD) != -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb + || tests575 (-9999999999999999e+369DD) != -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb) + __builtin_abort (); + if (testu575 (0.DD) != 0uwb + || testu575 (0.5555555555555555DD) != 0uwb + || testu575 (-0.7777777777777777DD) != 0uwb + || testu575 (-0.99DD) != 0uwb + || testu575 (42.99999999999999DD) != 42uwb + || testu575 (42.e+21DD) != 42000000000000000000000uwb + || testu575 (94272319854.45429e+27DD) != 94272319854454290000000000000000000000uwb + || testu575 (1236652007365522.0e+158DD) != 123665200736552200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb) + __builtin_abort (); + if (testu575 (-1.DD) != 0uwb + || testu575 (-42.5e+15DD) != 0uwb + || testu575 (-9999999999999999e+369DD) != 0uwb + || testu575 (1236652007365523.0e+158DD) != 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb + || testu575 (9999999999999999e+369DD) != 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/dfp/bitint-2.c.jj 2023-08-08 16:21:45.952768387 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-2.c 2023-08-08 16:21:45.952768387 +0200 @@ -0,0 +1,91 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +tests192 (_Decimal32 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testu192 (_Decimal32 d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +tests575 (_Decimal32 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testu575 (_Decimal32 d) +{ + return d; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + if (tests192 (0.DF) != 0wb + || tests192 (0.9999999DF) != 0wb + || tests192 (7.999999DF) != 7wb + || tests192 (-42.5DF) != -42wb + || tests192 (-3424.231e+27DF) != -3424231000000000000000000000000wb + || tests192 (-213855.9e+43DF) != -2138559000000000000000000000000000000000000000000wb + || tests192 (313855.0e+52DF) != 3138550000000000000000000000000000000000000000000000000000wb + || tests192 (-3138550.e+51DF) != -3138550000000000000000000000000000000000000000000000000000wb) + __builtin_abort (); + if (tests192 (313855.1e+52DF) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (9999999e+90DF) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (-3138551e+51DF) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb + || tests192 (-9999999e+90DF) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb) + __builtin_abort (); + if (testu192 (0.DF) != 0uwb + || testu192 (0.9999999DF) != 0uwb + || testu192 (-0.9999999DF) != 0uwb + || testu192 (-0.5DF) != 0uwb + || testu192 (42.99999DF) != 42uwb + || testu192 (42.e+21DF) != 42000000000000000000000uwb + || testu192 (3427.231e+29DF) != 342723100000000000000000000000000uwb + || testu192 (6277101.0e+51DF) != 6277101000000000000000000000000000000000000000000000000000uwb) + __builtin_abort (); + if (testu192 (-1.DF) != 0uwb + || testu192 (-42.5e+15DF) != 0uwb + || testu192 (-9999999e+90DF) != 0uwb + || testu192 (6277102.0e+51DF) != 6277101735386680763835789423207666416102355444464034512895uwb + || testu192 (9999999e+90DF) != 6277101735386680763835789423207666416102355444464034512895uwb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (tests575 (0.DF) != 0wb + || tests575 (0.999999DF) != 0wb + || tests575 (12.9999DF) != 12wb + || tests575 (-89.5DF) != -89wb + || tests575 (-34242.31e+37DF) != -342423100000000000000000000000000000000000wb + || tests575 (-518326.2e+88DF) != -5183262000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (9999999e+90DF) != 9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (-9999999e+90DF) != -9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb) + __builtin_abort (); + if (testu575 (0.DF) != 0uwb + || testu575 (0.5555555DF) != 0uwb + || testu575 (-0.7777777DF) != 0uwb + || testu575 (-0.99DF) != 0uwb + || testu575 (42.99999DF) != 42uwb + || testu575 (42.e+21DF) != 42000000000000000000000uwb + || testu575 (9427.231e+27DF) != 9427231000000000000000000000000uwb + || testu575 (9999999e+90DF) != 9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb) + __builtin_abort (); + if (testu575 (-1.DF) != 0uwb + || testu575 (-42.5e+15DF) != 0uwb + || testu575 (-9999999e+90DF) != 0uwb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/dfp/bitint-3.c.jj 2023-08-08 16:21:45.953768373 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-3.c 2023-08-08 16:21:45.953768373 +0200 @@ -0,0 +1,98 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _BitInt(192) +tests192 (_Decimal128 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(192) +testu192 (_Decimal128 d) +{ + return d; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _BitInt(575) +tests575 (_Decimal128 d) +{ + return d; +} + +__attribute__((noipa)) unsigned _BitInt(575) +testu575 (_Decimal128 d) +{ + return d; +} +#endif + +int +main () +{ +#if __BITINT_MAXWIDTH__ >= 192 + if (tests192 (0.DL) != 0wb + || tests192 (0.9999999999999999999999999999999999DL) != 0wb + || tests192 (7.999999999999999999999999999999999DL) != 7wb + || tests192 (-42.5DL) != -42wb + || tests192 (-34242319854.45429439857871298745432e+27DL) != -34242319854454294398578712987454320000wb + || tests192 (-213855087769445.9e+43DL) != -2138550877694459000000000000000000000000000000000000000000wb + || tests192 (3138550867693340381917894711603833.0e+24DL) != 3138550867693340381917894711603833000000000000000000000000wb + || tests192 (-3138550867693340381917894711603833.0e+24DL) != -3138550867693340381917894711603833000000000000000000000000wb) + __builtin_abort (); + if (tests192 (3138550867693340381917894711603834.0e+24DL) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (9999999999999999999999999999999999e+6111DL) != 3138550867693340381917894711603833208051177722232017256447wb + || tests192 (-3138550867693340381917894711603834.0e+24DL) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb + || tests192 (-9999999999999999999999999999999999e+6111DL) != -3138550867693340381917894711603833208051177722232017256447wb - 1wb) + __builtin_abort (); + if (testu192 (0.DL) != 0uwb + || testu192 (0.9999999999999999999999999999999999DL) != 0uwb + || testu192 (-0.9999999999999999999999999999999999DL) != 0uwb + || testu192 (-0.5DL) != 0uwb + || testu192 (42.99999999999999999999999999999999DL) != 42uwb + || testu192 (42.e+21DL) != 42000000000000000000000uwb + || testu192 (34242319854.45429439857871298745432e+21DL) != 34242319854454294398578712987454uwb + || testu192 (6277101735386680763835789423207666.0e+24DL) != 6277101735386680763835789423207666000000000000000000000000uwb) + __builtin_abort (); + if (testu192 (-1.DL) != 0uwb + || testu192 (-42.5e+15DL) != 0uwb + || testu192 (-9999999999999999999999999999999999e+6111DL) != 0uwb + || testu192 (6277101735386680763835789423207667.0e+24DL) != 6277101735386680763835789423207666416102355444464034512895uwb + || testu192 (9999999999999999999999999999999999e+6111DL) != 6277101735386680763835789423207666416102355444464034512895uwb) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (tests575 (0.DL) != 0wb + || tests575 (0.999999999999999999999DL) != 0wb + || tests575 (12.99999999999999999999999999999DL) != 12wb + || tests575 (-89.5DL) != -89wb + || tests575 (-34242319854.45429986754986758972345e+37DL) != -342423198544542998675498675897234500000000000000wb + || tests575 (-518326003682761.2e+158DL) != -51832600368276120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (6183260036827613351512563025491179.0e+139DL) != 61832600368276133515125630254911790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb + || tests575 (-6183260036827613351512563025491179.0e+139DL) != -61832600368276133515125630254911790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb) + __builtin_abort (); + if (tests575 (618326003682761335151256302549118.0e+140DL) != 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb + || tests575 (9999999999999999999999999999999999e+6111DL) != 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb + || tests575 (-6183260036827613351512563025491180.0e+139DL) != -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb + || tests575 (-9999999999999999999999999999999999e+6111DL) != -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb) + __builtin_abort (); + if (testu575 (0.DL) != 0uwb + || testu575 (0.5555555555555555555555555555555555DL) != 0uwb + || testu575 (-0.7777777777777777777777777777777777DL) != 0uwb + || testu575 (-0.99DL) != 0uwb + || testu575 (42.99999999999999999999999999999999DL) != 42uwb + || testu575 (42.e+21DL) != 42000000000000000000000uwb + || testu575 (94272319854.45429e+27DL) != 94272319854454290000000000000000000000uwb + || testu575 (1236652007365522670302512605098235.0e+140DL) != 123665200736552267030251260509823500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb) + __builtin_abort (); + if (testu575 (-1.DL) != 0uwb + || testu575 (-42.5e+15DL) != 0uwb + || testu575 (-9999999999999999999999999999999999e+6111DL) != 0uwb + || testu575 (1236652007365522670302512605098236.0e+140DL) != 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb + || testu575 (9999999999999999999999999999999999e+6111DL) != 123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/dfp/bitint-4.c.jj 2023-08-08 16:22:09.404440148 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-4.c 2023-08-08 16:22:09.404440148 +0200 @@ -0,0 +1,156 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _Decimal64 +tests192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal64 +testu192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _Decimal64 +tests575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal64 +testu575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif + +int +main () +{ + _Decimal64 a, b; +#define CHECK(x, y) (a = (x), b = (y), a != (y) || __builtin_memcmp (&a, &b, sizeof (a))) +#if __BITINT_MAXWIDTH__ >= 192 + if (CHECK (tests192 (0wb), 0.DD) + || CHECK (tests192 (7wb), 7.DD) + || CHECK (tests192 (-42wb), -42.DD) + || CHECK (tests192 (-777777777wb), -777777777.DD) + || CHECK (tests192 (9999999999999000wb), 9999999999999000.DD) + || CHECK (tests192 (-9999999999999999wb), -9999999999999999.DD) + || CHECK (tests192 (-99999999999999994wb), -9999999999999999.e+1DD) + || CHECK (tests192 (99999999999999995wb), 1000000000000000.e+2DD) + || CHECK (tests192 (999999999999999900wb), 9999999999999999.e+2DD) + || CHECK (tests192 (999999999999999949wb), 9999999999999999.e+2DD) + || CHECK (tests192 (-9999999999999999000wb), -9999999999999999.e+3DD) + || CHECK (tests192 (9999999999999999499wb), 9999999999999999.e+3DD) + || CHECK (tests192 (999999999999999900000wb), 9999999999999999.e+5DD) + || CHECK (tests192 (999999999999999949999wb), 9999999999999999.e+5DD) + || CHECK (tests192 (-9999999999999999000000wb), -9999999999999999.e+6DD) + || CHECK (tests192 (-9999999999999999499999wb), -9999999999999999.e+6DD) + || CHECK (tests192 (123456789012345600000000wb), 1234567890123456.e+8DD) + || CHECK (tests192 (34242319854454290000000000000000000000wb), 3424231985445429e+22DD) + || CHECK (tests192 (999999999999999900000000000000000000000000000000wb), 9999999999999999.e+32DD) + || CHECK (tests192 (999999999999999949999999999999999999999999999999wb), 9999999999999999.e+32DD) + || CHECK (tests192 (-999999999999999900000000000000000000000000000000000000000wb), -9999999999999999.e+41DD) + || CHECK (tests192 (-2138550877694459000000000000000000000000000000000000000000wb), -2138550877694459e+42DD) + || CHECK (tests192 (-2138550877694459500000000000000000000000000000000000000000wb), -2138550877694460e+42DD) + || CHECK (tests192 (-2138550877694459499999999999999999999999999999999999999999wb), -2138550877694459e+42DD) + || CHECK (tests192 (-2138550877694459999999999999999999999999999999999999999999wb), -2138550877694460e+42DD) + || CHECK (tests192 (-2138550877694458000000000000000000000000000000000000000000wb), -2138550877694458e+42DD) + || CHECK (tests192 (-2138550877694458500000000000000000000000000000000000000000wb), -2138550877694458e+42DD) + || CHECK (tests192 (-2138550877694458500000000000000000000000000000000000000001wb), -2138550877694459e+42DD) + || CHECK (tests192 (3138550867693340000000000000000000000000000000000000000000wb), 3138550867693340e+42DD) + || CHECK (tests192 (3138550867693340381917894711603833208051177722232017256447wb), 3138550867693340e+42DD) + || CHECK (tests192 (-3138550867693340000000000000000000000000000000000000000000wb), -3138550867693340e+42DD) + || CHECK (tests192 (-3138550867693340381917894711603833208051177722232017256447wb - 1wb), -3138550867693340e+42DD)) + __builtin_abort (); + if (CHECK (testu192 (0uwb), 0.DD) + || CHECK (testu192 (7uwb), 7.DD) + || CHECK (testu192 (42uwb), 42.DD) + || CHECK (testu192 (777777777uwb), 777777777.DD) + || CHECK (testu192 (9999999999999000uwb), 9999999999999000.DD) + || CHECK (testu192 (999999999999999900uwb), 9999999999999999.e+2DD) + || CHECK (testu192 (9999999999999999000uwb), 9999999999999999.e+3DD) + || CHECK (testu192 (99999999999999994999uwb), 9999999999999999.e+4DD) + || CHECK (testu192 (999999999999999900000uwb), 9999999999999999.e+5DD) + || CHECK (testu192 (9999999999999999000000uwb), 9999999999999999.e+6DD) + || CHECK (testu192 (123456789012345600000000uwb), 1234567890123456.e+8DD) + || CHECK (testu192 (34242319854454290000000000000000000000uwb), 3424231985445429e+22DD) + || CHECK (testu192 (9999999999999999000000000000000000000000000000000uwb), 9999999999999999.e+33DD) + || CHECK (testu192 (618935436546517900000000000000000000000000000000000000uwb), 6189354365465179e+38DD) + || CHECK (testu192 (618935436546517950000000000000000000000000000000000000uwb), 6189354365465180e+38DD) + || CHECK (testu192 (618935436546517949999999999999999999999999999999999999uwb), 6189354365465179e+38DD) + || CHECK (testu192 (618935436546517999999999999999999999999999999999999999uwb), 6189354365465180e+38DD) + || CHECK (testu192 (618935436546517800000000000000000000000000000000000000uwb), 6189354365465178e+38DD) + || CHECK (testu192 (618935436546517850000000000000000000000000000000000000uwb), 6189354365465178e+38DD) + || CHECK (testu192 (618935436546517850000000000000000000000000000000000001uwb), 6189354365465179e+38DD) + || CHECK (testu192 (99999999999999990000000000000000000000000000000000000000uwb), 9999999999999999.e+40DD) + || CHECK (testu192 (6277101735386680000000000000000000000000000000000000000000uwb), 6277101735386680e+42DD) + || CHECK (testu192 (6277101735386680499999999999999999999999999999999999999999uwb), 6277101735386680e+42DD) + || CHECK (testu192 (6277101735386680500000000000000000000000000000000000000000uwb), 6277101735386680e+42DD) + || CHECK (testu192 (6277101735386680500000000000000000000000000000000000000001uwb), 6277101735386681e+42DD) + || CHECK (testu192 (6277101735386680500000000000000000000010000000000000000000uwb), 6277101735386681e+42DD) + || CHECK (testu192 (6277101735386680763835789423207666416102355444464034512895uwb), 6277101735386681e+42DD)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (CHECK (tests575 (0wb), 0.DD) + || CHECK (tests575 (7wb), 7.DD) + || CHECK (tests575 (-42wb), -42.DD) + || CHECK (tests575 (-444444444wb), -444444444.DD) + || CHECK (tests575 (9999999999999000wb), 9999999999999000.DD) + || CHECK (tests575 (-9999999999999999wb), -9999999999999999.DD) + || CHECK (tests575 (999999999999999900wb), 9999999999999999.e+2DD) + || CHECK (tests575 (-9999999999999999000wb), -9999999999999999.e+3DD) + || CHECK (tests575 (999999999999999900000wb), 9999999999999999.e+5DD) + || CHECK (tests575 (-99999999999999990000000wb), -9999999999999999.e+7DD) + || CHECK (tests575 (1234567890123456000000000wb), 1234567890123456.e+9DD) + || CHECK (tests575 (3424231985445429000000000000000000000000wb), 3424231985445429e+24DD) + || CHECK (tests575 (99999999999999990000000000000000000000000000000000000000wb), 9999999999999999.e+40DD) + || CHECK (tests575 (-9999999999999999000000000000000000000000000000000000000000000000000000000000000wb), -9999999999999999.e+63DD) + || CHECK (tests575 (-213855087769445900000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694459e+86DD) + || CHECK (tests575 (-213855087769445950000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694460e+86DD) + || CHECK (tests575 (-213855087769445949999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138550877694459e+86DD) + || CHECK (tests575 (-213855087769445999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138550877694460e+86DD) + || CHECK (tests575 (-213855087769445800000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694458e+86DD) + || CHECK (tests575 (-213855087769445850000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694458e+86DD) + || CHECK (tests575 (-213855087769445850000000000000000000000000000000000000000000000000000000000000000000000000000000000001wb), -2138550877694459e+86DD) + || CHECK (tests575 (61832600368276130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), 6183260036827613e+157DD) + || CHECK (tests575 (61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb), 6183260036827613e+157DD) + || CHECK (tests575 (-61832600368276130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -6183260036827613e+157DD) + || CHECK (tests575 (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb), -6183260036827613e+157DD)) + __builtin_abort (); + if (CHECK (testu575 (0uwb), 0.DD) + || CHECK (testu575 (17uwb), 17.DD) + || CHECK (testu575 (420uwb), 420.DD) + || CHECK (testu575 (888888888uwb), 888888888.DD) + || CHECK (testu575 (9999999999999000uwb), 9999999999999000.DD) + || CHECK (testu575 (99999999999999990000000uwb), 9999999999999999.e+7DD) + || CHECK (testu575 (9999999999999999000000000uwb), 9999999999999999.e+9DD) + || CHECK (testu575 (99999999999999990000000000000uwb), 9999999999999999.e+13DD) + || CHECK (testu575 (9999999999999999000000000000000uwb), 9999999999999999.e+15DD) + || CHECK (testu575 (1234567890123456000000000000000000uwb), 1234567890123456.e+18DD) + || CHECK (testu575 (34242319854454290000000000000000000000uwb), 3424231985445429e+22DD) + || CHECK (testu575 (9999999999999999000000000000000000000000000000000uwb), 9999999999999999.e+33DD) + || CHECK (testu575 (618935436546517900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465179e+104DD) + || CHECK (testu575 (618935436546517950000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465180e+104DD) + || CHECK (testu575 (618935436546517949999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189354365465179e+104DD) + || CHECK (testu575 (618935436546517999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189354365465180e+104DD) + || CHECK (testu575 (618935436546517800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465178e+104DD) + || CHECK (testu575 (618935436546517850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465178e+104DD) + || CHECK (testu575 (618935436546517850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001uwb), 6189354365465179e+104DD) + || CHECK (testu575 (99999999999999990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 9999999999999999.e+139DD) + || CHECK (testu575 (123665200736552200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365522e+158DD) + || CHECK (testu575 (123665200736552249999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 1236652007365522e+158DD) + || CHECK (testu575 (123665200736552250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365522e+158DD) + || CHECK (testu575 (123665200736552250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001uwb), 1236652007365523e+158DD) + || CHECK (testu575 (123665200736552250000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365523e+158DD) + || CHECK (testu575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), 1236652007365523e+158DD)) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/dfp/bitint-5.c.jj 2023-08-08 16:22:09.404440148 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-5.c 2023-08-08 16:22:09.404440148 +0200 @@ -0,0 +1,159 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _Decimal32 +tests192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal32 +testu192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _Decimal32 +tests575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal32 +testu575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif + +int +main () +{ + _Decimal32 a, b; +#define CHECK(x, y) (a = (x), b = (y), a != (y) || __builtin_memcmp (&a, &b, sizeof (a))) +#if __BITINT_MAXWIDTH__ >= 192 + if (CHECK (tests192 (0wb), 0.DF) + || CHECK (tests192 (7wb), 7.DF) + || CHECK (tests192 (-42wb), -42.DF) + || CHECK (tests192 (-777777wb), -777777.DF) + || CHECK (tests192 (9999000wb), 9999000.DF) + || CHECK (tests192 (-9999999wb), -9999999.DF) + || CHECK (tests192 (99999994wb), 9999999.e+1DF) + || CHECK (tests192 (99999995wb), 1000000.e+2DF) + || CHECK (tests192 (999999900wb), 9999999.e+2DF) + || CHECK (tests192 (-9999999000wb), -9999999.e+3DF) + || CHECK (tests192 (999999900000wb), 9999999.e+5DF) + || CHECK (tests192 (-9999999000000wb), -9999999.e+6DF) + || CHECK (tests192 (123456700000000000wb), 1234567.e+11DF) + || CHECK (tests192 (34242310000000000000000000000wb), 3424231e+22DF) + || CHECK (tests192 (999999900000000000000000000000000000000wb), 9999999.e+32DF) + || CHECK (tests192 (-999999900000000000000000000000000000000000000000wb), -9999999.e+41DF) + || CHECK (tests192 (-2138551000000000000000000000000000000000000000000000000000wb), -2138551e+51DF) + || CHECK (tests192 (-2138551500000000000000000000000000000000000000000000000000wb), -2138552e+51DF) + || CHECK (tests192 (-2138551499999999999999999999999999999999999999999999999999wb), -2138551e+51DF) + || CHECK (tests192 (-2138551999999999999999999999999999999999999999999999999999wb), -2138552e+51DF) + || CHECK (tests192 (-2138552000000000000000000000000000000000000000000000000000wb), -2138552e+51DF) + || CHECK (tests192 (-2138552500000000000000000000000000000000000000000000000000wb), -2138552e+51DF) + || CHECK (tests192 (-2138552500000000000000000000000000000000000000000000000001wb), -2138553e+51DF) + || CHECK (tests192 (3138550000000000000000000000000000000000000000000000000000wb), 3138550e+51DF) + || CHECK (tests192 (3138550867693340381917894711603833208051177722232017256447wb), 3138551e+51DF) + || CHECK (tests192 (-3138550000000000000000000000000000000000000000000000000000wb), -3138550e+51DF) + || CHECK (tests192 (-3138550867693340381917894711603833208051177722232017256447wb - 1wb), -3138551e+51DF)) + __builtin_abort (); + if (CHECK (testu192 (0uwb), 0.DF) + || CHECK (testu192 (7uwb), 7.DF) + || CHECK (testu192 (42uwb), 42.DF) + || CHECK (testu192 (77777uwb), 77777.DF) + || CHECK (testu192 (9999000uwb), 9999000.DF) + || CHECK (testu192 (999999900uwb), 9999999.e+2DF) + || CHECK (testu192 (999999949uwb), 9999999.e+2DF) + || CHECK (testu192 (9999999000uwb), 9999999.e+3DF) + || CHECK (testu192 (9999999499uwb), 9999999.e+3DF) + || CHECK (testu192 (999999900000uwb), 9999999.e+5DF) + || CHECK (testu192 (9999999000000uwb), 9999999.e+6DF) + || CHECK (testu192 (123456700000000uwb), 1234567.e+8DF) + || CHECK (testu192 (34242310000000000000000000000uwb), 3424231e+22DF) + || CHECK (testu192 (9999999000000000000000000000000000000000uwb), 9999999.e+33DF) + || CHECK (testu192 (61893590000000000000000000000000000000000000000000000uwb), 6189359e+46DF) + || CHECK (testu192 (61893595000000000000000000000000000000000000000000000uwb), 6189360e+46DF) + || CHECK (testu192 (61893594999999999999999999999999999999999999999999999uwb), 6189359e+46DF) + || CHECK (testu192 (61893599999999999999999999999999999999999999999999999uwb), 6189360e+46DF) + || CHECK (testu192 (61893580000000000000000000000000000000000000000000000uwb), 6189358e+46DF) + || CHECK (testu192 (61893585000000000000000000000000000000000000000000000uwb), 6189358e+46DF) + || CHECK (testu192 (61893585000000000000000000000000000000000000000000001uwb), 6189359e+46DF) + || CHECK (testu192 (999999900000000000000000000000000000000000000000000000uwb), 9999999.e+47DF) + || CHECK (testu192 (6277100500000000000000000000000000000000000000000000000000uwb), 6277100e+51DF) + || CHECK (testu192 (6277100500000000000000000000000000000000000000000000000001uwb), 6277101e+51DF) + || CHECK (testu192 (6277100500000000000000000000000000000010000000000000000000uwb), 6277101e+51DF) + || CHECK (testu192 (6277101000000000000000000000000000000000000000000000000000uwb), 6277101e+51DF) + || CHECK (testu192 (6277101499999999999999999999999999999999999999999999999999uwb), 6277101e+51DF) + || CHECK (testu192 (6277101500000000000000000000000000000000000000000000000000uwb), 6277102e+51DF) + || CHECK (testu192 (6277101735386680763835789423207666416102355444464034512895uwb), 6277102e+51DF)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (CHECK (tests575 (0wb), 0.DF) + || CHECK (tests575 (7wb), 7.DF) + || CHECK (tests575 (-42wb), -42.DF) + || CHECK (tests575 (-44444wb), -44444.DF) + || CHECK (tests575 (9999000wb), 9999000.DF) + || CHECK (tests575 (-9999999wb), -9999999.DF) + || CHECK (tests575 (999999900wb), 9999999.e+2DF) + || CHECK (tests575 (-9999999000wb), -9999999.e+3DF) + || CHECK (tests575 (999999900000wb), 9999999.e+5DF) + || CHECK (tests575 (999999949999wb), 9999999.e+5DF) + || CHECK (tests575 (-99999990000000wb), -9999999.e+7DF) + || CHECK (tests575 (1234567000000000000000000wb), 1234567.e+18DF) + || CHECK (tests575 (3424231000000000000000000000000000000000wb), 3424231e+33DF) + || CHECK (tests575 (99999990000000000000000000000000000000000000000wb), 9999999.e+40DF) + || CHECK (tests575 (-9999999000000000000000000000000000000000000000000000000000000000000000wb), -9999999.e+63DF) + || CHECK (tests575 (-2138559000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138559e+90DF) + || CHECK (tests575 (-2138559500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138560e+90DF) + || CHECK (tests575 (-2138559499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138559e+90DF) + || CHECK (tests575 (-2138559999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138560e+90DF) + || CHECK (tests575 (-2138558000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138558e+90DF) + || CHECK (tests575 (-2138558500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138558e+90DF) + || CHECK (tests575 (-2138558500000000000000000000000000000000000000000000000000000000000000000000000000000000000000001wb), -2138559e+90DF) + || CHECK (tests575 (9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), 9999999e+90DF) + || CHECK (tests575 (9999999499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), 9999999e+90DF) + || CHECK (tests575 (9999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), __builtin_infd32 ()) + || CHECK (tests575 (-9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -9999999e+90DF) + || CHECK (tests575 (-9999999499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -9999999e+90DF) + || CHECK (tests575 (-9999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -__builtin_infd32 ()) + || CHECK (tests575 (61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb), __builtin_infd32 ()) + || CHECK (tests575 (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb), -__builtin_infd32 ())) + __builtin_abort (); + if (CHECK (testu575 (0uwb), 0.DF) + || CHECK (testu575 (17uwb), 17.DF) + || CHECK (testu575 (420uwb), 420.DF) + || CHECK (testu575 (888uwb), 888.DF) + || CHECK (testu575 (9999000uwb), 9999000.DF) + || CHECK (testu575 (99999990000000uwb), 9999999.e+7DF) + || CHECK (testu575 (99999994999999uwb), 9999999.e+7DF) + || CHECK (testu575 (9999999000000000uwb), 9999999.e+9DF) + || CHECK (testu575 (9999999499999999uwb), 9999999.e+9DF) + || CHECK (testu575 (99999990000000000000uwb), 9999999.e+13DF) + || CHECK (testu575 (99999994999999999999uwb), 9999999.e+13DF) + || CHECK (testu575 (9999999000000000000000uwb), 9999999.e+15DF) + || CHECK (testu575 (9999999499999999999999uwb), 9999999.e+15DF) + || CHECK (testu575 (1234567000000000000000000uwb), 1234567.e+18DF) + || CHECK (testu575 (34242310000000000000000000000uwb), 3424231e+22DF) + || CHECK (testu575 (9999999000000000000000000000000000000000uwb), 9999999.e+33DF) + || CHECK (testu575 (61893590000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189359e+88DF) + || CHECK (testu575 (61893595000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189360e+88DF) + || CHECK (testu575 (61893594999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189359e+88DF) + || CHECK (testu575 (61893599999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189360e+88DF) + || CHECK (testu575 (61893580000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189358e+88DF) + || CHECK (testu575 (61893585000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189358e+88DF) + || CHECK (testu575 (61893585000000000000000000000000000000000000000000000000000000000000000000000000000000000000001uwb), 6189359e+88DF) + || CHECK (testu575 (9999999000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 9999999.e+90DF) + || CHECK (tests575 (9999999499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 9999999e+90DF) + || CHECK (tests575 (9999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), __builtin_infd32 ()) + || CHECK (testu575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), __builtin_infd32 ())) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/dfp/bitint-6.c.jj 2023-08-08 16:22:09.404440148 +0200 +++ gcc/testsuite/gcc.dg/dfp/bitint-6.c 2023-08-08 16:22:09.404440148 +0200 @@ -0,0 +1,156 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-O2 -std=c2x -pedantic-errors" } */ + +#if __BITINT_MAXWIDTH__ >= 192 +__attribute__((noipa)) _Decimal128 +tests192 (_BitInt(192) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal128 +testu192 (unsigned _BitInt(192) b) +{ + return b; +} +#endif + +#if __BITINT_MAXWIDTH__ >= 575 +__attribute__((noipa)) _Decimal128 +tests575 (_BitInt(575) b) +{ + return b; +} + +__attribute__((noipa)) _Decimal128 +testu575 (unsigned _BitInt(575) b) +{ + return b; +} +#endif + +int +main () +{ + _Decimal128 a, b; +#define CHECK(x, y) (a = (x), b = (y), a != (y) || __builtin_memcmp (&a, &b, sizeof (a))) +#if __BITINT_MAXWIDTH__ >= 192 + if (CHECK (tests192 (0wb), 0.DL) + || CHECK (tests192 (7wb), 7.DL) + || CHECK (tests192 (-42wb), -42.DL) + || CHECK (tests192 (-777777777wb), -777777777.DL) + || CHECK (tests192 (-12345678912345wb), -12345678912345.DL) + || CHECK (tests192 (123456789123456789wb), 123456789123456789.DL) + || CHECK (tests192 (777777777777777777777777777wb), 777777777777777777777777777.DL) + || CHECK (tests192 (9999999999999999999999999900000000wb), 9999999999999999999999999900000000.DL) + || CHECK (tests192 (-9999999999999999999999999999999999wb), -9999999999999999999999999999999999.DL) + || CHECK (tests192 (-99999999999999999999999999999999994wb), -9999999999999999999999999999999999.e+1DL) + || CHECK (tests192 (99999999999999999999999999999999995wb), 1000000000000000000000000000000000.e+2DL) + || CHECK (tests192 (999999999999999999999999999999999900wb), 9999999999999999999999999999999999.e+2DL) + || CHECK (tests192 (999999999999999999999999999999999949wb), 9999999999999999999999999999999999.e+2DL) + || CHECK (tests192 (-9999999999999999999999999999999999000wb), -9999999999999999999999999999999999.e+3DL) + || CHECK (tests192 (9999999999999999999999999999999999499wb), 9999999999999999999999999999999999.e+3DL) + || CHECK (tests192 (34242319854454290000000000000000000000wb), 3424231985445429000000000000000000e+4DL) + || CHECK (tests192 (34242319854454294983573424983275760000wb), 3424231985445429498357342498327576e+4DL) + || CHECK (tests192 (999999999999999999999999999999999900000wb), 9999999999999999999999999999999999.e+5DL) + || CHECK (tests192 (999999999999999999999999999999999949999wb), 9999999999999999999999999999999999.e+5DL) + || CHECK (tests192 (-9999999999999999999999999999999999000000wb), -9999999999999999999999999999999999.e+6DL) + || CHECK (tests192 (-9999999999999999999999999999999999499999wb), -9999999999999999999999999999999999.e+6DL) + || CHECK (tests192 (123456789012345678901234567890123400000000wb), 1234567890123456789012345678901234.e+8DL) + || CHECK (tests192 (999999999999999999999999999999999900000000000000000000000wb), 9999999999999999999999999999999999.e+23DL) + || CHECK (tests192 (999999999999999999999999999999999949999999999999999999999wb), 9999999999999999999999999999999999.e+23DL) + || CHECK (tests192 (-999999999999999999999999999999999900000000000000000000000wb), -9999999999999999999999999999999999.e+23DL) + || CHECK (tests192 (-2138550877694459381917894711603833000000000000000000000000wb), -2138550877694459381917894711603833e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603833500000000000000000000000wb), -2138550877694459381917894711603834e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603833499999999999999999999999wb), -2138550877694459381917894711603833e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603833999999999999999999999999wb), -2138550877694459381917894711603834e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603832000000000000000000000000wb), -2138550877694459381917894711603832e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603832500000000000000000000000wb), -2138550877694459381917894711603832e+24DL) + || CHECK (tests192 (-2138550877694459381917894711603832500000000000000000000001wb), -2138550877694459381917894711603833e+24DL) + || CHECK (tests192 (3138550867693340381917894711603833000000000000000000000000wb), 3138550867693340381917894711603833e+24DL) + || CHECK (tests192 (3138550867693340381917894711603833208051177722232017256447wb), 3138550867693340381917894711603833e+24DL) + || CHECK (tests192 (-3138550867693340381917894711603833000000000000000000000000wb), -3138550867693340381917894711603833e+24DL) + || CHECK (tests192 (-3138550867693340381917894711603833208051177722232017256447wb - 1wb), -3138550867693340381917894711603833e+24DL)) + __builtin_abort (); + if (CHECK (testu192 (0uwb), 0.DL) + || CHECK (testu192 (7uwb), 7.DL) + || CHECK (testu192 (42uwb), 42.DL) + || CHECK (testu192 (777777777uwb), 777777777.DL) + || CHECK (testu192 (99999999999999999999999999000uwb), 99999999999999999999999999000.DL) + || CHECK (testu192 (999999999999999999999999999999999900uwb), 9999999999999999999999999999999999.e+2DL) + || CHECK (testu192 (9999999999999999999999999999999999000uwb), 9999999999999999999999999999999999.e+3DL) + || CHECK (testu192 (99999999999999999999999999999999994999uwb), 9999999999999999999999999999999999.e+4DL) + || CHECK (testu192 (999999999999999999999999999999999900000uwb), 9999999999999999999999999999999999.e+5DL) + || CHECK (testu192 (9999999999999999999999999999999999000000uwb), 9999999999999999999999999999999999.e+6DL) + || CHECK (testu192 (123456789012345600000000uwb), 123456789012345600000000.DL) + || CHECK (testu192 (34242319854454290000000000000000000000uwb), 3424231985445429000000000000000000e+4DL) + || CHECK (testu192 (999999999999999999999999999999999900000000000000000000000uwb), 9999999999999999999999999999999999.e+23DL) + || CHECK (testu192 (6189354365465174593875438957438959000000000000000000000000uwb), 6189354365465174593875438957438959e+24DL) + || CHECK (testu192 (6189354365465174593875438957438959500000000000000000000000uwb), 6189354365465174593875438957438960e+24DL) + || CHECK (testu192 (6189354365465174593875438957438959499999999999999999999999uwb), 6189354365465174593875438957438959e+24DL) + || CHECK (testu192 (6189354365465174593875438957438959999999999999999999999999uwb), 6189354365465174593875438957438960e+24DL) + || CHECK (testu192 (6189354365465174593875438957438958000000000000000000000000uwb), 6189354365465174593875438957438958e+24DL) + || CHECK (testu192 (6189354365465174593875438957438958500000000000000000000000uwb), 6189354365465174593875438957438958e+24DL) + || CHECK (testu192 (6189354365465174593875438957438958500000000000000000000001uwb), 6189354365465174593875438957438959e+24DL) + || CHECK (testu192 (6277101735386680763835789423207666000000000000000000000000uwb), 6277101735386680763835789423207666e+24DL) + || CHECK (testu192 (6277101735386680763835789423207666416102355444464034512895uwb), 6277101735386680763835789423207666e+24DL)) + __builtin_abort (); +#endif +#if __BITINT_MAXWIDTH__ >= 575 + if (CHECK (tests575 (0wb), 0.DL) + || CHECK (tests575 (7wb), 7.DL) + || CHECK (tests575 (-42wb), -42.DL) + || CHECK (tests575 (-444444444wb), -444444444.DL) + || CHECK (tests575 (-3333333333333333wb), -3333333333333333.DL) + || CHECK (tests575 (99999999999999999999999999000wb), 99999999999999999999999999000.DL) + || CHECK (tests575 (-9999999999999999999999999999999999wb), -9999999999999999999999999999999999.DL) + || CHECK (tests575 (999999999999999999999999999999999900wb), 9999999999999999999999999999999999.e+2DL) + || CHECK (tests575 (-9999999999999999999999999999999999000wb), -9999999999999999999999999999999999.e+3DL) + || CHECK (tests575 (999999999999999999999999999999999900000wb), 9999999999999999999999999999999999.e+5DL) + || CHECK (tests575 (-99999999999999999999999999999999990000000wb), -9999999999999999999999999999999999.e+7DL) + || CHECK (tests575 (1234567890123456000000000wb), 1234567890123456000000000.DL) + || CHECK (tests575 (3424231985445429000000000000000000000000wb), 3424231985445429000000000000000000e+6DL) + || CHECK (tests575 (99999999999999999999999999999999990000000000000000000000000000000000000000wb), 9999999999999999999999999999999999.e+40DL) + || CHECK (tests575 (-9999999999999999999999999999999999000000000000000000000000000000000000000000000000000000000000000wb), -9999999999999999999999999999999999.e+63DL) + || CHECK (tests575 (-213855087769441389758947543987475900000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694413897589475439874759e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475950000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694413897589475439874760e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475949999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138550877694413897589475439874759e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475999999999999999999999999999999999999999999999999999999999999999999999999999999999999999wb), -2138550877694413897589475439874760e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475800000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694413897589475439874758e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475850000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -2138550877694413897589475439874758e+86DL) + || CHECK (tests575 (-213855087769441389758947543987475850000000000000000000000000000000000000000000000000000000000000000000000000000000000001wb), -2138550877694413897589475439874759e+86DL) + || CHECK (tests575 (61832600368276133515125630254911790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), 6183260036827613351512563025491179e+139DL) + || CHECK (tests575 (61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb), 6183260036827613351512563025491180e+139DL) + || CHECK (tests575 (-61832600368276133515125630254911790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000wb), -6183260036827613351512563025491179e+139DL) + || CHECK (tests575 (-61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1wb), -6183260036827613351512563025491180e+139DL)) + __builtin_abort (); + if (CHECK (testu575 (0uwb), 0.DL) + || CHECK (testu575 (17uwb), 17.DL) + || CHECK (testu575 (420uwb), 420.DL) + || CHECK (testu575 (888888888uwb), 888888888.DL) + || CHECK (testu575 (9999999999999000uwb), 9999999999999000.DL) + || CHECK (testu575 (99999999999999999999999999999999990000000uwb), 9999999999999999999999999999999999.e+7DL) + || CHECK (testu575 (9999999999999999999999999999999999000000000uwb), 9999999999999999999999999999999999.e+9DL) + || CHECK (testu575 (99999999999999999999999999999999990000000000000uwb), 9999999999999999999999999999999999.e+13DL) + || CHECK (testu575 (9999999999999999999999999999999999000000000000000uwb), 9999999999999999999999999999999999.e+15DL) + || CHECK (testu575 (1234567890123456000000000000000000uwb), 1234567890123456000000000000000000.DL) + || CHECK (testu575 (34242319854454290000000000000000000000uwb), 3424231985445429000000000000000000e+4DL) + || CHECK (testu575 (9999999999999999999999999999999999000000000000000000000000000000000uwb), 9999999999999999999999999999999999.e+33DL) + || CHECK (testu575 (618935436546517949837539847534981700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465179498375398475349817e+104DL) + || CHECK (testu575 (618935436546517949837539847534981750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465179498375398475349818e+104DL) + || CHECK (testu575 (618935436546517949837539847534981749999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189354365465179498375398475349817e+104DL) + || CHECK (testu575 (618935436546517949837539847534981799999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 6189354365465179498375398475349818e+104DL) + || CHECK (testu575 (618935436546517949837539847534981800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465179498375398475349818e+104DL) + || CHECK (testu575 (618935436546517949837539847534981850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 6189354365465179498375398475349818e+104DL) + || CHECK (testu575 (618935436546517949837539847534981850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001uwb), 6189354365465179498375398475349819e+104DL) + || CHECK (testu575 (99999999999999999999999999999999990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 9999999999999999999999999999999999.e+139DL) + || CHECK (testu575 (123665200736552267030251260509823500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365522670302512605098235e+140DL) + || CHECK (testu575 (123665200736552267030251260509823549999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999uwb), 1236652007365522670302512605098235e+140DL) + || CHECK (testu575 (123665200736552267030251260509823550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365522670302512605098236e+140DL) + || CHECK (testu575 (123665200736552267030251260509823550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001uwb), 1236652007365522670302512605098236e+140DL) + || CHECK (testu575 (123665200736552267030251260509823550000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000uwb), 1236652007365522670302512605098236e+140DL) + || CHECK (testu575 (123665200736552267030251260509823595017565674550605919957031528046448612553265933585158200530621522494798835713008069669675682517153375604983773077550946583958303386074349567uwb), 1236652007365522670302512605098236e+140DL)) + __builtin_abort (); +#endif +} --- gcc/testsuite/gcc.dg/ubsan/bitint-1.c.jj 2023-08-08 16:12:02.346939560 +0200 +++ gcc/testsuite/gcc.dg/ubsan/bitint-1.c 2023-08-08 16:12:02.346939560 +0200 @@ -0,0 +1,49 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint } } */ +/* { dg-options "-fsanitize=signed-integer-overflow,shift -fsanitize-recover=signed-integer-overflow,shift" } */ + +__attribute__((noipa)) int +foo (_BitInt(15) *p, _BitInt(15) *q, int n) +{ + q[0] = p[0] + p[1]; + q[1] = p[2] - p[3]; + q[2] = p[4] * p[5]; + q[3] = p[6] / p[7]; + q[4] = p[8] << n; + q[5] = p[9] >> n; + return n; +} + +int +main () +{ + static _BitInt(15) p[] = { + 16382wb, 1wb, + -16383wb, 1wb, + 127wb, 129wb, + -16383wb - 1, 1wb, + 0wb, 1wb, + 16383wb, 1wb, + -16383wb - 1, 1wb, + 127wb, 130wb, + -16383wb - 1, -1wb, + 0wb, 1wb + }; + _BitInt(15) q[6]; + int n = foo (p, q, 14); + q[4] = p[8] << (n + 2); + q[5] = p[9] >> (n + 2); + foo (p + 10, q, 15); +} + +/* The 16-bit type vs. 15-bit is small inaccuracy. */ +/* { dg-output "shift exponent 16 is too large for 16-bit type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*shift exponent 16 is too large for 16-bit type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: 16383 \\+ 1 cannot be represented in type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: -16384 - 1 cannot be represented in type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: 127 \\* 130 cannot be represented in type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*division of -16384 by -1 cannot be represented in type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* This isn't accurate, but libubsan right now doesn't know it is 15-bit type rather than 16-bit. */ +/* { dg-output "\[^\n\r]*left shift of 0 by 15 places cannot be represented in type '_BitInt\\\(15\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* The wording is totally incorrect, but at least it is diagnosed. */ +/* { dg-output "\[^\n\r]*left shift of 1 by 15 places cannot be represented in type '_BitInt\\\(15\\\)'" } */ --- gcc/testsuite/gcc.dg/ubsan/bitint-2.c.jj 2023-08-08 16:12:02.346939560 +0200 +++ gcc/testsuite/gcc.dg/ubsan/bitint-2.c 2023-08-08 16:12:02.346939560 +0200 @@ -0,0 +1,49 @@ +/* PR c/102989 */ +/* { dg-do run { target { bitint128 && int128 } } } */ +/* { dg-options "-fsanitize=signed-integer-overflow,shift -fsanitize-recover=signed-integer-overflow,shift" } */ + +__attribute__((noipa)) int +foo (_BitInt(125) *p, _BitInt(125) *q, int n) +{ + q[0] = p[0] + p[1]; + q[1] = p[2] - p[3]; + q[2] = p[4] * p[5]; + q[3] = p[6] / p[7]; + q[4] = p[8] << n; + q[5] = p[9] >> n; + return n; +} + +int +main () +{ + static _BitInt(125) p[] = { + 21267647932558653966460912964485513214wb, 1wb, + -21267647932558653966460912964485513215wb, 1wb, + 4611686018427387903wb, 4611686018427387905wb, + -21267647932558653966460912964485513215wb - 1, 1wb, + 0wb, 1wb, + 21267647932558653966460912964485513215wb, 1wb, + -21267647932558653966460912964485513215wb - 1, 1wb, + 4611686018427387903wb, 4611686018427387906wb, + -21267647932558653966460912964485513215wb - 1, -1wb, + 0wb, 1wb + }; + _BitInt(125) q[6]; + int n = foo (p, q, 123); + q[4] = p[8] << (n + 5); + q[5] = p[9] >> (n + 5); + foo (p + 10, q, 125); +} + +/* The 128-bit type vs. 125-bit is small inaccuracy. */ +/* { dg-output "shift exponent 128 is too large for 128-bit type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*shift exponent 128 is too large for 128-bit type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: 0x0fffffffffffffffffffffffffffffff \\+ 1 cannot be represented in type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: 0xf0000000000000000000000000000000 - 1 cannot be represented in type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: 4611686018427387903 \\* 4611686018427387906 cannot be represented in type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*division of 0xf0000000000000000000000000000000 by -1 cannot be represented in type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* This isn't accurate, but libubsan right now doesn't know it is 125-bit type rather than 128-bit. */ +/* { dg-output "\[^\n\r]*left shift of 0 by 125 places cannot be represented in type '_BitInt\\\(125\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* The wording is totally incorrect, but at least it is diagnosed. */ +/* { dg-output "\[^\n\r]*left shift of 1 by 125 places cannot be represented in type '_BitInt\\\(125\\\)'" } */ --- gcc/testsuite/gcc.dg/ubsan/bitint-3.c.jj 2023-08-08 16:12:02.346939560 +0200 +++ gcc/testsuite/gcc.dg/ubsan/bitint-3.c 2023-08-08 16:12:02.346939560 +0200 @@ -0,0 +1,45 @@ +/* PR c/102989 */ +/* { dg-do run { target bitint575 } } */ +/* { dg-options "-fsanitize=signed-integer-overflow,shift -fsanitize-recover=signed-integer-overflow,shift" } */ + +__attribute__((noipa)) int +foo (_BitInt(575) *p, _BitInt(575) *q, int n) +{ + q[0] = p[0] + p[1]; + q[1] = p[2] - p[3]; + q[2] = p[4] * p[5]; + q[3] = p[6] / p[7]; + q[4] = p[8] << n; + q[5] = p[9] >> n; + return n; +} + +int +main () +{ + static _BitInt(575) p[] = { + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174782wb, 1wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb, 1wb, + 248661618204893321077691124073410420050228075398673858720231988446579748506266687766527wb, 248661618204893321077691124073410420050228075398673858720231988446579748506266687766529wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1, 1wb, + 0wb, 1wb, + 61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb, 1wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1, 1wb, + 248661618204893321077691124073410420050228075398673858720231988446579748506266687766527wb, 248661618204893321077691124073410420050228075398673858720231988446579748506266687766530wb, + -61832600368276133515125630254911797508782837275302959978515764023224306276632966792579100265310761247399417856504034834837841258576687802491886538775473291979151693037174783wb - 1, -1wb, + 0wb, 1wb + }; + _BitInt(575) q[6]; + foo (p, q, 574); + foo (p + 10, q, 575); +} + +/* These print unsigned integer overflow even when it is signed. */ +/* { dg-output "signed integer overflow: \\+ cannot be represented in type '_BitInt\\\(575\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: - cannot be represented in type '_BitInt\\\(575\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*signed integer overflow: \\* cannot be represented in type '_BitInt\\\(575\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* Inaccurate. */ +/* { dg-output "\[^\n\r]*division by zero\[^\n\r]*(\n|\r\n|\r)" } */ +/* The wording is totally incorrect, but at least it is diagnosed. */ +/* { dg-output "\[^\n\r]*shift exponent 575 is too large for \[0-9]*-bit type '_BitInt\\\(575\\\)'\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output "\[^\n\r]*shift exponent 575 is too large for \[0-9]*-bit type '_BitInt\\\(575\\\)'" } */ From patchwork Thu Aug 10 10:10:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 133842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp311492vqi; Thu, 10 Aug 2023 03:11:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbZt/BRM7tDBtOx1CGqkFCebjVD3DPJgqFLqyUTd55VM1Zkdt3c1nbfU2uSo9xc7mgSKdS X-Received: by 2002:a50:ee99:0:b0:522:afec:3ca5 with SMTP id f25-20020a50ee99000000b00522afec3ca5mr1648283edr.28.1691662262763; Thu, 10 Aug 2023 03:11:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691662262; cv=none; d=google.com; s=arc-20160816; b=05igtIIEnXG4M3H2mQjeo92DdtmapDL8Zz6h80xy9FAQ/46krgT8plQ3s04+4T2+VX S2btL6RnHNjuLJRQh/BEAkcl6jiTbBQVpKE1HSPE9DeQ5+YEr7Td5TQRV/ibqcJ9tzrM MQvkeMxIH1dDHUXhHcYW8jeE+oTMtzmk86PXVDvbdX2S6mO7RgIlZnP9qnUAfLBYhXXe K0lfwiSf0wf31UsXMHETzmX3552/D5SlxjVCVuJ9nDHUSFc6O7oxVr4kpO6889Pq8B4G +I39lzAhGt2IlYAMxNcrK7AHXjDSJdoSfZw4oRe+YCFuEKnNpeiJF2xl4FDyubY9mTEU DjcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=wPLCcvfidsFDT73cN0hQOVOwfWlYGIaFDABBF9eUDYI=; fh=93B2EkbdSZtlf0r5fbRgrRBI22A7uhJ3jVicEXL/JQs=; b=sW/Em+pVe+9DbDO/uQBofd25poRvH2zQtWw7tmEr/19o5NvtWRhaeTWS8EACWLVND8 GT6I9NsJCTf0sP5tDDQnt5pZb91jjD4fIJse17kXAlqYPQOyxR1qdXI2wWPnaxtr7qfb 3DFJafSPzO35ZneWio48Tanyt5CVgOkK5s3ASTh98h2xIKLgzTSe7zawW+5WiEV/7f2t 3QtGFLbOZJMqeOqK0r4xgidEuIZf8CRtsV66Ot8Pwxq3VJUQM0ESh4xNg96oU/v9Ry7E LhSMQfH33hg+6Jr7YD10nBv7DH7d71JT9DYoPJSK2ZP3uEeoC06MPxM12RXd9p/Iuf0a d2eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f9EiUKCU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id g11-20020a50ee0b000000b00522d9cc8a36si1109862eds.28.2023.08.10.03.11.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 03:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=f9EiUKCU; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5078F3858020 for ; Thu, 10 Aug 2023 10:11:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5078F3858020 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691662261; bh=wPLCcvfidsFDT73cN0hQOVOwfWlYGIaFDABBF9eUDYI=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=f9EiUKCUqjE/6mzq7sbiXlEVcjw0s7dz+8wqR+p8CF4zGVkL4QBK9F6MuAeRrhGmH M07VyJngznz4D/YTBufJvQqXtrZmkpLy3SALMFCsS5u4sVCWugHUu6ZT954upmzhbK uv9o/I+h2NoV6vhT+yGndOJ2/371Jky31i8e6D9w= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 619D43858D20 for ; Thu, 10 Aug 2023 10:10:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 619D43858D20 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-47-m4Npl5C6Mou9XGERUGHc4g-1; Thu, 10 Aug 2023 06:10:12 -0400 X-MC-Unique: m4Npl5C6Mou9XGERUGHc4g-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5856E3C0E449; Thu, 10 Aug 2023 10:10:12 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 014EB492C3E; Thu, 10 Aug 2023 10:10:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 37AAA9ww2069325 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 10 Aug 2023 12:10:09 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 37AAA8LF2069324; Thu, 10 Aug 2023 12:10:08 +0200 Date: Thu, 10 Aug 2023 12:10:07 +0200 To: Joseph Myers Cc: gcc-patches@gcc.gnu.org Subject: [PATCH 13/12] C _BitInt incremental fixes [PR102989] Message-ID: References: <696ce2b2-5ac2-8946-29de-d5dd4fb3aff2@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <696ce2b2-5ac2-8946-29de-d5dd4fb3aff2@codesourcery.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773836448512058588 X-GMAIL-MSGID: 1773836448512058588 On Wed, Aug 09, 2023 at 09:17:57PM +0000, Joseph Myers wrote: > > - _Complex _BitInt(N) isn't supported; again mainly because none of the psABIs > > mention how those should be passed/returned; in a limited way they are > > supported internally because the internal functions into which > > __builtin_{add,sub,mul}_overflow{,_p} is lowered return COMPLEX_TYPE as a > > hack to return 2 values without using references/pointers > > What happens when the usual arithmetic conversions are applied to > operands, one of which is a complex integer type and the other of which is > a wider _BitInt type? I don't see anything in the code to disallow this > case (which would produce an expression with a _Complex _BitInt type), or > any testcases for it. I've added a sorry for that case (+ return the narrower COMPLEX_TYPE). Also added testcase to verify we don't create VECTOR_TYPEs of BITINT_TYPE even if they have mode precision and suitable size (others were rejected already before). > Other testcases I think should be present (along with any corresponding > changes needed to the code itself): > > * Verifying that the new integer constant suffix is rejected for C++. Done. > * Verifying appropriate pedwarn-if-pedantic for the new constant suffix > for versions of C before C2x (and probably for use of _BitInt type > specifiers before C2x as well) - along with the expected -Wc11-c2x-compat > handling (in C2x mode) / -pedantic -Wno-c11-c2x-compat in older modes. Done. Here is an incremental patch which does that: 2023-08-10 Jakub Jelinek PR c/102989 gcc/c/ * c-decl.cc (finish_declspecs): Emit pedwarn_c11 on _BitInt. * c-typeck.cc (c_common_type): Emit sorry for common type between _Complex integer and larger _BitInt and return the _Complex integer. gcc/c-family/ * c-attribs.cc (type_valid_for_vector_size): Reject vector types with BITINT_TYPE elements even if they have mode precision and suitable size. gcc/testsuite/ * gcc.dg/bitint-19.c: New test. * gcc.dg/bitint-20.c: New test. * gcc.dg/bitint-21.c: New test. * gcc.dg/bitint-22.c: New test. * gcc.dg/bitint-23.c: New test. * gcc.dg/bitint-24.c: New test. * gcc.dg/bitint-25.c: New test. * gcc.dg/bitint-26.c: New test. * gcc.dg/bitint-27.c: New test. * g++.dg/ext/bitint1.C: New test. * g++.dg/ext/bitint2.C: New test. * g++.dg/ext/bitint3.C: New test. * g++.dg/ext/bitint4.C: New test. libcpp/ * expr.cc (cpp_classify_number): Diagnose wb literal suffixes for -pedantic* before C2X or -Wc11-c2x-compat. Jakub --- gcc/c/c-decl.cc.jj 2023-08-10 09:26:39.776509713 +0200 +++ gcc/c/c-decl.cc 2023-08-10 11:14:12.686238299 +0200 @@ -12933,8 +12933,15 @@ finish_declspecs (struct c_declspecs *sp if (specs->u.bitint_prec == -1) specs->type = integer_type_node; else - specs->type = build_bitint_type (specs->u.bitint_prec, - specs->unsigned_p); + { + pedwarn_c11 (specs->locations[cdw_typespec], OPT_Wpedantic, + "ISO C does not support %<%s_BitInt(%d)%> before C2X", + specs->unsigned_p ? "unsigned " + : specs->signed_p ? "signed " : "", + specs->u.bitint_prec); + specs->type = build_bitint_type (specs->u.bitint_prec, + specs->unsigned_p); + } break; default: gcc_unreachable (); --- gcc/c/c-typeck.cc.jj 2023-08-10 09:26:39.781509641 +0200 +++ gcc/c/c-typeck.cc 2023-08-10 10:03:00.722917789 +0200 @@ -819,6 +819,12 @@ c_common_type (tree t1, tree t2) return t1; else if (code2 == COMPLEX_TYPE && TREE_TYPE (t2) == subtype) return t2; + else if (TREE_CODE (subtype) == BITINT_TYPE) + { + sorry ("%<_Complex _BitInt(%d)%> unsupported", + TYPE_PRECISION (subtype)); + return code1 == COMPLEX_TYPE ? t1 : t2; + } else return build_complex_type (subtype); } --- gcc/c-family/c-attribs.cc.jj 2023-06-03 15:32:04.311412926 +0200 +++ gcc/c-family/c-attribs.cc 2023-08-10 10:07:05.222377604 +0200 @@ -4366,7 +4366,8 @@ type_valid_for_vector_size (tree type, t && GET_MODE_CLASS (orig_mode) != MODE_INT && !ALL_SCALAR_FIXED_POINT_MODE_P (orig_mode)) || !tree_fits_uhwi_p (TYPE_SIZE_UNIT (type)) - || TREE_CODE (type) == BOOLEAN_TYPE) + || TREE_CODE (type) == BOOLEAN_TYPE + || TREE_CODE (type) == BITINT_TYPE) { if (error_p) error ("invalid vector type for attribute %qE", atname); --- gcc/testsuite/gcc.dg/bitint-19.c.jj 2023-08-10 09:33:49.205287806 +0200 +++ gcc/testsuite/gcc.dg/bitint-19.c 2023-08-10 09:36:43.312765194 +0200 @@ -0,0 +1,16 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ + +#define expr_has_type(e, t) _Generic (e, default : 0, t : 1) + +void +foo (_Complex int ci, _Complex long long cl) +{ + _BitInt(__SIZEOF_INT__ * __CHAR_BIT__ - 1) bi = 0wb; + _BitInt(__SIZEOF_LONG_LONG__ * __CHAR_BIT__ - 1) bl = 0wb; + static_assert (expr_has_type (ci + bi, _Complex int)); + static_assert (expr_has_type (cl + bl, _Complex long long)); + static_assert (expr_has_type (bi + ci, _Complex int)); + static_assert (expr_has_type (bl + cl, _Complex long long)); +} --- gcc/testsuite/gcc.dg/bitint-20.c.jj 2023-08-10 09:40:14.340707650 +0200 +++ gcc/testsuite/gcc.dg/bitint-20.c 2023-08-10 10:04:35.306548279 +0200 @@ -0,0 +1,16 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ + +void +foo (_Complex int ci, _Complex long long cl) +{ + _BitInt(__SIZEOF_INT__ * __CHAR_BIT__ + 1) bi = 0wb; + ci + bi; /* { dg-message "unsupported" } */ + bi + ci; /* { dg-message "unsupported" } */ +#if __BITINT_MAXWIDTH__ >= 575 + _BitInt(575) bw = 0wb; + cl + bw; /* { dg-message "unsupported" "" { target bitint575 } } */ + bw + cl; /* { dg-message "unsupported" "" { target bitint575 } } */ +#endif +} --- gcc/testsuite/gcc.dg/bitint-21.c.jj 2023-08-10 10:07:31.393998652 +0200 +++ gcc/testsuite/gcc.dg/bitint-21.c 2023-08-10 10:14:14.303164800 +0200 @@ -0,0 +1,11 @@ +/* PR c/102989 */ +/* { dg-do compile { target bitint } } */ +/* { dg-options "-std=gnu2x" } */ + +#define IB __SIZEOF_INT__ * __CHAR_BIT__ +typedef _BitInt(IB) V1 __attribute__((vector_size (sizeof (_BitInt(IB))))); /* { dg-error "invalid vector type for attribute 'vector_size'" } */ +typedef _BitInt(IB) V2 __attribute__((vector_size (8 * sizeof (_BitInt(IB))))); /* { dg-error "invalid vector type for attribute 'vector_size'" } */ +#if __BITINT_MAXWIDTH__ >= 575 +typedef _BitInt(575) V3 __attribute__((vector_size (sizeof (_BitInt(575))))); /* { dg-error "invalid vector type for attribute 'vector_size'" "" { target bitint575 } } */ +typedef _BitInt(575) V3 __attribute__((vector_size (16 * sizeof (_BitInt(575))))); /* { dg-error "invalid vector type for attribute 'vector_size'" "" { target bitint575 } } */ +#endif --- gcc/testsuite/gcc.dg/bitint-22.c.jj 2023-08-10 11:51:51.975802981 +0200 +++ gcc/testsuite/gcc.dg/bitint-22.c 2023-08-10 11:52:16.923446548 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c2x -pedantic-errors" } + +_BitInt(63) a; +signed _BitInt(15) b; +unsigned _BitInt(31) c; +int d = 21wb; +long long e = 60594869054uwb; +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 +#endif +#if 0uwb == 0 +#endif --- gcc/testsuite/gcc.dg/bitint-23.c.jj 2023-08-10 11:52:29.611265273 +0200 +++ gcc/testsuite/gcc.dg/bitint-23.c 2023-08-10 11:55:03.702063742 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c2x -pedantic-errors -Wc11-c2x-compat" } + +_BitInt(63) a; /* { dg-warning "ISO C does not support '_BitInt\\\(63\\\)' before C2X" } */ +signed _BitInt(15) b; /* { dg-warning "ISO C does not support 'signed _BitInt\\\(15\\\)' before C2X" } */ +unsigned _BitInt(31) c; /* { dg-warning "ISO C does not support 'unsigned _BitInt\\\(31\\\)' before C2X" } */ +int d = 21wb; /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +long long e = 60594869054uwb; /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif +#if 0uwb == 0 /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif --- gcc/testsuite/gcc.dg/bitint-24.c.jj 2023-08-10 11:56:03.403210774 +0200 +++ gcc/testsuite/gcc.dg/bitint-24.c 2023-08-10 11:56:13.037073138 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c11" } + +_BitInt(63) a; +signed _BitInt(15) b; +unsigned _BitInt(31) c; +int d = 21wb; +long long e = 60594869054uwb; +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 +#endif +#if 0uwb == 0 +#endif --- gcc/testsuite/gcc.dg/bitint-25.c.jj 2023-08-10 11:56:21.499952227 +0200 +++ gcc/testsuite/gcc.dg/bitint-25.c 2023-08-10 11:56:36.468738364 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c11 -Wno-c11-c2x-compat -pedantic-errors" } + +_BitInt(63) a; +signed _BitInt(15) b; +unsigned _BitInt(31) c; +int d = 21wb; +long long e = 60594869054uwb; +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 +#endif +#if 0uwb == 0 +#endif --- gcc/testsuite/gcc.dg/bitint-26.c.jj 2023-08-10 11:56:56.423453266 +0200 +++ gcc/testsuite/gcc.dg/bitint-26.c 2023-08-10 11:57:41.335811588 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c11 -pedantic" } + +_BitInt(63) a; /* { dg-warning "ISO C does not support '_BitInt\\\(63\\\)' before C2X" } */ +signed _BitInt(15) b; /* { dg-warning "ISO C does not support 'signed _BitInt\\\(15\\\)' before C2X" } */ +unsigned _BitInt(31) c; /* { dg-warning "ISO C does not support 'unsigned _BitInt\\\(31\\\)' before C2X" } */ +int d = 21wb; /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +long long e = 60594869054uwb; /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif +#if 0uwb == 0 /* { dg-warning "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif --- gcc/testsuite/gcc.dg/bitint-27.c.jj 2023-08-10 11:57:23.690063697 +0200 +++ gcc/testsuite/gcc.dg/bitint-27.c 2023-08-10 11:57:57.352582755 +0200 @@ -0,0 +1,18 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "-std=c11 -pedantic-errors" } + +_BitInt(63) a; /* { dg-error "ISO C does not support '_BitInt\\\(63\\\)' before C2X" } */ +signed _BitInt(15) b; /* { dg-error "ISO C does not support 'signed _BitInt\\\(15\\\)' before C2X" } */ +unsigned _BitInt(31) c; /* { dg-error "ISO C does not support 'unsigned _BitInt\\\(31\\\)' before C2X" } */ +int d = 21wb; /* { dg-error "ISO C does not support literal 'wb' suffixes before C2X" } */ +long long e = 60594869054uwb; /* { dg-error "ISO C does not support literal 'wb' suffixes before C2X" } */ +__extension__ _BitInt(63) f; +__extension__ _BitInt(15) g; +__extension__ unsigned _BitInt(31) h; +int i = __extension__ 21wb; +long long j = __extension__ 60594869054uwb; +#if 0wb == 0 /* { dg-error "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif +#if 0uwb == 0 /* { dg-error "ISO C does not support literal 'wb' suffixes before C2X" } */ +#endif --- gcc/testsuite/g++.dg/ext/bitint1.C.jj 2023-08-10 10:42:33.884601671 +0200 +++ gcc/testsuite/g++.dg/ext/bitint1.C 2023-08-10 10:41:44.595312345 +0200 @@ -0,0 +1,9 @@ +// PR c/102989 +// { dg-do compile } + +_BitInt(63) a; // { dg-error "expected" } +unsigned _BitInt(31) b; // { dg-error "expected" } +int c = 21wb; // { dg-error "invalid suffix \"wb\" on integer constant" "" { target c++98_only } } + // { dg-error "unable to find numeric literal operator 'operator\"\"wb'" "" { target c++11 } .-1 } +long long d = 60594869054uwb; // { dg-error "invalid suffix \"uwb\" on integer constant" "" { target c++98_only } } + // { dg-error "unable to find numeric literal operator 'operator\"\"uwb'" "" { target c++11 } .-1 } --- gcc/testsuite/g++.dg/ext/bitint2.C.jj 2023-08-10 10:42:41.950485375 +0200 +++ gcc/testsuite/g++.dg/ext/bitint2.C 2023-08-10 10:42:57.033267905 +0200 @@ -0,0 +1,10 @@ +// PR c/102989 +// { dg-do compile } +// { dg-options "" } + +_BitInt(63) a; // { dg-error "expected" } +unsigned _BitInt(31) b; // { dg-error "expected" } +int c = 21wb; // { dg-error "invalid suffix \"wb\" on integer constant" "" { target c++98_only } } + // { dg-error "unable to find numeric literal operator 'operator\"\"wb'" "" { target c++11 } .-1 } +long long d = 60594869054uwb; // { dg-error "invalid suffix \"uwb\" on integer constant" "" { target c++98_only } } + // { dg-error "unable to find numeric literal operator 'operator\"\"uwb'" "" { target c++11 } .-1 } --- gcc/testsuite/g++.dg/ext/bitint3.C.jj 2023-08-10 10:43:51.410483886 +0200 +++ gcc/testsuite/g++.dg/ext/bitint3.C 2023-08-10 10:50:06.969068962 +0200 @@ -0,0 +1,8 @@ +// PR c/102989 +// { dg-do compile { target c++11 } } + +constexpr int operator""wb (unsigned long long) { return 0; } // { dg-warning "reserved for future standardization" } +constexpr int operator""uwb (unsigned long long) { return 1; } // { dg-warning "reserved for future standardization" } + +static_assert (-42wb == 0, ""); +static_assert (81uwb == 1, ""); --- gcc/testsuite/g++.dg/ext/bitint4.C.jj 2023-08-10 10:45:20.503199319 +0200 +++ gcc/testsuite/g++.dg/ext/bitint4.C 2023-08-10 10:50:21.345861685 +0200 @@ -0,0 +1,9 @@ +// PR c/102989 +// { dg-do compile { target c++11 } } +// { dg-options "" } + +constexpr int operator""wb (unsigned long long) { return 0; } // { dg-warning "reserved for future standardization" } +constexpr int operator""uwb (unsigned long long) { return 1; } // { dg-warning "reserved for future standardization" } + +static_assert (-42wb == 0, ""); +static_assert (81uwb == 1, ""); --- libcpp/expr.cc.jj 2023-08-10 09:26:39.782509626 +0200 +++ libcpp/expr.cc 2023-08-10 11:44:29.337127064 +0200 @@ -856,6 +856,29 @@ cpp_classify_number (cpp_reader *pfile, virtual_location, 0, message); } + if ((result & CPP_N_BITINT) != 0 + && CPP_OPTION (pfile, cpp_warn_c11_c2x_compat) != 0) + { + if (CPP_OPTION (pfile, cpp_warn_c11_c2x_compat) > 0) + { + const char *message = N_("ISO C does not support literal " + "% suffixes before C2X"); + if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false)) + cpp_pedwarning_with_line (pfile, CPP_W_C11_C2X_COMPAT, + virtual_location, 0, message); + else + cpp_warning_with_line (pfile, CPP_W_C11_C2X_COMPAT, + virtual_location, 0, message); + } + else if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false)) + { + const char *message = N_("ISO C does not support literal " + "% suffixes before C2X"); + cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, + message); + } + } + result |= CPP_N_INTEGER; } From patchwork Tue Aug 22 11:28:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 136514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b82d:0:b0:3f2:4152:657d with SMTP id z13csp3557672vqi; Tue, 22 Aug 2023 04:30:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrCdyK37t9osgEeFON6JmUubfQqulo+mpNo9VDFgmzoxiaVHry2eCcgHjc14/N8uI87WpI X-Received: by 2002:a17:906:9bdf:b0:994:1eb4:6898 with SMTP id de31-20020a1709069bdf00b009941eb46898mr7709051ejc.9.1692703801391; Tue, 22 Aug 2023 04:30:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692703801; cv=none; d=google.com; s=arc-20160816; b=ieYDhx3SCsnaMz7KdV+dowvZsMbMul6p8H9ezWHlq0/rE/1hm2j8NI2lp7+nuj11Mw 9kOTHB5+EwCvtkARj5ZKz1KNpFU00Swhi6S0f8sSWVT+JfIDgblDNYXFe0ODXDr7DHXj gAIKdYMFZy0lv2+45JMTcViN29+7okUTpPxNfklDjotMmoyZ5F+gsRS2FMFEYy51DBDv 2sHyPMcQSMk4+6Lgb5oyK1YFHRnjr32wJgD4XrqItJsbKcHCR60/PJqWMC4Mrv9bAJ45 ZPT9jR9Z7moI9I2dyv1+yYGT/bIJgdGe7K2KPtKwtkaBHT6kC+CQD5PfOa0HWn4m9yKj T+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:in-reply-to:mime-version:references:message-id :subject:cc:to:date:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=ve8/9Sz9NcXMaJGs+YuutLs+csP+KOK5K3sBcgpFxVY=; fh=WhQTVvB6y/tLHBV3wqYClh5kFEagurSUhwOQUkCBj9g=; b=e8frMjw+ODapt7SRACj6pY7mqBf5Jq7KUKdtl4XNQ8FwTLq2QkvoQ8F+w9+h/dOiwn ByoGVyow1om/tnAPkStE1yoFCVEp4Xkrnpeh4UbIi90zRlxuwSfdUEyoyxSmdV3tCBoB viFXdp5JCS3FErULmRw6Zv3+uAEqO4Dcoap24IpCry31FmolCeFOmJV8g9xKGePURmXP x8vE24KOqktid8z/zJ5nimFia0oCfSmur1nIomQUCkXq/kOyHEwS8kHbYFsY4ji59oM3 wfw3CXQXNIlblbfvbAHx14DgTceZY+9Mdhee/K2LIZFauZouIHrcD63VeQu1kPbnP5t3 Z51Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gIbYiXB1; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id i10-20020a1709061e4a00b00997e71d037dsi6906274ejj.624.2023.08.22.04.30.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 04:30:01 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gIbYiXB1; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5E8EE388202D for ; Tue, 22 Aug 2023 11:28:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E8EE388202D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692703731; bh=ve8/9Sz9NcXMaJGs+YuutLs+csP+KOK5K3sBcgpFxVY=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=gIbYiXB1U5lhl8hYc+A75a9R6clftlwE1v0EUAgsSkyf3fvoTBCLpqJ5eokA3Qghf Rwx5hUlcyqv0gpr5sM1Kt/PTCwuzg5K/ZQqct9r8Savn4dkxUQCmmsFZTF6fKnCKXZ xKIOte52nyMwEVrzXEx8I+91Q7ytIbKGnObVRkeA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id CCCAD38582B0 for ; Tue, 22 Aug 2023 11:28:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CCCAD38582B0 Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-RbCRq-I6NpmwI_2K1FLmhQ-1; Tue, 22 Aug 2023 07:28:03 -0400 X-MC-Unique: RbCRq-I6NpmwI_2K1FLmhQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F321A280FEC2; Tue, 22 Aug 2023 11:28:02 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.225.165]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B8746C15BAE; Tue, 22 Aug 2023 11:28:02 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 37MBS0Wt2434070 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 22 Aug 2023 13:28:00 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 37MBS0n32434069; Tue, 22 Aug 2023 13:28:00 +0200 Date: Tue, 22 Aug 2023 13:28:00 +0200 To: Joseph Myers Cc: Richard Biener , gcc-patches@gcc.gnu.org Subject: [PATCH 14/12] libgcc _BitInt helper documentation [PR102989] Message-ID: References: <409a2da3-1c2d-e62-6f7-8a3ec74871c7@codesourcery.com> MIME-Version: 1.0 In-Reply-To: <409a2da3-1c2d-e62-6f7-8a3ec74871c7@codesourcery.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1774928581327823662 X-GMAIL-MSGID: 1774928581327823662 On Mon, Aug 21, 2023 at 05:32:04PM +0000, Joseph Myers wrote: > I think the libgcc functions (i.e. those exported by libgcc, to which > references are generated by the compiler) need documenting in libgcc.texi. > Internal functions or macros in the libgcc patch need appropriate comments > specifying their semantics; especially FP_TO_BITINT and FP_FROM_BITINT > which have a lot of arguments and no comments saying what the semantics of > the macros and their arguments are supposed to me. Here is an incremental patch which does that. 2023-08-22 Jakub Jelinek PR c/102989 gcc/ * doc/libgcc.texi (Bit-precise integer arithmetic functions): Document general rules for _BitInt support library functions and document __mulbitint3 and __divmodbitint4. (Conversion functions): Document __fix{s,d,x,t}fbitint, __floatbitint{s,d,x,t,h,b}f, __bid_fix{s,d,t}dbitint and __bid_floatbitint{s,d,t}d. libgcc/ * libgcc2.c (bitint_negate): Add function comment. * soft-fp/bitint.h (bitint_negate): Add function comment. (FP_TO_BITINT, FP_FROM_BITINT): Add comment explaining the macros. Jakub --- gcc/doc/libgcc.texi.jj 2023-01-16 11:52:16.115733593 +0100 +++ gcc/doc/libgcc.texi 2023-08-22 12:35:08.561348126 +0200 @@ -218,6 +218,51 @@ These functions return the number of bit These functions return the @var{a} byteswapped. @end deftypefn +@subsection Bit-precise integer arithmetic functions + +@code{_BitInt(@var{N})} library functions operate on arrays of limbs, where +each limb has @code{__LIBGCC_BITINT_LIMB_WIDTH__} bits and the limbs are +ordered according to @code{__LIBGCC_BITINT_ORDER__} ordering. The most +significant limb if @var{N} is not divisible by +@code{__LIBGCC_BITINT_LIMB_WIDTH__} contains padding bits which should be +ignored on read (sign or zero extended), but extended on write. For the +library functions, all bit-precise integers regardless of @var{N} are +represented like that, even when the target ABI says that for some small +@var{N} they should be represented differently in memory. A pointer +to the array of limbs argument is always accompanied with a bit size +argument. If that argument is positive, it is number of bits and the +number is assumed to be zero-extended to infinite precision, if that +argument is negative, it is negated number of bits above which all bits +are assumed to be sign-extended to infinite precision. These number of bits +arguments don't need to match actual @var{N} for the operation used in the +source, they could be lowered because of sign or zero extensions on the +input or because value-range optimization figures value will need certain +lower number of bits. For big-endian ordering of limbs, when lowering +the bit size argument the pointer argument needs to be adjusted as well. +Negative bit size argument should be always smaller or equal to @code{-2}, +because @code{signed _BitInt(1)} is not valid. +For output arguments, either the corresponding bit size argument should +be always positive (for multiplication and division), or is negative when +the output of conversion from floating-point value is signed and positive +when unsigned. The arrays of limbs output arguments point to should not +overlap any inputs, while input arrays of limbs can overlap. +@code{UBILtype} below stands for unsigned integer type with +@code{__LIBGCC_BITINT_LIMB_WIDTH__} bit precision. + +@deftypefn {Runtime Function} void __mulbitint3 (@code{UBILtype} *@var{ret}, int32_t @var{retprec}, const @code{UBILtype} *u, int32_t @var{uprec}, const @code{UBILtype} *v, int32_t @var{vprec}) +This function multiplies bit-precise integer operands @var{u} and @var{v} and stores +result into @var{retprec} precision bit-precise integer result @var{ret}. +@end deftypefn + +@deftypefn {Runtime Function} void __divmodbitint4 (@code{UBILtype} *@var{q}, int32_t @var{qprec}, @code{UBILtype} *@var{r}, int32_t @var{rprec}, const @code{UBILtype} *u, int32_t @var{uprec}, const @code{UBILtype} *v, int32_t @var{vprec}) +This function divides bit-precise integer operands @var{u} and @var{v} and stores +quotient into @var{qprec} precision bit-precise integer result @var{q} +(unless @var{q} is @code{NULL} and @var{qprec} is 0, in that case quotient +is not stored anywhere) and remainder into @var{rprec} precision bit-precise +integer result @var{r} (similarly, unless @var{r} is @code{NULL} and @var{rprec} +is 0). +@end deftypefn + @node Soft float library routines @section Routines for floating point emulation @cindex soft float library @@ -384,6 +429,27 @@ These functions convert @var{i}, an unsi These functions convert @var{i}, an unsigned long long, to floating point. @end deftypefn +@deftypefn {Runtime Function} void __fixsfbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, float @var{a}) +@deftypefnx {Runtime Function} void __fixdfbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, double @var{a}) +@deftypefnx {Runtime Function} void __fixxfbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, __float80 @var{a}) +@deftypefnx {Runtime Function} void __fixtfbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, _Float128 @var{a}) +These functions convert @var{a} to bit-precise integer @var{r}, rounding toward zero. +If @var{rprec} is positive, it converts to unsigned bit-precise integer and +negative values all become zero, if @var{rprec} is negative, it converts +to signed bit-precise integer. +@end deftypefn + +@deftypefn {Runtime Function} float __floatbitintsf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} double __floatbitintdf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} __float80 __floatbitintxf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} _Float128 __floatbitinttf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} _Float16 __floatbitinthf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} __bf16 __floatbitintbf (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +These functions convert bit-precise integer @var{i} to floating point. If +@var{iprec} is positive, it is conversion from unsigned bit-precise integer, +otherwise from signed bit-precise integer. +@end deftypefn + @subsection Comparison functions There are two sets of basic comparison functions. @@ -707,6 +773,23 @@ These functions convert @var{i}, an unsi These functions convert @var{i}, an unsigned long, to decimal floating point. @end deftypefn +@deftypefn {Runtime Function} void __bid_fixsdbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, _Decimal32 @var{a}) +@deftypefnx {Runtime Function} void __bid_fixddbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, _Decimal64 @var{a}) +@deftypefnx {Runtime Function} void __bid_fixtdbitint (@code{UBILtype} *@var{r}, int32_t @var{rprec}, _Decimal128 @var{a}) +These functions convert @var{a} to bit-precise integer @var{r}, rounding toward zero. +If @var{rprec} is positive, it converts to unsigned bit-precise integer and +negative values all become zero, if @var{rprec} is negative, it converts +to signed bit-precise integer. +@end deftypefn + +@deftypefn {Runtime Function} _Decimal32 __bid_floatbitintsd (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} _Decimal64 __bid_floatbitintdd (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +@deftypefnx {Runtime Function} _Decimal128 __bid_floatbitinttd (@code{UBILtype} *@var{i}, int32_t @var{iprec}) +These functions convert bit-precise integer @var{i} to decimal floating point. If +@var{iprec} is positive, it is conversion from unsigned bit-precise integer, +otherwise from signed bit-precise integer. +@end deftypefn + @subsection Comparison functions @deftypefn {Runtime Function} int __dpd_unordsd2 (_Decimal32 @var{a}, _Decimal32 @var{b}) --- libgcc/libgcc2.c.jj 2023-08-22 11:21:31.549370982 +0200 +++ libgcc/libgcc2.c 2023-08-22 13:24:46.198998697 +0200 @@ -1640,6 +1640,8 @@ __mulbitint3 (UWtype *ret, SItype retpre #endif #ifdef L_divmodbitint4 +/* D = -S. */ + static void bitint_negate (UWtype *d, const UWtype *s, SItype n) { --- libgcc/soft-fp/bitint.h.jj 2023-08-22 11:21:31.583370543 +0200 +++ libgcc/soft-fp/bitint.h 2023-08-22 13:06:01.346092498 +0200 @@ -160,6 +160,9 @@ bitint_reduce_prec (const UBILtype **p, # define BITINT_END(be, le) (le) #endif +/* Negate N limbs from S into D. D and S should point to + the least significant limb. */ + static inline __attribute__((__always_inline__)) void bitint_negate (UBILtype *d, const UBILtype *s, SItype n) { @@ -175,6 +178,19 @@ bitint_negate (UBILtype *d, const UBILty while (--n); } +/* Common final part of __fix?fbitint conversion functions. + The A floating point value should have been converted using + soft-fp macros into RV, U##DI##type DI##_BITS precise normal + integral type and SHIFT, how many bits should that value be + shifted to the left. R is pointer to limbs array passed to the + function, RN number of limbs in it, ARPREC absolute value of + RPREC argument passed to it, RSIZE number of significant bits in RV. + RSIGNED is non-zero if the result is signed bit-precise integer, + otherwise zero. If OVF is true, instead of storing RV shifted left + by SHIFT bits and zero or sign extended store minimum or maximum + of the signed or unsigned bit-precise integer type depending on if + RV contains the minimum or maximum signed or unsigned value. */ + #define FP_TO_BITINT(r, rn, arprec, shift, rv, rsize, rsigned, ovf, DI) \ if (ovf) \ { \ @@ -232,6 +248,16 @@ bitint_negate (UBILtype *d, const UBILty * sizeof (UBILtype)); \ } +/* Common initial part of __floatbitint?f conversion functions. + I and IPREC are arguments passed to those functions, convert that + into a pair of DI##type IV integer and SHIFT, such that converting + IV to floating point and multiplicating that by pow (2, SHIFT) + gives the expected result. IV size needs to be chosen such that + it is large than number of bits in floating-point mantissa and + contains there even at least a two bits below the mantissa for + rounding purposes. If any of the SHIFT bits shifted out is non-zero, + the least significant bit should be non-zero. */ + #define FP_FROM_BITINT(i, iprec, iv, shift, DI) \ do \ { \