From patchwork Wed Nov 6 11:33:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 178670 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp479811ilf; Wed, 6 Nov 2019 03:36:51 -0800 (PST) X-Google-Smtp-Source: APXvYqz0PAWXPeTIUaP6Sm+UCI7OPInK9UlKiPld/U+3aNZy2WVloDplk/PSWuNChI8pgGjH7tEC X-Received: by 2002:a50:e68c:: with SMTP id z12mr2161451edm.53.1573040211518; Wed, 06 Nov 2019 03:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573040211; cv=none; d=google.com; s=arc-20160816; b=MKwBb80XXFPtP8WSCU8D+8qxJxG/rK6YS7TlhP2WwOv28K733WBWyKvuLdVL+0oRPJ tw9/tR6uTuaYbDiaCT0+MziPI7MhqgQQ8LA4SYuTPtqJxSmSGnGMDI0aGoYBv8LA+C7J XVKIMLrt0Mp2zmE3rMdG+HNXeB/SYwCnxP06hmqn70HcpKHObC6Lf6rbXyUb7ak3Br6J YUAk+LlN1RjVmpXOGWbznwB12C79sqcQEXU1BoYjYOaPhTwJBTtKUnWf2v5o6BM/6jNz /ToOC2QlQ6V2JN0ab4IGxV2yDgbnzTvFzQQda2W90HFUvrTBmFXjvCRCKXW8bCi3kt+0 LpAw== 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=XRFH5cdPSAgNEt1BQCmYoOshHVpFTmX+EPnlR0Bd3jE=; b=auP9/Mm9B1PrQkx6cvH30k3bWLr9xFaWArnRQ5d9CFrcHVT7Qp5Yz4mhzvLB+/k78x ltZnzH42Z9p6L9jBHkrte12v05mp6eoUiPUrqE8/OPDUT5aEfmZ5XS7/ncCaG/0ViW6I Z4kWDrljvsbDPsGp3n+6j2Fd2MDlXdUb+RAmfSgSRn9wSqNtit9IvLDql6AikG56Rv8U xKpk960XN02SzmsBQojZdJdF/37roFBvxWMdtCV8ljRc2ASyuBV361lpiGO3M5udt/Eo CjZQUOLT2Zsea5NfVJZE2IvdXlOm2s1S4bPGlZxbp90erpJPScC9YCVmaDHLfQOtJ3c4 IDPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P1J0U3fD; 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 p22si14289352eja.204.2019.11.06.03.36.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Nov 2019 03:36:51 -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=P1J0U3fD; 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]:56386 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJcI-0007tY-1c for patch@linaro.org; Wed, 06 Nov 2019 06:36:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37893) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iSJZE-0003pP-Qt for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iSJZD-0007Vu-O2 for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:40 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:35532) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iSJZD-0007Sh-HY for qemu-devel@nongnu.org; Wed, 06 Nov 2019 06:33:39 -0500 Received: by mail-wr1-x441.google.com with SMTP id p2so101342wro.2 for ; Wed, 06 Nov 2019 03:33:39 -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=XRFH5cdPSAgNEt1BQCmYoOshHVpFTmX+EPnlR0Bd3jE=; b=P1J0U3fDOqGZZKMiIN+Em3ax0zOPZd2ojUNW47Za3sM5GMAZIRiq69oj4GJZ04ds25 C2OYvPF/F1Gbpu31RWlV55bgdhIMhWZJC+J95rQW8KfYkqCtL8MsyN1uzjSWFUs8MXg1 E8wnAsT/yuvxEFVoVwDTa/75iOLFRcleg2NpXnt93Z5HE1C9c+/lDre53G9lQytEVcjf atAyImxEOqXlOZXDDgSoBSSGZWIud5afUcLE+XlVm/+BABLzFObVKCsk4pOyzBSYxO8s tabugns0ZwpjGEZpu1WEWQJHNoOs63XakNfkUuJDmVWIAn2+9BprRdFdb7+6q6yZO/cG 7LSA== 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=XRFH5cdPSAgNEt1BQCmYoOshHVpFTmX+EPnlR0Bd3jE=; b=la5G3W/qc3TFARK1s5WdvnSgpqjxA8X6UXhzSj7eNNYJUMsYySr6eGu0s7yuzzsqPO 9RKMswYbbAOOtJexgVAKRE9XfybDe61x0SyR88c3dOy+syw6uM+QQclY4kJoe3IKm3+s LSLmAGTRpBHoMV7j3HeFXoqNg9glM+ZoQw+79i1kUCA/KYRC6/jzn1gGuTVHAq5KkKoz 2I8Zyo5bhvmj/UxdU1WjawGZACHoQWW5V/ICFwiWqnXbjTTFoqZim9Q9f3DnOLujh/p7 N+ceFOoikKDriTVXrF/GaNQQj/E382gqe2d/S2j7VsVK86My90XTlppj/rECbjQ4brq+ RmvQ== X-Gm-Message-State: APjAAAVwuzUFbebpoYNm44S3xmBLlafpV0UH5jLoaLQUMslw/VExjO2u 8XaDx4z+Popall2jM85yKLrGjuubJooRag== X-Received: by 2002:adf:f585:: with SMTP id f5mr2190612wro.272.1573040018179; Wed, 06 Nov 2019 03:33:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2019 03:33:37 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 06/12] linux-user/sparc: Use WREG_SP constant in sparc/signal.c Date: Wed, 6 Nov 2019 12:33:12 +0100 Message-Id: <20191106113318.10226-7-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::441 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" 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.17.1 diff --git a/linux-user/sparc/signal.c b/linux-user/sparc/signal.c index aac37da239..e05693f204 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;