From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 7B38538582A1 for ; Sun, 20 Aug 2023 08:25:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B38538582A1 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1692519929; bh=oOSzPeT8H+JQcG0I+j5rsUY1xA0jpOVU3iwlW4WUZV4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=DfXdH9PWnROgjTXRyKTppXdTVfF9HLVx9R4lEhvuN43NjXRfGdAj0ccX7Vmnv0APs iCj0P95ibJgg7Qjtg9Ds3qNKt+eJTK9hbiRgHjxzIpnLfkGVFKQm1wk73qlJj7N0VP ovW6KlZ2DbBWk6DLrFjFKC5Nod3u0ILkYh8PKJVE= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 87A17659AC; Sun, 20 Aug 2023 04:25:28 -0400 (EDT) Message-ID: <73d981766faf984e85722feb3eeabb5d335def4a.camel@xry111.site> Subject: Re: [PATCH v4 0/6] Add Loongson SX/ASX instruction support to LoongArch target. From: Xi Ruoyao To: Chenghui Pan , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, chenglulu@loongson.cn, xuchenghua@loongson.cn, guojie@loongson.cn Date: Sun, 20 Aug 2023 16:25:26 +0800 In-Reply-To: <32f3adc3059dfb3a11a1ee875b2c9d555f04af63.camel@loongson.cn> References: <20230815010537.1817292-1-panchenghui@loongson.cn> <16be99c1b0f520ff989ac544a9df12a398c62f86.camel@xry111.site> <32f3adc3059dfb3a11a1ee875b2c9d555f04af63.camel@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no 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 Thu, 2023-08-17 at 15:20 +0800, Chenghui Pan wrote: > Seems ARMv8-A only guarantees to preserve low 64-bit value of > NEON/floating-point register value. I'm not sure that I modify the > testcase in the right way and maybe we need more investigations. Any > ideas or suggestion? Sorry, the following sentence in GCC manual section 6.47.5.2 suggests my test case is not valid: "As with global register variables, it is recommended that you choose a register that is normally saved and restored by function calls on your machine, so that calls to library routines will not clobber it." So when I use asm(name), the compiler has no obligation to guarantee that it will ever work like a normal variable after a function call. But I still need to verify that the compiler correctly understands only the low 64 bits of the vector register is saved. I'll try to make another test case... --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University