From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id A24863858D1E for ; Tue, 11 Jul 2023 16:53:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A24863858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 334ED40755C0; Tue, 11 Jul 2023 16:53:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 334ED40755C0 Date: Tue, 11 Jul 2023 19:53:08 +0300 (MSK) From: Alexander Monakov To: Michael Matz cc: gcc-patches@gcc.gnu.org, Jan Hubicka Subject: Re: [x86-64] RFC: Add nosse abi attribute In-Reply-To: Message-ID: References: <1222e0de-8260-9ba3-44fb-ec801fc3a4e2@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, 11 Jul 2023, Michael Matz wrote: > Hey, > > On Tue, 11 Jul 2023, Alexander Monakov via Gcc-patches wrote: > > > > > > * nosseclobber: claims (and ensures) that xmm8-15 aren't clobbered > > > > > > > > This is the weak/active form; I'd suggest "preserve_high_sse". > > > > > > But it preserves only the low parts :-) You swapped the two in your > > > mind when writing the reply? > > > > Ahhh. By "high SSE" I mean the high-numbered SSE regs, i.e. xmm8-15, not > > the higher halves of (unspecified subset of) SSE regs. > > Ah, gotcha :-) It just shows that all these names are confusing. Maybe > I'll just go with "attribute1" and "attribute2" and rely on docu. (SCNR) Heh, that reminds me that decimal digits are allowed in attribute names. Let me offer "preserve_xmm_8_15" and "only_xmm_0_7" then. One more thing to keep in mind is interaction with SSE-AVX transition. If the function with a new attribute is using classic non-VEX-encoded SSE, but its caller is using 256-bit ymm0-15, it will incur a substantial penalty on Intel CPUs. There's no penalty on AMD (afaik) and no penalty for zmm16-31, since those are inaccessible in non-EVEX code. Alexander