Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp1810971lqp; Sat, 23 Mar 2024 09:38:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXLEWDnxcEtt04x98Zab4PuNZ1Np7acU3QYCqkZCB92SpbgV1UC7ajLpSordC02BW1EpaJcHbPm9jUM1g2zOW370vhIRmP+RKY+vrU+Og== X-Google-Smtp-Source: AGHT+IGh8Ih8fDF/bjenMUSH3q3IvpChcgXDq5TvMxsmjvPPf2NEE8Uk07+7s+KjhrgLcTyPLPEZ X-Received: by 2002:a17:902:e748:b0:1e0:3084:6cb4 with SMTP id p8-20020a170902e74800b001e030846cb4mr3600125plf.17.1711211880223; Sat, 23 Mar 2024 09:38:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711211880; cv=pass; d=google.com; s=arc-20160816; b=j85n5kNA/OImn6ZUV4QByp6SCmEclg3HB114nkwpWtl2QWa93rkNLKbRALGUR5cN9N ASnzZbP1fzcTjEu7/gFoqO+DaNm6YbhDuIEjd1F38fsRLJY0eT49rzng/1fJm6uAVfZZ 7/fx1oI+Sp7ySNuzQxW7H0cxzDBP2NQhlZ5SILbt/l5Ns7VEM2tlU69vre5/1bhLed0v dp0iVLbjqJ2iG9wHGoRmpC62gXf3wMjNI8Fxucibyd9adYuRiwFh1C9vNPt0wX6DeD4H 3AnkgHLzEVQ8dR+wjwxmgqmalghM/aP1iXZiiOwC1znExMsoZ93XSUHWAj6twjKOsTYj Segw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:feedback-id:references :in-reply-to:message-id:subject:cc:from:to:date:dkim-signature; bh=XEiB6i9LbUv2gvZ0g7Rzdz2DBRkWU14YeEGBU6bTRsc=; fh=l5euF85dbNmYSsgbgL68ZDmD25g2pBtZaZ9KspwLq+Y=; b=dEqJqImdO87A1xLN4fzUGch1ozvrITZWJe+i7njA30C71pqgPBYow69Hqbemj1b9Su wHneY0psgwehxiXjmrBEkiqtpEkt9CawTLDaN1JWq/ypisWWhcd5AnNA5L69DdZoP/MV 0uLRmXUYlOfe3K1DwQkKlEHdnfx20SvEzR0qNQcmofOHeavAmn3cSfDdaLQX4f4bWpnR S/oY9PQdhQVqtOVw8nAu6MqY4GzrCLUMZTWnvJFVikAdk/3KOV2ddV/1YI9Sp6OUIuM3 gUXQL4HN8i3eeq2XGp6ORP2sPQuM8YeQM84x3srd20svyqp2MFHHj/GgUqZwWxu5K64k uy6g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vh6YNanG; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u2-20020a170902e5c200b001dddb014623si1895254plf.211.2024.03.23.09.37.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 09:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=vh6YNanG; arc=pass (i=1 spf=pass spfdomain=protonmail.com dkim=pass dkdomain=protonmail.com dmarc=pass fromdomain=protonmail.com); spf=pass (google.com: domain of linux-kernel+bounces-112409-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112409-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D1B30282220 for ; Sat, 23 Mar 2024 16:37:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16EBB446D6; Sat, 23 Mar 2024 16:37:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b="vh6YNanG" Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E15D722625 for ; Sat, 23 Mar 2024 16:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=188.165.51.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711211873; cv=none; b=HlkugIZS1YJm6cmSH0pXFhp8aVghl57eMMgClqbkIO8Cbl9nQ5mJy10E4W0yOIKxVTzdSbbd5DegoTiVIZ/L/pd3lGIVPDXYXotCHW57x8pMSXLz0HwNV2DKAS/wRsJ0lzPDeaJiDgs1BCzITa4xZE07HCn/vq0lVWJ2hHIL/kM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711211873; c=relaxed/simple; bh=XEiB6i9LbUv2gvZ0g7Rzdz2DBRkWU14YeEGBU6bTRsc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pntMNLFoCV5SW17ZY+Ld+ojcTlD28XIvSNbXw1eM4blhuMK0cVB4UWmVcoRwRSpjFVxFcaRLzpMWy8xpKkbtWG2Uj/wYsZ2U+l0EXR3BTSVZt/7Y12xdgKQvCeD+IbMkDmeSjZLR8hS4Z7BAGZHBFUWL/HyrYf6a40Ku53Ni3Qw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com; spf=pass smtp.mailfrom=protonmail.com; dkim=pass (2048-bit key) header.d=protonmail.com header.i=@protonmail.com header.b=vh6YNanG; arc=none smtp.client-ip=188.165.51.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=protonmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=protonmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1711211860; x=1711471060; bh=XEiB6i9LbUv2gvZ0g7Rzdz2DBRkWU14YeEGBU6bTRsc=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=vh6YNanGH1X20zGK1tfAaV4nESkLDgECUm44By3xP/rrepE0RC54y96FmF8vXXoAX C8OKoFzrhRaela23fr04aAr9c9G2k19VwHX2hon3KR5Ww1bdaSY3UiHRthffDJvkbO vGnHnfWrjy3AqBoDJlHzl0sN3UtpvfHC1wkQiFeZzIg2BjW8P4jyQJcs/uNsUOAo8b hRInHyvu2tAFYn2J7gbRiwVWNGTN3SKlnU3vwFFRAnSLfUFFaRPx7Zh8H1BW/APelU UOHoNnylCMXjdiHAPiN/8IXicIHHkO52kCjxeGvzWdlGLNNJYDuqcCv8wRFnta3igC 6Wb2bQ5hnio2Q== Date: Sat, 23 Mar 2024 16:37:27 +0000 To: Sam Ravnborg From: Koakuma Cc: "sparclinux@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "davem@davemloft.net" , "ndesaulniers@google.com" , "arnd@arndb.de" Subject: Re: [sparc] Use of -fcall-used-* flags in Makefile? Message-ID: In-Reply-To: <20240319221615.GA379167@ravnborg.org> References: <20240319221615.GA379167@ravnborg.org> Feedback-ID: 6608610:user:proton Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Sam, Sam Ravnborg wrote: > Hi Koakuma, > Looking at https://github.com/gcc-mirror/gcc/blob/master/gcc/config/sparc= /sparc.h > I read that: >=20 > On v9 systems: > g1,g5 are free to use as temporaries, and are free to use between calls > ... > g6-g7 are reserved for the operating system (or application in > embedded case). >=20 > Based on the above I would assume gcc do not change behaviour with or > without -fcall-used-g7. > [...] > For sparc32 the above file says: >=20 > g5 through g7 are reserved for the operating system. >=20 > So again - it looks like -fcall-used-g5 -fcall-used-g7 should have no > effect here and verification on a real target would be nice. >=20 > Sam From my understanding (and looking at the codegen results) those flags forces GCC to treat the named register as volatile, despite what the ABI says. However, I also believe that removing them wouldn't be harmful? To quote my reasoning in the LLVM tracker: > omitting the flags shouldn't be harmful either - compilers will now > simply refuse to touch them, and any assembly code that happens > to touch them would still work like usual (because Linux' conventions > already treats them as volatile anyway). But I am not entirely sure about it, that is why it'd be great if there's some explaination on why those flags were added in the first place. > I do not have a sparc64 system at my hands - and for this qemu may not > cut it. But it would be super if someone with a working sparc64 target > could verify if the kernel could be built and works without > -fcall-used-g7. I am currently running a build with those flags taken out on a T5120, and the kernel seems to be running okay for what I do (LLVM development), but I don't know if there are more comprehensive test suite for me to try on.