From patchwork Tue Nov 5 18:11:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1189876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 476yYp3D8qz9sNT for ; Wed, 6 Nov 2019 05:17:18 +1100 (AEDT) Received: from localhost ([::1]:47174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS3OG-0003tA-37 for incoming@patchwork.ozlabs.org; Tue, 05 Nov 2019 13:17:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52086) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iS3It-000618-SE for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iS3Is-0004jS-Mm for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:43 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:43417) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iS3Is-0004iA-CY for qemu-devel@nongnu.org; Tue, 05 Nov 2019 13:11:42 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MVubb-1iK7Cp0WWb-00Rmv6; Tue, 05 Nov 2019 19:11:30 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 05/13] linux-user/sparc: Use WREG constants in sparc/target_cpu.h Date: Tue, 5 Nov 2019 19:11:11 +0100 Message-Id: <20191105181119.26779-6-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:KXxJLT3KNr6WlN9g2QmbVLh3fKF01ZX6oWM+L1NoEM2yYQh4uHR xRL2SiIiznF7/I81463rKtj1ZWRoTcTuu75MwbnBp0xkW+GL09AHH6YFjtgEo0cgBcgFPkd STZFstoGCnuKG6ItcXjiCGtJnWYO558KcwOzFjWiKCNCDeI+xj6++Y1+R/JryNGgeeGIlwK zZ8DEXXOykQog5Jxr/6Hg== X-UI-Out-Filterresults: notjunk:1; V03:K0:x1c/+OwZYeY=:F12phl1ePT9YhVW7AuWKGJ GfEzAYcaLv7jjYuREV9CbAn1ltABmCwoMr5eZ1jSytrNHxYdqVMG/RoZhmHywrWWto+MnBFCb rq+jmyFDHwwXWwWuebAFIsDVnqp0i3bBABF1+d39jYD/Fu6PeqN50HBgdWcEE/jYwRF60N0Da ad+9/IuuQeyvW0r4WLO1qM6snxSZ3PDQdFOWCrU8zosRzh8kG5v3OZBF+YIu2fv7AwoKQUP7/ 57Hes6bB+1mxXA6nXvL6zdEutwKse08CwKL28RK85UZfbcxRSeMpUHsrFzVVevluVq6GgGp+K 1Dzf+EeVU4EaquGvYFjuLIWpiBJt0YJUKVm3B65Dm44dvPdkQy71RHWCLqguujEhBniuUipFk pVNkJXGNXFa13u0gohXUT2fvGOJlM7oGhuFSCOBRl0fdQjLPtmll6fupiXc3PmhY6Sao/SNzn uq0besAVj1lz5DMDRmzrUyg9tgzqNjfFzjPBdgbdkRe4fP/+oyyGfVOaAM1R89qRxYFZfxS2S En+Q1RfiDhgFs8dxZoUeuPagWypz+YF78Cf8n/BTGVoI3UFMBNK6YEkkHO8ULYV1fMVUitqiV hD/K6hOZs+teTmnL2VMPdObdMCXNFzmvQAXvTpXhaknmj4qbH3DNzOt6oyeQGZDOkRfZV80PV 68tBcyMYUgyRC5uKwBReEJSinE7WJhFuMk/LF69oO9Q7e/KTZwTeEypjT33KRcawPsKgdh3c9 ZPS32gH3K+D+3YbcVjrtw7S22pWCNdhTWqg9TB3wjZFsbA07uPz5yWXjMMW0cnEeaClbC+Oaj vNrL8+mZ2bT0m+y2/wJZuh21Pcz0UgJIeyTR7fBg1bzzbfdwX56ibwhYhk8+IuwJYwwg3SnBG 4+GzL3AZEFSeLiQSHldQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.13 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson This fixes a naming bug wherein we used "UREG_FP" to access the stack pointer. OTOH, the "UREG_FP" constant was also defined incorrectly such that it *did* reference the stack pointer. Note that the kernel legitimately uses the name "FP", because it utilizes the rolled stack window in processing the system call. Signed-off-by: Richard Henderson Reviewed-by: Laurent Vivier Message-Id: <20191025113921.9412-5-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/sparc/target_cpu.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index 1ffc0ae9f2ec..b30fbc72c43b 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -41,15 +41,9 @@ static inline void cpu_set_tls(CPUSPARCState *env, target_ulong newtls) env->gregs[7] = newtls; } -#ifndef UREG_I6 -#define UREG_I6 6 -#endif -#ifndef UREG_FP -#define UREG_FP UREG_I6 -#endif - static inline abi_ulong get_sp_from_cpustate(CPUSPARCState *state) { - return state->regwptr[UREG_FP]; + return state->regwptr[WREG_SP]; } + #endif