From nobody Tue Feb 10 17:46:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1572004124; cv=none; d=zoho.com; s=zohoarc; b=L46GEWNywFfczOphDNXBu5hqbVgyLfNqtOnKcLv00sC49O64SqwhAC5+pzTlIVPCiIHIBLC/KpycLF9H9BDwLlPGjBP9AJJAWfpwdtcy0Akeu8Jvh59hP/h/gQHpH+CkCZl4yg6CCcVI9yPW/K2Pt+Hm8Q7N9sXLiMDo2Fd4Uj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572004124; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=C1Ka5ZLtI0sImJ7QdMPIBsKCCe+cYWp1x4Ddd/XjEbY=; b=NnKmtUz9otwUlofpWjIUhmeaPpxX72sXE039pf7WzwRFB8fmEoc58BVMPz/ItnC0yl5fAbKyVJlrfPep9yy81CUezzDoETuUzmVzgo6ZSIS/RBOpzvVGM6A4WWBZ2OHkZ1kfzMralXScyEckwNkoZjcGFWdmGqkI5waYK19WgnQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1572004124845379.84606906310796; Fri, 25 Oct 2019 04:48:44 -0700 (PDT) Received: from localhost ([::1]:59020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNy5B-0001ga-24 for importer@patchew.org; Fri, 25 Oct 2019 07:48:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45064) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNxwM-0006U1-3T for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNxwK-0006dA-Ea for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:33 -0400 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:42551) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNxwI-0006au-D5 for qemu-devel@nongnu.org; Fri, 25 Oct 2019 07:39:31 -0400 Received: by mail-qt1-x844.google.com with SMTP id w14so2693836qto.9 for ; Fri, 25 Oct 2019 04:39:27 -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.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 04:39:26 -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=C1Ka5ZLtI0sImJ7QdMPIBsKCCe+cYWp1x4Ddd/XjEbY=; b=IFKRl7SfLyGkRHA2wCnD8Orxigbg5oSbNOHXNwR8D+0jRTEGgSqPnswZdclYiVAgVe B+QIirneWP1g3tK9Fg7ZxbgZI6zsjdAxd/4x3wgp7jYU6MHwzyVN4gViKVDL1wQNCuJb k2/6L/UpkgwvDDKzkeORzFtaX0K2LF6Ai6A+MCQSWA9zvZmPYfrH66OLl9Qq1INDb/7k RXOIYmopyxj8YfGxLhL83DQxXboFsYARE//POLkTkZQf6AyDJzMLBP03u8AOO1Zxd2E4 2c4kkL6rd72rG7nAWdep1OZbAOV8qt8a2a/aRXBIX0CSp6ThZlmVLUHQ55dApCnLPhlp ULHg== 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=C1Ka5ZLtI0sImJ7QdMPIBsKCCe+cYWp1x4Ddd/XjEbY=; b=BWMTHxeQ8wSBqmiJILPGgAzwyAZxpES5iFQw7BcjKNJxm9VpdXqw+8bEhgjQXInggZ HBNSmMvXoZ8GMgbc/LmST+dDuCl6XCg2AxyL35MF6Vt5auMKY+aOEtUWzo5RVuLUIPes d80TSOTFdbSoenVChTnWobtCs3z9seIIqu6/ZQJ3XY4HNqQSYXMFCKLYhPibaIkIZU4Z kiQbrXDJFRQkJgLMrVdnPIXjosky1xpaMDV44cDcHjRzHReUFEuedOxsluGAdMXG0yBK aSXIdRMoOHOm0lRCdqmWA13HjBAdgROEAnjEIEUuAlZPG0xNz28EahSEwaEnIJM9CqKK H4zw== X-Gm-Message-State: APjAAAVjWDwCROvVJaxD6g9SATBFXSR2tfkxxkKquEsQzt+qmpQrKkFs iP1SSr6JYOHP7ne07Qw5J2N4U6JVs8M= X-Google-Smtp-Source: APXvYqxETCq9IEX7Nvx7hiGBZJKXHCfr5U2MiADTJI9somL4zRJfuNoe6qIzpQeN9jxV6sYu42WKfw== X-Received: by 2002:ac8:38a9:: with SMTP id f38mr2558976qtc.108.1572003567130; Fri, 25 Oct 2019 04:39:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 04/12] linux-user/sparc: Use WREG constants in sparc/target_cpu.h Date: Fri, 25 Oct 2019 07:39:13 -0400 Message-Id: <20191025113921.9412-5-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::844 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 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, targe= t_ulong newtls) env->gregs[7] =3D newtls; } =20 -#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 --=20 2.17.1