From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 53C9A1F8C6 for ; Tue, 14 Sep 2021 23:48:26 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8C1CD385781A for ; Tue, 14 Sep 2021 23:48:25 +0000 (GMT) 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 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-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: , Cc: libc-alpha@sourceware.org, andrew@sifive.com Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" 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