From patchwork Tue Nov 5 18:11:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 178534 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1114254ilf; Tue, 5 Nov 2019 10:14:30 -0800 (PST) X-Google-Smtp-Source: APXvYqx+llueEkqIuSsWJOhQ9s77Df8CWuwveES5vPCsR3ZAUdWiQ1NTgxkhOa9oTVReKdsRxl1U X-Received: by 2002:ac8:2c99:: with SMTP id 25mr18815815qtw.147.1572977670421; Tue, 05 Nov 2019 10:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572977670; cv=none; d=google.com; s=arc-20160816; b=woqPpZIRTXm4QazX97Kg0KrxOCUkI1UN6fGuWaibj/h4ZVfYm8ryZZMDrrJ4wgRgKX BtidepCFeoU57/ru8AkZjSqEeZ6kaWP6G0dI4kMEril0b8UXkAZ1uDLncgpeNu3YqXn1 z+VpDIYsqrz98zyU9HLuhkYijioiRMWYdUiDU87ynyr5Uzq9RPG9jzYaGHNFFqaLuH4y fgxKFQZyTnGzphYEq3YsAAc9Q0HZz+oMZ7kkUzy7mmv4Ah8zDyKOiNTqVs8qmXHS157B MYwDh0ttrmdGh7b/B7zfTJjNAGXqmKBIVzF1IzHyKy/z8VX/dvyUuTZbydVwW0dgEsjy wqsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from; bh=q8ax5OAHJUCcqXvgxxwdlXd87XxIzNwdhnysQ3asJd8=; b=wV1JjtTmcVJU2uQX4J0uoDDvN7vWW7g0Z+e6nrfbBdxKMokixjbdyAEw8VtBqSXy+y k3U+r+LOMUF89cjD7DEdNV3uzg6TAFQIeAe38ySBmwiIQdB2WrcW7PjZIxv24Sic1Qkk TDzU+fiQDWr4Z2/273JpugyWotXAR4vNqF4joVk0s/CzLrIfzV90Sq5K2jQ94yQWVdvo hU1HoZYimLPFKZcZmU+gOUiMcDKRufN1xkgAinzTCbfKLA5LEWbHiJiYbz/oqLrAL39M 8l5aBMl9SHOZDVzu1QPvzNaPE7l19ybN6IksON0h7xZNdeYPkziSvkXD/ImdTt4pHTK+ St2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o15si17224658qtl.280.2019.11.05.10.14.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Nov 2019 10:14:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:47148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS3LZ-00013F-Ln for patch@linaro.org; Tue, 05 Nov 2019 13:14:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52034) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS3Ir-0005xC-Sl for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS3Iq-0004hM-NH for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:41 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:37767) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iS3Iq-0004gG-47 for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:40 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N6bwO-1hsB6j20XG-0180M3; Tue, 05 Nov 2019 19:11:31 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 07/13] linux-user/sparc: Use WREG_SP constant in sparc/signal.c Date: Tue, 5 Nov 2019 19:11:13 +0100 Message-Id: <20191105181119.26779-8-laurent@vivier.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191105181119.26779-1-laurent@vivier.eu> References: <20191105181119.26779-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:G1qwgjrVD/d014NPw/Znbc3n9rLZQAeSIeoYcryBJz/i/v6DCpm xLG01cL3zJmQtVtIfqtfuAhcQtPWTtU3TrhZDW0Ql/y71wIAg0Eq472DnCnbGvj2KmPF0pV NJaw8iJEHiphyG4bD//XL0IvZZVHVkmvvjlija9ngwsM92t5M8k4ekQ//nuugEk1o7djQuc VThywpqWFpzvhPgiop/Cg== X-UI-Out-Filterresults: notjunk:1; V03:K0:HJ60+S/KvfU=:RDwwPbS3NLI6V8kSI77lL+ z+JgxAN+DgTOCYhhPyBulpLAFPut2XzIOETeXJw+86xBosLSXvoXF51l0rfCGRAqkTBENy6Gr u+SeLxfUwGIyOEK0pMbdDjEUdx3obQsZsrw9G3duQ48iBSPa94ia9dJv6QIWjOUlgfJSGya9I qb0yhw5sUUh5L4SxljXCyKwVQbwQ+wsUj/nEZHwVSiEMUbfB2zfA24pCRYon0NZVAI8mmFefI UoVHtzpsw/GPRh7v9ISniCPTR2aU9TyreWND9OgRkPcmvpPrfUjwBXDuzg8Pr75bYYoLFLIGj EeYgCllFgum2G1KEvX25rYnZLn3LpJ/GVYQpqM5AuveFFcQV0LbSig/Fdjn2fZJQUi+suUPzP 27qaoUZH3AXlq8HPVHjrngrq+9JARkPt56EkCseed0jzLbGqnHAi/AEsSCHSwnfByxYcrmEWn LdFb7LJpZQ9u+j5bVj6F/5fyEKNdKTWhnGFpQWsr8prkoXkV6Vr2lg/6LBjTwRklqJ7vrzcI5 wkF2C9Fw1VkZM6U/I91Xi5vdCpn0lAHEZAyZqNOHWJ9t64mpWAjc0PVtq/tO4QSM9lIBMbi9l vJJ8VXdGbpiHtyh/5Jli6zeY8euyUvAOGscwcNJ5Sfz8FSj+XAZS3zXkkvUGH2SyuSDIeOxbe aSj/i5FwR1UUcBCd0I6JF5uGdLIP58Hq+KrkH+pJqVLUo4wusowJ0TUxcqYMgNNq8qkZu2nOQ GH6QcYjSKHS0NgCiMbQ79vAxQhj4dNf8pgbUPYS31N15vEecCIbLzVpGZUrSqsTzs/CGMWM3S tuHJecfPaEI9R03B5SYi/Y5l0+FnXBrNypcLUOMqaDzcUUOIjiHs2VI22STVfb0fRSb23U/dm P+ds1RD7eXSBGa1uFxrA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.73 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Riku Voipio , Richard Henderson , Laurent Vivier , =?utf-8?q?Alex_Benn=C3=A9e?= , Artyom Tarasenko Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson s/UREG_FP/WREG_SP/g This is non-obvious because the UREG_FP constant is fact wrong. However, the previous search-and-replace patch made it clear that UREG_FP expands to WREG_O6, and we can see from the enumeration in target/sparc/cpu.h that WREG_O6 is in fact WREG_SP, the stack pointer. The UREG_SP define is unused; remove it. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20191025113921.9412-7-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/signal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.21.0 diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index a967e2db7307..0db4c5f84fe4 100644 --- a/linux-user/sparc/signal.c +++ b/linux-user/sparc/signal.c @@ -104,9 +104,6 @@ struct target_rt_signal_frame { qemu_siginfo_fpu_t fpu_state; }; -#define UREG_FP WREG_O6 -#define UREG_SP WREG_I6 - static inline abi_ulong get_sigframe(struct target_sigaction *sa, CPUSPARCState *env, unsigned long framesize) @@ -201,7 +198,7 @@ void setup_frame(int sig, struct target_sigaction *ka, goto sigsegv; /* 3. signal handler back-trampoline and parameters */ - env->regwptr[UREG_FP] = sf_addr; + env->regwptr[WREG_SP] = sf_addr; env->regwptr[WREG_O0] = sig; env->regwptr[WREG_O1] = sf_addr + offsetof(struct target_signal_frame, info); @@ -255,7 +252,7 @@ long do_sigreturn(CPUSPARCState *env) sigset_t host_set; int i; - sf_addr = env->regwptr[UREG_FP]; + sf_addr = env->regwptr[WREG_SP]; trace_user_do_sigreturn(env, sf_addr); if (!lock_user_struct(VERIFY_READ, sf, sf_addr, 1)) { goto segv_and_exit;