From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 69C72385840C; Fri, 6 May 2022 17:05:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 69C72385840C Received: by mail-wr1-x429.google.com with SMTP id u3so10853705wrg.3; Fri, 06 May 2022 10:05:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9HTCwym/l1UrpIJAJpYwd247Ayyrhr3XuZdgd9WjEbw=; b=4LMEwOrwn4+x6FIoInYDoaxYxmiI5l3Zq5Q+nvHD1mZ7n6D83OKR5t2R8OpExt9mPv HZVGO+d21ovNbDIik41dK7busm5TyV0Dto16ZoFRCWe9yHvFRfbKFGILI+nKh6RyFpAU hFMYsPI01RVK/jCwE5t+ydNqCV9BgMCyidX8tsqoLFltlLHzmPRgT7l21AIGOjrZ7+ID aEJ7mrNUtXxkZJ843FpsffASyCUQ3LjLpS2Kw816eG0dkfQdMh8sIxRop9S1bAH2fPIg 96A7fpmZxLKjz56b52ym9hmrFd4Gnuo+P9MhdIpEkW0p8ytShJ1mtpiPkk4Eo7zR31L4 DDZw== X-Gm-Message-State: AOAM533GCFXgYlD7poM2Tqte7Am3hTK+SsF2jl1n9f6rRf3Os/pwJAEz pFZWiDN4U0Ny3AJQt8aFX3Rd6ViyJ6ixmSgaalI= X-Google-Smtp-Source: ABdhPJyKacolz2KrSIStCqTV+pgFiVCA8Xa441Mw3Ti7JkjNS+GxS8ode0ePjVocPHGKwOx+KiUSdAgAjlUKGUc88Ws= X-Received: by 2002:a05:6000:1889:b0:20c:617a:b087 with SMTP id a9-20020a056000188900b0020c617ab087mr3503486wri.102.1651856742792; Fri, 06 May 2022 10:05:42 -0700 (PDT) MIME-Version: 1.0 References: <20220428130306.GS25951@gate.crashing.org> <20220502213619.GW25951@gate.crashing.org> <20220506161421.GJ25951@gate.crashing.org> In-Reply-To: <20220506161421.GJ25951@gate.crashing.org> From: Jonathan Wakely Date: Fri, 6 May 2022 18:05:31 +0100 Message-ID: Subject: Re: [PATCH v2] libstdc++: ppc: conditionalize vsx-only simd intrinsics To: Segher Boessenkool Cc: Alexandre Oliva , "libstdc++" , gcc-patches , David Edelsohn Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2022 17:05:46 -0000 On Fri, 6 May 2022 at 17:17, Segher Boessenkool wrote: > > +#if defined __VSX__ || __LONG_WIDTH__ == 32 > > _GLIBCXX_SIMD_PPC_INTRIN(signed long); > > _GLIBCXX_SIMD_PPC_INTRIN(unsigned long); > > +#endif > > Is __LONG_WIDTH__ the right macro to use here? Nothing else in > libstdc++v3 uses it. "__CHAR_BIT__ * __SIZEOF_LONG__" is the usual > thing to do. Is __LONG_WIDTH__ always defined anyway? Presumably it could be simply __SIZEOF_LONG__ == 4 if this is PowerPC-specific code where CHAR_BIT==8 is always true? We don't need to consider hypothetical targets where CHAR_BIT!=8 if we already know the target is some version of PowerPC.