From patchwork Fri May 10 03:27:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163818 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1823362ilr; Thu, 9 May 2019 20:32:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxh9dCdslIad5dp+O3P9Nvy98EiHZRgc2+OP2Lll+q4cfewQKqBv44hHVeCkIWeQv/yw1dW X-Received: by 2002:a05:6000:1d0:: with SMTP id t16mr5953476wrx.239.1557459165052; Thu, 09 May 2019 20:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557459165; cv=none; d=google.com; s=arc-20160816; b=e4L4otu/rxMy2bFV98eWz69xw8WELxBJ7RRk4xw75YnCVsEySkJGm679AMGS5mvQ8t zeLhvqsiqE8T6VwemoZlvNzgKj4AQexqdjjSyQzt/sqtsE1iiBroNSGqwc+KF9obkKOB ay4/3lywt42EFv8xqiDjM7lyYT4alIOOhaHNFwkaktj0Dfe1h4u38HCtDyiSjbuEIbOG hGo7usp4amMK321SFqjM9hsG8cQMdWKOSWlFiIHGBiavTwUisoNikXyKrMRdeUAF0Rac 5ALvwgUKPx1nwKP60YYkxcCN5B+gh5C+ZHiCcmqU4R1dTa9PnNj3OMU6vPXAvUeKLtho fQhA== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=NErSQdRlHVC9BEP/KozaqxEQA62KujEwTCLN9vcHoRFiuEKScRCQLzLqJnRKt9RHdu ZdQqby5AV96IWUc202MSF6sVdlxc91OG6yDfYLIrvtUzDqrDTfcCS3iTpIajI/dRb1xa BtZpiNx/WACpEDOYPsSo0Yk/7ghjaFzFG446WMSfAurQaPt319QMicieDHRtFoKopGvu n1OzGdaXYrxiCa08SGnrS1rN4JSG4TYh7vVfKEnAkYCr3U7JoRlmXxF8891As+6VdUWs L9kK0tPhyKBpjOd0zzlAf567bLB3bpaPy6kuzTk7xWcu6wcXAmtwX7CX8Jw0510Q8wpY 8XJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qy0i2Erq; 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=fail (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 e17si2232373wrp.379.2019.05.09.20.32.44 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 20:32:45 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=qy0i2Erq; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:36180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwH6-0007tS-1K for patch@linaro.org; Thu, 09 May 2019 23:32:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOwBs-0002xn-Ax for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOwBr-0001RR-FR for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:20 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:40909) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOwBr-0001Qh-A5 for qemu-devel@nongnu.org; Thu, 09 May 2019 23:27:19 -0400 Received: by mail-pg1-x544.google.com with SMTP id d31so2270413pgl.7 for ; Thu, 09 May 2019 20:27:19 -0700 (PDT) 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=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=qy0i2ErqsZmVU4FeGmusySdXgZApMG8P7vPdmyhVVVbwMiLPsZcCYSG8L54/gcG1SY QMxagzZ6nWUSbaI5u8FMKEU1JkoUV1bNEfiSbW0gcobxqYZym17ysMcvZxZWobbCS0ln pAKqB8qVF8vRx5GtIUbrKELrqaV4DFrYRs1oa7RbNZke4wYf4++QFTABTAHzCff6bR+1 FZFamuSIp/o78Q6oKpwQSv8Hz1wPJZIAa/Z/MGYltiN0fH9DIg1UHTFRcekD+zSBnm+G c2bf0/GEcZuUkHwEN7gzaFubBELbggJuJyzBNUoNt3n6sTgUIfNG435kp6pSXCo0UF4L pJ5Q== 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=k6JHJxPH4SUjOY+2AFOQmSeRVHdVtcQpQvqTv9tIMgY=; b=OS7ZOK4UrEsX+hBWcJiTAVzfY2NaC+l267a0GY2GKUNSTWaGeiUld78L5Ggjpto6wK faVWaPzlKsZzy6uSoaRGmpz467bhNyftosUQoFjU8jsFQWOBYGS+HP+eq1AALS15lFOV l8Uvq8Dr6nRcibzhStsu7D+56iBOUnigpmVgX7o93Tdir6amw52b1F/7guHdN9wqpGO/ 29GHOK6gbtuBs+8Yz30Hj+4ZbmssJ7c1lHzvR5UaAqLHUpNKIAfx/3JorjhrAEjQspyK eINeIESQ7rmV6O/+iwag8UHdNXzO6+MQf5kt4r3PbhJHzclfp5rWKrye+g1UvD8kek8u qEpg== X-Gm-Message-State: APjAAAVVmvmGBwkdd2ds1FytYmdHsZ4utw4+kgfL1tX0EEsdf8MkgA1d t5/LiTNT/X5gsllt1Khq2d9NlkTcE58= X-Received: by 2002:a63:cf:: with SMTP id 198mr10410723pga.228.1557458838080; Thu, 09 May 2019 20:27:18 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id t26sm6259695pgk.62.2019.05.09.20.27.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 20:27:17 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 20:27:06 -0700 Message-Id: <20190510032710.23910-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510032710.23910-1-richard.henderson@linaro.org> References: <20190510032710.23910-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 Subject: [Qemu-devel] [PATCH v2 4/8] linux-user/sparc: Use WREG constants in sparc/target_cpu.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 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. Signed-off-by: Richard Henderson --- 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 a92748cae3..567351d564 100644 --- a/linux-user/sparc/target_cpu.h +++ b/linux-user/sparc/target_cpu.h @@ -42,15 +42,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