From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67964 invoked by alias); 8 Feb 2020 10:52:06 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 67951 invoked by uid 89); 8 Feb 2020 10:52:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:927, site X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 10:52:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581159123; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LgyfS0Ne4VH15d7aKnLYq1t9SM2VfoHA2QxVC3CtVT8=; b=JindRNNRtU6WtGXmIy6aBH5ndJkwxnc9a+0dtjC0xkKHJA+IoN0mDo8JvNbw2tOh7cmn9l fcqLTBcXqsMdO+fDguWGuEmN4SgpZ4iofoNIDbg66AG4pLKqz0L4COAYH1oBWcoOMCYtoY LRB0YUtCk+eeGGptXKthA84jONTDuRo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-6ylL9l0TPd-Dp9f-0N9r6g-1; Sat, 08 Feb 2020 05:51:57 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2A29D1409; Sat, 8 Feb 2020 10:51:56 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B830E89A7A; Sat, 8 Feb 2020 10:51:55 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 018April014542; Sat, 8 Feb 2020 11:51:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 018AppE0014541; Sat, 8 Feb 2020 11:51:51 +0100 Date: Sat, 08 Feb 2020 10:52:00 -0000 From: Jakub Jelinek To: Uros Bizjak Cc: JonY <10walls@gmail.com>, "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] i386: Make xmm16-xmm31 call used even in ms ABI Message-ID: <20200208105151.GZ17695@tucnak> Reply-To: Jakub Jelinek References: <20200204093921.GN17695@tucnak> <20200204114211.GP17695@tucnak> <20200206060745.GG17695@tucnak> <2dffd53f-f301-256f-5520-6cce5c76b11d@gmail.com> <20200207112810.GT17695@tucnak> <2a8f55e6-9bb2-5853-3910-df0c3d82edb2@gmail.com> <20200208100534.GW17695@tucnak> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00479.txt.bz2 On Sat, Feb 08, 2020 at 11:32:40AM +0100, Uros Bizjak wrote: > I think that the patch should also be backported to gcc-9 branch. The > change is backward compatible, since the new code will save and > restore zmm16+ registers at the caller site, and the old code (e.g. > existing libraries) will then unnecessarily save and restore regs in > the callee. Actually, it isn't backward compatible. If both caller and callee touch xmm16+ (sure, unlikely), then if caller is compiled by new gcc and callee by old gcc it is the case you described, caller doesn't try to preserve values across the call and callee uselessly saves them anyway (unless it fails to assemble due to SEH). But if caller is compiled by old gcc and callee by new gcc, caller assumes it can preserve values across the call in those registers and callee doesn't save them and clobbers them. Jakub