From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-a1p-077725.sys.comcast.net (resqmta-a1p-077725.sys.comcast.net [IPv6:2001:558:fd01:2bb4::b]) by sourceware.org (Postfix) with ESMTPS id 9BFDD3858D28 for ; Fri, 7 Jan 2022 21:55:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9BFDD3858D28 Received: from resomta-a1p-077245.sys.comcast.net ([96.103.145.236]) by resqmta-a1p-077725.sys.comcast.net with ESMTP id 5u0mnpmlF7EzW5xCVnHG9H; Fri, 07 Jan 2022 21:55:07 +0000 Received: from smtpclient.apple ([73.60.223.101]) by resomta-a1p-077245.sys.comcast.net with ESMTPSA id 5xCUn1TvT9rtM5xCUnmPkd; Fri, 07 Jan 2022 21:55:07 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvuddrudegvddgudeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucevohhmtggrshhtqdftvghsihdpqfgfvfdppffquffrtefokffrnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpedvtdevjeeuhefhiedvteffjeeuffehkefgudeutdevffefkeeijeelfeevuefhgeenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhrtghpthhtohepihgrihhnsehsrghnughovgdrtghordhukhdprhgtphhtthhopehgtggtsehgtggtrdhgnhhurdhorhhg X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Help with an ABI peculiarity From: Paul Koning In-Reply-To: Date: Fri, 7 Jan 2022 16:55:06 -0500 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Iain Sandoe X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, JMQ_SPF_NEUTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2022 21:55:10 -0000 > On Jan 7, 2022, at 4:06 PM, Iain Sandoe wrote: >=20 > Hi Folks, >=20 > In the aarch64 Darwin ABI we have an unusual (OK, several unusual) = feature of the calling convention. >=20 > When an argument is passed *in a register* and it is integral and less = than SI it is promoted (with appropriate signedness) to SI. This = applies when the function parm is named only. >=20 > When the same argument would be placed on the stack (i.e. we ran out = of registers) - it occupies its natural size, and is naturally aligned = (so, for instance, 3 QI values could be passed as 3 registers - promoted = to SI .. or packed into three adjacent bytes on the stack).. >=20 > The key is that we need to know that the argument will be placed in a = register before we decide whether to promote it. > (similarly, the promotion is not done in the callee for the = in-register case). >=20 > I am trying to figure out where to implement this. I don't remember the MIPS machinery well enough, but is that a similar = case? It too has register arguments (4 or 8 of them) along with stack = arguments (for the rest). paul