From nobody Tue Feb 10 11:32:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.50 as permitted sender) client-ip=209.85.221.50; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f50.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1629323741; cv=none; d=zohomail.com; s=zohoarc; b=PJEgcNsOVEro4a6rsDqap8MWF8CKu7gbUH2ZM+OIqfVJwTQnjEJEW4xYZSmbHaxNWfHQf3SpYgz4NH5wBc0TXaQwoAHL40bmUNo3dQyCinhqkECmnoodC6uJdYH+HEuEuCOy9dD3+Wb1r1qyrRehwKwqB5uN/JOwbcyV+EQ7lhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629323741; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U7gIJvBW4JKvt2ZTXiAxofETRvBakvpm4JnJyObeScc=; b=llY6H5L/6fnJOwsW2UoPD2idreYDdlsN7g/UaW+is/RN9QHcD047vLjdhEMP/OFc7tIIVXfoL+/VsydNBz0ZmtldEoT0Qmz6QcvsZDQtgvMGdALubQ21JqjcpEB8mXjlFeByXYubt1LaUenqoqoPbwIUXbuqTUeSw6olFX3GECg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.zohomail.com with SMTPS id 1629323741258756.3684536961625; Wed, 18 Aug 2021 14:55:41 -0700 (PDT) Received: by mail-wr1-f50.google.com with SMTP id f5so5694353wrm.13 for ; Wed, 18 Aug 2021 14:55:40 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id s13sm6153148wmc.47.2021.08.18.14.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 14:55:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U7gIJvBW4JKvt2ZTXiAxofETRvBakvpm4JnJyObeScc=; b=P1kAivs+7ir06Kz/gh/nRf5VDSF+kxIYM1hN6DlCeZZdIb/t+31ZtWn3iDg2I0hXDG NfxA65Knhg50FJvWCHkbo3f+RclzkIsOA1fG8huw3acXDnPjJIKH9G6ja2cK78M36a+X MSa2S0dRx4A/cB/e85QVjC1elss1UPspA5DO9wgR+9s6R3zAapuJkpqRMOPhGzlWZhK9 1rKutbMxj3gUpso+0bfJYyXgEHXcBYZcKG70phVVNjJ+/JHOntgSr0jpTHo6SpUdpfjx AHdD0COcy7lKahjlvzNzD09doyAuUcHFCHJp+pHnIF0iTPiT6M3z8VYPaj5Ps4HLqXv5 eZUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=U7gIJvBW4JKvt2ZTXiAxofETRvBakvpm4JnJyObeScc=; b=d686t83Jm/hwRW/dxtQPjmJ/kHO0tGuFuXrWhxzRoyNVRFSCr4yrrpfTOjfIt+yboo 3vyhk5q4139DxAhRoW9oWTJzQ6BcPfxQtLX9/QgiHBZBVWEB44LxfwpGfb57GDRdv6/r aMgUZKrWOr+KpLNXpzWFI1syYA9RPHoB+b6ppHdl8bq0tb53Iemz/B8JEZOhOYYRTw0K Ip0Zc+PGAauiOu3qymiLVz1h28dhqlJUhKDsg7dmMAqNFmshbhehX1RBR6z1MzB2iiE3 Q03o+QvK2GUAigW/7ARO/HoBMvuE79l5IjvzG4Sh2M0lC/i3tETA5odao6rR8D9WTLeC MLMg== X-Gm-Message-State: AOAM530Nu5KVjAK4BjagWOkz+jiCzvzWqlLZAH2xTQFZwm+90bI3KGTw xTLJhJ0E5HA689wzLVPRle8= X-Google-Smtp-Source: ABdhPJysBoUvLQx7LsiwCay9XbpezvBeCUWBfwDPbdROkMiId90Ckf6M9xeDS58toxAN7flIu9J/gg== X-Received: by 2002:adf:e6cc:: with SMTP id y12mr13669457wrm.200.1629323739485; Wed, 18 Aug 2021 14:55:39 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Aurelien Jarno , Richard Henderson , Aleksandar Rikalo , Jiaxun Yang Subject: [PATCH v2 4/5] target/mips: Store CP0_Config0 in DisasContext Date: Wed, 18 Aug 2021 23:55:16 +0200 Message-Id: <20210818215517.2560994-5-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210818215517.2560994-1-f4bug@amsat.org> References: <20210818215517.2560994-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1629323743439100001 Most TCG helpers only have access to a DisasContext pointer, not CPUMIPSState. Store a copy of CPUMIPSState::CP0_Config0 in DisasContext so we can access it from TCG helpers. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20210818164321.2474534-5-f4bug@amsat.org> --- target/mips/tcg/translate.h | 1 + target/mips/tcg/translate.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index bb0a6b8d74f..9d325c836aa 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -18,6 +18,7 @@ typedef struct DisasContext { target_ulong page_start; uint32_t opcode; uint64_t insn_flags; + int32_t CP0_Config0; int32_t CP0_Config1; int32_t CP0_Config2; int32_t CP0_Config3; diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index a58d50e40e2..572104e2cc2 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -16034,6 +16034,7 @@ static void mips_tr_init_disas_context(DisasContext= Base *dcbase, CPUState *cs) ctx->page_start =3D ctx->base.pc_first & TARGET_PAGE_MASK; ctx->saved_pc =3D -1; ctx->insn_flags =3D env->insn_flags; + ctx->CP0_Config0 =3D env->CP0_Config0; ctx->CP0_Config1 =3D env->CP0_Config1; ctx->CP0_Config2 =3D env->CP0_Config2; ctx->CP0_Config3 =3D env->CP0_Config3; --=20 2.31.1