From nobody Tue Feb 10 23:59:05 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1553816290434939.1726656640024; Thu, 28 Mar 2019 16:38:10 -0700 (PDT) Received: from localhost ([127.0.0.1]:43414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eb1-0000Uq-Dr for importer@patchew.org; Thu, 28 Mar 2019 19:38:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9eKq-0001dn-N0 for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9e4c-000364-EY for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:41 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:40993) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9e4b-00035V-6S for qemu-devel@nongnu.org; Thu, 28 Mar 2019 19:04:37 -0400 Received: by mail-pf1-x444.google.com with SMTP id 188so76039pfd.8 for ; Thu, 28 Mar 2019 16:04:37 -0700 (PDT) Received: from cloudburst.ASUS (cpe-66-75-72-255.hawaii.res.rr.com. [66.75.72.255]) by smtp.gmail.com with ESMTPSA id f1sm280911pgl.35.2019.03.28.16.04.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Mar 2019 16:04:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=mkqdyW5/3Htii3Wd/GiAKdhmnJwDMiTansAHma9RvjA=; b=U8BFFBIhQZK5UIw5o64o4tNuRHoTEIeXz9wTZ6zJG2IqO9iCf9+pw79egwzitBNBL+ sOBRPgVnrghUqkP8hGWpbvwM6hU6c/ZOc6OfjJ7B3UD0/4VfaPwiXnssbkHKQi2Zb7iV lANDekogZVF0rvSxcNnwHgKfK3HF5V6TEtadGNlZX/OJOpi5LyCSZjTZEUkpU2EwZSAs FKrFRQXbFjM6pt7vF9rRXhGakV2sKyiDad5U1VwRBh1fr4T9Xh5pHTE3PZhLHTJ+yFQQ HdtvnzOuGBTSonsPPw/kYvLzdT5OB4QY74BbvKadH9qzmdXZdxxZhwFjcRWpbkZBRwB6 4KbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=mkqdyW5/3Htii3Wd/GiAKdhmnJwDMiTansAHma9RvjA=; b=uBB6F+hiM2gNDkV4WR/eIH/fb+j3If16XlhUWpGX/s6UTraUR11afrVFqF2vBfBFRL tH0UgrrwTbXgDqoc+JOZtaI+tdpcBCcOwfhyl47RYl1gr75+njoQcMyY2oRM0MMblQEM zGeE9SxNlbObFs/FpZVCzZ8hBQu71ZnLw28kbYcYCLyRUL8qyg18jiGRMs2yCVZzgVJd O/97fGSlD3n8ky1uUz7PBDw2mN+IMLJHPxEydg9QyyDE+e4UkKO3YcM06x7gAokYwEPK dsppUHZU5keOGiEJdDAEQ2+75mWFMwRd2COjDyDqHDRUVybBp+JF6KYR9mUUn8WZQLIc /U6g== X-Gm-Message-State: APjAAAUTrseQwQwNS2kUG6zoKFd2FA2ZzHWU8YkaJiAAzWYnucOg4iAF E5k0asFTSm3BxT/tcg23JhlJqn9iSKg= X-Google-Smtp-Source: APXvYqwvs49sq4PKCq7aQ8EfbNlO2egDtLiRBU+hzDGGq4+jFfmBF1MPPgUxeMEiBFpUDiYkbXQdWQ== X-Received: by 2002:a62:75d7:: with SMTP id q206mr20281085pfc.213.1553814275997; Thu, 28 Mar 2019 16:04:35 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2019 13:03:45 -1000 Message-Id: <20190328230404.12909-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190328230404.12909-1-richard.henderson@linaro.org> References: <20190328230404.12909-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::444 Subject: [Qemu-devel] [PATCH for-4.1 v2 17/36] target/moxie: Use env_cpu, env_archcpu 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: , 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" Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/moxie/cpu.h | 5 ----- target/moxie/helper.c | 6 +++--- target/moxie/translate.c | 2 +- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h index c050d6e15d..71e7cf0f08 100644 --- a/target/moxie/cpu.h +++ b/target/moxie/cpu.h @@ -90,11 +90,6 @@ typedef struct MoxieCPU { CPUMoxieState env; } MoxieCPU; =20 -static inline MoxieCPU *moxie_env_get_cpu(CPUMoxieState *env) -{ - return container_of(env, MoxieCPU, env); -} - #define ENV_OFFSET offsetof(MoxieCPU, env) =20 void moxie_cpu_do_interrupt(CPUState *cs); diff --git a/target/moxie/helper.c b/target/moxie/helper.c index f3d8ee7d6b..a22870228c 100644 --- a/target/moxie/helper.c +++ b/target/moxie/helper.c @@ -42,7 +42,7 @@ void tlb_fill(CPUState *cs, target_ulong addr, int size, =20 void helper_raise_exception(CPUMoxieState *env, int ex) { - CPUState *cs =3D CPU(moxie_env_get_cpu(env)); + CPUState *cs =3D env_cpu(env); =20 cs->exception_index =3D ex; /* Stash the exception type. */ @@ -79,7 +79,7 @@ uint32_t helper_udiv(CPUMoxieState *env, uint32_t a, uint= 32_t b) =20 void helper_debug(CPUMoxieState *env) { - CPUState *cs =3D CPU(moxie_env_get_cpu(env)); + CPUState *cs =3D env_cpu(env); =20 cs->exception_index =3D EXCP_DEBUG; cpu_loop_exit(cs); @@ -89,7 +89,7 @@ void helper_debug(CPUMoxieState *env) =20 void moxie_cpu_do_interrupt(CPUState *cs) { - CPUState *cs =3D CPU(moxie_env_get_cpu(env)); + CPUState *cs =3D env_cpu(env); =20 cs->exception_index =3D -1; } diff --git a/target/moxie/translate.c b/target/moxie/translate.c index 68ca223e22..bb25a3dee7 100644 --- a/target/moxie/translate.c +++ b/target/moxie/translate.c @@ -816,7 +816,7 @@ static int decode_opc(MoxieCPU *cpu, DisasContext *ctx) void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) { CPUMoxieState *env =3D cs->env_ptr; - MoxieCPU *cpu =3D moxie_env_get_cpu(env); + MoxieCPU *cpu =3D env_archcpu(env); DisasContext ctx; target_ulong pc_start; int num_insns, max_insns; --=20 2.17.1