From patchwork Fri Oct 25 11:39:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 177729 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3577745ill; Fri, 25 Oct 2019 04:49:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwq7pGkDXxzyCOptiJcjVaFv4HNM+toEYeGhnNlEBlb9GY/O+Nx1snA4Nha1H/4M3CoOr6U X-Received: by 2002:a17:906:8155:: with SMTP id z21mr3114452ejw.180.1572004181675; Fri, 25 Oct 2019 04:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572004181; cv=none; d=google.com; s=arc-20160816; b=I6GPc3D88wDsRCDvkVAz7A/kGk1FEb7D3NKRLF+M2XLpNSRLy9zNLWnaL+4lwJ39ZG CLuDiq4EH/TRN8FP5Q+tcgbBBfxnoyk9/oHicX3NFZeUcE7V19b7NJJNB8YbnixEKe7l 10Po9U+fLu0HWTpIMTMtcvqm3EB+aKDI+tBssJlSPOkJXH9GRcyFzXXN9eoRB1wBndbk FoIkhw5LGJgrYn/ESDKSVQXB9AOaaifLTRi93acqsm5W6szTRUz7PcBSQ6n3Fg3l9QF1 Z5MtqKCImzKojKdBWdb8USvaHRbUxFZECosnHl4kFc8sN1jUzNXjtXS8lyEucyQBD9gy zvWA== 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=s0q1vqFGnAcsw/qw8CdtCPCtjm1BmD/+WvFX3Z3uxE4=; b=LHfmnADLhcGrS71lUGncOsAk/iOCXA4MWvVvgk+nA018JS3v97oeCqn8unwTiXIEO9 SR9ssZ8p4pox/XuRkuW/8sJTUUVr9kqepVW6WjmiyW8GhKk+cQ7knfCL7NbNvFupi43i LxZbbNyCWkTyZTMY/N+Y2QRyQDIe6CH0i6or+d/48gXLFlF5x7sJTYnd8poOjUknivUq F/5ViJjwY+o4Kd3Pql74l/l48EF4alomt3jUhH2tIeM1kkW/r4Oebshl00Pi03Zv7K7Z 40LY4CnYejmZNn8k+f8AxFPWJCANTQXYdEpYZTJx4bRgCysdaDy4RbdZeGfvMTFF0bbY ZfbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="rI/Usq5O"; 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 dx19si1050511ejb.113.2019.10.25.04.49.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 04:49:41 -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="rI/Usq5O"; 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 ([::1]:59046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNy68-00043D-10 for patch@linaro.org; Fri, 25 Oct 2019 07:49:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45077) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNxwP-0006gF-2K for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNxwK-0006dP-FL for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:34 -0400 Received: from mail-qk1-x741.google.com ([2607:f8b0:4864:20::741]:43147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNxwJ-0006bg-Ex for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:31 -0400 Received: by mail-qk1-x741.google.com with SMTP id a194so1390358qkg.10 for ; Fri, 25 Oct 2019 04:39:30 -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=s0q1vqFGnAcsw/qw8CdtCPCtjm1BmD/+WvFX3Z3uxE4=; b=rI/Usq5OenuuvTlRkFeZwBOfcZNf9ytXpIcywXy9m/M8IZ2mPyUS50ReGVbqmJTGcK 6SdGdFYeIdaAAnG/RXVWxBx4cI6SA6/8sNcdVlorKPbVgH9k1iA9QMAz3W7sXNNxoVk0 48Za501PLhL7T45dHqHyex6UmTH95Nf5KJujwROOeK/iWUTLjVzuIZJ8z7xAwFI+z780 Bx6S5fiMefqedeKM+B2hr3NewIbGkj24iHwCR5KdkoPAej8hkEQbMloCvQtnDsSSpeU1 1tKN8epoJCIODXYFWSNibNSYI/uPIYDrLe+y2Lw+VKtb7dg0OkaCMFc+UmpwRz1TE++s eQ/w== 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=s0q1vqFGnAcsw/qw8CdtCPCtjm1BmD/+WvFX3Z3uxE4=; b=SRlf3p2HixRdQxfEWxaY0+gSFXbY7KdYYbImctVJgaZDKPvTbhpkLsR2aYYoMnoHTH FgAex1+LTmy88W6+MS8sIn+jdMqc1PhxB5S2yyFuZlTNKlzteCh7xw0BFk0ZI6g7OaKf Z9rwTq1JJ+pY6VW10KWMA93MR1eJayFEnMIhiEyluqXBVrmcEkbIslWx6sFw+e4uHyUa NI8GW/8ZrtctldwZxdITy83maVwDER6JdS4dUzQHIS3/zcX6MMM9SLa8AFI6g1k2eSlM 6r+BVT0uIm4GDinLmJbiJI8D1uC2ejd/MrTxflFFguTDW6bFQzV8TNh41l/UH7bO1Har YIMQ== X-Gm-Message-State: APjAAAUHa0HNr3vrXkjn47uWd1DK/3+5KS948pwFUyu1e1GFtuljCmOg jUM1wnjYMOpbjBhx/KwOI4VDQ5ghUXQ= X-Received: by 2002:a37:816:: with SMTP id 22mr2479620qki.454.1572003569270; Fri, 25 Oct 2019 04:39:29 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-50.nyc.biz.rr.com. [172.254.253.50]) by smtp.gmail.com with ESMTPSA id x38sm1473335qtc.64.2019.10.25.04.39.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 04:39:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 06/12] linux-user/sparc: Use WREG_SP constant in sparc/signal.c Date: Fri, 25 Oct 2019 07:39:15 -0400 Message-Id: <20191025113921.9412-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025113921.9412-1-richard.henderson@linaro.org> References: <20191025113921.9412-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::741 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: alex.bennee@linaro.org, laurent@vivier.eu Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- linux-user/sparc/signal.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.17.1 Reviewed-by: Laurent Vivier diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index a967e2db73..0db4c5f84f 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;