From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 80E183858C31; Fri, 8 Mar 2024 11:30:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80E183858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 80E183858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709897420; cv=none; b=d7L6sBbQOdO4diVEMagX3jgBV+WAy3hrF45NsOsin6L4NJyQ7JWNF6QJWFi6IG7Q2yFiByMdHX1xkRRlFmQ8OkRrOpQOelZk2gtHQGe+GhVO6MX3/dH4hnmhQRk1jOBJjKwABDkNoxckxH+XG7nA6Hdp0fNtphSpOj8fdUO3Dx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709897420; c=relaxed/simple; bh=SEQZGlQ1NNbvouosCLDupVk/Ql4CZB3G9P3cy33rRmc=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=N+R7mOnEphLyAzX1Xdi7wB62tBLltIp3WCD9XFUAFM07my11DrMa6/f4Fi3VBkX11sIsmYfa3mxIOWIZyCFR7ZWqDcBBR94i66WSNCndRaHOeTbzt8R7HTMC3CCLzFbPo6RVR/U6OwTufAXJgoRIsncaE0CSBz8hwj7LLb+3dl0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a44628725e3so237707166b.0; Fri, 08 Mar 2024 03:30:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709897417; x=1710502217; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=RHcvIs4B0p3/lyP17istIyw2vxHwr0rD4bBS/t91gpg=; b=WheMMAQVLea5o8nFAsZSC6Kq09enwjUlfDYZHfOy3rHK6ZzTs0qKOM0ZYzrPJdZHtZ GBEy4YStUBPZjhImraejLqhV5DylVnWh0E9gK3Xrvz/pyrhGHYGsebYToSEq5T2HETu9 /djoAq+AuT6IHaaoYqcwYPDjPZ+jtdDNKMqtJL3Z/GdqgNxvPAtxhb7N56RVt/d5OKcv msmpEQ04YZbpa/VCQiLmKLb7AAMmUr4rBRr85+g+Y9Z6/w7fynaxIgL3vAFUJqjFRRS9 IEF09YUF2y6VrTxjQTZphijcNBR3/eKWe2qHKlf2yCXAs+lLJS1pg4BQQuUFyTDzllu/ ulUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709897417; x=1710502217; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RHcvIs4B0p3/lyP17istIyw2vxHwr0rD4bBS/t91gpg=; b=NAjcbjODKfNDiM5xtOQ29I4B7xLm9oCs3WSyryD6dHLO9zwWj+/FfhudQRDe424yst W5Zmrtlg7Z1lywPVGYYT7MxyImiAkNDg9zU1ZQLWGLx0cZjLi5qrRSFxMaoz4GIx4UyO YazmzkkW4XxKZlQUlRs8LGqbMYiUZX0j16a5e5BZExbV8IJVIVY/E+9LQ830NwQXOw97 9jt2cSL/0AIaWAlLF6rNidJuiGA5GYs8yMA0KkYD1IqgAwpgV/aEt78TBO9xGAe0bofG 4AD6+CYg+5CfowN2aXFFvTvHypVePgDzgCmffvSj5MReesNI9aQ7YPea3CQDWrQO1tZd qoEg== X-Forwarded-Encrypted: i=1; AJvYcCVEXeyqHBF5H7MFZGGs7xQQjQPao5fw+hnoSOZ/aoHTg6suT2IYyun1oZJgFto8mWj5xrUu9ctAjITEW038fIK16rs= X-Gm-Message-State: AOJu0Yw485dKMhYazvX1JsAHffELoI53HbQZdXtBPJ9IUPtsky/138MI 6PrwMvyf8l7qgUZrQZV37JuJ9aHJIbfAcReevqCaxq4IOBtwNwDV6tebA5jymDgzHo2fQZyLwb6 CfPtlGx9Zn0pNzN00SsdGQ3ghLB0qo6jQcN4= X-Google-Smtp-Source: AGHT+IHiyWASB3Hq7UG3xue24G628jNKnccMaDmE77xFQh1d8JqkWsJ1sSWZ0ydz/rMETM7iVZqgKSfO+Pw+uQe516A= X-Received: by 2002:a17:906:4902:b0:a45:1254:abd5 with SMTP id b2-20020a170906490200b00a451254abd5mr11072341ejq.58.1709897417021; Fri, 08 Mar 2024 03:30:17 -0800 (PST) MIME-Version: 1.0 References: <20240308.122735.1470456012502302688.rene@exactcode.de> In-Reply-To: <20240308.122735.1470456012502302688.rene@exactcode.de> From: Jonathan Wakely Date: Fri, 8 Mar 2024 11:30:05 +0000 Message-ID: Subject: Re: [PATCH] fix PowerPC < 7 w/ Altivec not to default to power7 To: Rene Rebe Cc: gcc@gcc.gnu.org, sjames@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 8 Mar 2024 at 11:27, Rene Rebe wrote: > > This might not be the best timing -short before a major release-, > however, Sam just commented on the bug I filled years ago [1], so here > we go: > > Glibc uses .machine to determine assembler optimizations to use. > However, since reworking the rs6000 .machine output selection in > commit e154242724b084380e3221df7c08fcdbd8460674 22 May 2019, G5 as > well as Cell, and even power4 w/ -maltivec currently resulted in > power7. Mask _ALTIVEC away as the .machine selection already did for > GFX and GPOPT. > > powerpc64-t2-linux-gnu-gcc test.c -S -o - -mcpu=3DG5 > .file "test.c" > .machine power7 > .abiversion 2 > .section ".text" > .ident "GCC: (GNU) 10.2.0" > .section .note.GNU-stack,"",@progbits > > We ship this in T2/Linux [2] since 2020 and it is tested on G5, Cell > and Power8. > > Signed-of-by: Ren=C3=A9 Rebe > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97367 > [2] https://t2sde.org > > --- gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc.vanilla 2021-04-2= 5 22:57:16.964223106 +0200 > +++ gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc 2021-04-25 22:57:= 27.193223841 +0200 > @@ -5765,7 +5765,7 @@ > HOST_WIDE_INT flags =3D rs6000_isa_flags; > > /* Disable the flags that should never influence the .machine selectio= n. */ > - flags &=3D ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_M= ASK_ISEL); > + flags &=3D ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_M= ASK_ALTIVEC | OPTION_MASK_ISEL); > > if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) !=3D 0) > return "power10"; Patches should be sent to the gcc-patches list instead of this one, and should be against trunk not an old gcc-11 RC. See https://gcc.gnu.org/contribute.html#patches for more details - thanks!