From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id A92F53858402 for ; Tue, 14 Sep 2021 23:48:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A92F53858402 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: 4IVR2X+aYbqprBRnqCmtyQHCRXp3l+B06sR9zZ2sDINTVQcqrpcXshA0PgCOImdBmkmpbfwToB yznwWzp2i7ZmFo/NsTJiACWJvwawZOvddIOyxzJIq7z7AG3lBKMGYgpDi0B2bvZ01I5X4Ruaxr y2TWGb39DwJ+PxVSHO7ROepOfTfDjGz/jyKp7NtlR28+2X7eKIYVSISA7H4gVVJZDvg7GCacRC cDgI/KiZDRvJjmEVqqcFlK8ziYjnjVtlA9N2moDP9cNpNJkAdhjXFawAbwpCwmVUOMzmc09Kbf Xlbm8U0pRxIH12RVH6uLrYpc X-IronPort-AV: E=Sophos;i="5.85,292,1624348800"; d="scan'208";a="68366833" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 14 Sep 2021 15:48:14 -0800 IronPort-SDR: CGirG9fAVpmdtO7Hr9ZjANG/mCBlrRBEkSlmdlPfZOl46MKNVB2Yv6LC496KemUHaV5hR2Ei80 d/HBuU4qM7pNpXCe6lrsOT6/IQYA5nrJ7ORajSxjgYxTLhEGXD/7xEaDQM1XH/OEXY4UiIVcFe eRk1XOUuLP6+eajn1aKEOFUbVAXCOB+Id/Dq1Hh1h3MT0j7WzS7lN2Yod0vHYcrr2bYhwcYpvP /Xcitl64eT2ZyaPSA5dqr+YHM6I9zhmXkw+8Enls2t+rWRRlElXah7+YCE5sn0bQ7vgH2dhMzt TIg= Date: Tue, 14 Sep 2021 23:48:08 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Vincent Chen CC: , , Subject: Re: [RFC patch 3/5] RISC-V: Save and restore VCSR when doing user context switch In-Reply-To: <1631497278-29829-4-git-send-email-vincent.chen@sifive.com> Message-ID: References: <1631497278-29829-1-git-send-email-vincent.chen@sifive.com> <1631497278-29829-4-git-send-email-vincent.chen@sifive.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3118.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 23:48:15 -0000 On Mon, 13 Sep 2021, Vincent Chen wrote: > According to the RISC-V V extension specification, all vector registers > except VCSR are caller-saved registers. The VCSR (vxrm + vxsat) has thread > storage duration. Therefore, only VCSR needs to be added to the user > context operation. What is the intended programming model for using vxrm and vxsat? The expectation for the floating-point rounding modes and flags is that they work just like user-defined _Thread_local variables - that is, they are *not* saved or restored by setjmp/longjmp or *context functions. It would be natural to expect fixed-point rounding modes and flags to work similarly. -- Joseph S. Myers joseph@codesourcery.com