From patchwork Wed Nov 6 11:33:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 178675 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp483250ilf; Wed, 6 Nov 2019 03:40:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxRiZOmZCQ67+ePa3X+YNkRnVwNXRgUuP/+/1r0+0epgQAZqe4oG/DOy0z3s5juRqchIuJL X-Received: by 2002:a05:6402:1146:: with SMTP id g6mr2093237edw.215.1573040420361; Wed, 06 Nov 2019 03:40:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573040420; cv=none; d=google.com; s=arc-20160816; b=x2XBO108Z57uMim3IrGGmRd4qn+Mtlg5o+KD9Aij5HZ8wgVbHO8IpSKjDc48VX5Xzd qkSsDqtHOUZcShhgpPuMvWFuoWfPEQn7kv4qRra/C+nJuoMYd480Z7XTXsOclbeahcqZ OYovooJQZcPyjUyvPq66G8sb0q4Ng/+ma2hAY4/VeS0yAFH47mIawNtCGUMpjPXS2hSi juGl5uSuZxzxtAdCil/7NPgJTXAiATFQ9QIGbKKLWnfjNc+gVXehFdehmat5MzdgyNdr Ezrex1/ZdkMVPdADzmWKudxlzXP58vqj4e+yokEwOlfD8bWYzOPG1D2euJ4/Z6Pss5i3 IBbw== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=s3dwTlrDDpUYfBm35ZTmNP1iU/J47qcplhioQiqvjIo=; b=OO1HKFmPAFgPsu+QVo1/gk4oD1sRLro6GCVaOzlwjsA8qVp92g2dW53TqtYiZaB16T RuZJid35QXSmiTeMO3bcPjgzLkDUeDFUcRA8zj1W/QoWh+NM2/2xxUJEJIFJZEDeoZ7X o4enV4THxUhKPeqkM2znHQ0EeexMtSCFm4PVHIzPYIlrMbz8Bn+DMiAVuez1BQJMfeBg cqUpcBsEIKlTaRajzjT5UJqgeQNLAbzZ9kRNY3MUPF37uIjrDTpxTBm14GESXicL0usH qjiD6+8+NiZ0CkyUqfR3ESh/GChcgFu4dIG2I5QeAsb3UVXBSfIJANzB7HO+JTxg2OoE Rc8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rhp4LYJm; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e22si13175819ede.163.2019.11.06.03.40.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 03:40:20 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Rhp4LYJm; 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"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJfe-0003Q7-T7 for patch@linaro.org; Wed, 06 Nov 2019 06:40:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37857) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJZD-0003nQ-DZ for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSJZC-0007NS-9w for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:39 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35645) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSJZC-0007HH-3l for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:38 -0500 Received: by mail-wm1-x344.google.com with SMTP id 8so2953669wmo.0 for ; Wed, 06 Nov 2019 03:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=s3dwTlrDDpUYfBm35ZTmNP1iU/J47qcplhioQiqvjIo=; b=Rhp4LYJmaMgM95v343vixf0U4RAGvipb82Hwie/A42J68lE0AwWTrx43EaHhPXyvmV MApd5eoLvFk6GGMzZIb9zB7ebsGZGQBlFnf06cQDr+G6KNu2m6GF3OUnWD1+2fbA5awx K2S/h76WzLHPqGgslcjnjeeuHWWpWXZxvP7zsc1PzCCNwYsP8ain60dpSXjhZrLLQDnG ZTesOZWwUxKIIsXOeiHW75OfpLdavoUkhj1tz0i0h3oX0ZOznuYeP68Bg6vyr2oOGv+G cl1h0beY1DxQ+XAfl8X30AqkqrEkNlfeZqC2FK3X5AHTjXvupaAmkd752IeOzD4VME6c 54SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s3dwTlrDDpUYfBm35ZTmNP1iU/J47qcplhioQiqvjIo=; b=PaG0cJO7zC5IS2PWSQLiB5XeGXHrU5EpXNDaKocnAKC6cKUWvHQGai9+cYlHEv5R56 UuZs4s5v1TdbTzyUKFACFXbDmp11OPVxXfWAbQCkSzXpT2hii+JD18DRQQKZIffCsHg4 gSodBxCM5ZYHuXtdeqMzfCm12BX/w2M6sRrr3JwRfiAQAuV6D+GFAwzw20sdYMxJ2AUs lS6McM4R2ScSJwLFMnFxcJvn6VbDReRVpX+oXC4QMlWjeCyOWDFyZjjyXmpKLtyHBcpe rpeY4HB4aIqWyLxDsltBTMETnK/bhA5DJaywI2mzrzwmqFaxy5YVBKbvMKlyRtAju4RT EPuw== X-Gm-Message-State: APjAAAX+gxW6m6q6iq05XzSoBPwkd5/atI3pV4So72EaGsdgUICxsEAO 6eB83v/xTXeLYybdA05NMYf2EJ81pym4tw== X-Received: by 2002:a7b:c858:: with SMTP id c24mr2135270wml.174.1573040015600; Wed, 06 Nov 2019 03:33:35 -0800 (PST) Received: from localhost.localdomain (31.red-176-87-122.dynamicip.rima-tde.net. [176.87.122.31]) by smtp.gmail.com with ESMTPSA id q124sm1776907wme.13.2019.11.06.03.33.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 03:33:35 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/12] linux-user/sparc: Use WREG constants in sparc/target_cpu.h Date: Wed, 6 Nov 2019 12:33:10 +0100 Message-Id: <20191106113318.10226-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191106113318.10226-1-richard.henderson@linaro.org> References: <20191106113318.10226-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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(-) -- 2.17.1 diff --git a/linux-user/sparc/target_cpu.h b/linux-user/sparc/target_cpu.h index 1ffc0ae9f2..b30fbc72c4 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