From nobody Tue Feb 10 07:42:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) client-ip=209.85.221.41; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f41.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1629305024; cv=none; d=zohomail.com; s=zohoarc; b=mVVNjkOkIqvxzrnhXGOn+n4OYXRmepiyjXejjAXNVjv10PUEuYGIxsE1A85P1Kd3aqpOhAh5ffWA5y4W+cPFQVuixiJl9NORJDKTAmPWvgjiLHIcwi3Xp9BZadr+AakObEY2jTJ7IurNPHlQxwlaQ+O+jdrknbmoQ6lKkx2IkGc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629305024; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=lP+nOsNKl2jJJvhazgJeN/uzp96XdmFpJ71cEs//Ybg=; b=LIoVlUXF8qMFQGz6xY9H9xM4ya/phAnL0TScVMFJc64lMDxM5TwLJFjto2ZVrGzTMYCwvLsHUTLVSyrvH5bEO3kyM5kIKTfvhAPoVr9Lhi2CppPQKZrK52KvZ7TaRYcT40blr8mYN4ttnA1v4195Kq3GIgUYDdGvqCIK8cMSEYA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.41 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.zohomail.com with SMTPS id 1629305024196970.5400439103945; Wed, 18 Aug 2021 09:43:44 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id q6so4498191wrv.6 for ; Wed, 18 Aug 2021 09:43:43 -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 k22sm290625wmi.47.2021.08.18.09.43.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 09:43:41 -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=lP+nOsNKl2jJJvhazgJeN/uzp96XdmFpJ71cEs//Ybg=; b=uChrVUtB5vda4O/9j58UH68PblLRvShvlGmi+i2gppSt6UF/5+qewJhnABgJuEfq36 c8Qg7sRoNby0lAgsjvR+Fms/nDv9WwCR0VrNAQMCXvdWG9mlDWVhaLksUuWFR93DHl1j njcD6f6UaJFcjNE+92Fkw7C0/4kcDfeKSORHh8GqFtmgLBYqpIGnv9Lws8MW7UR3FkLS S38fYNuFcu86jDEw/qTHlswhT68R7bhiyl3xWoQcXEq23aEwqw1b4CKdrAtQx3Bv+n2z YmS90MJxWq7OTR9ApxOtqEeUMyKXG8yQq7yR8/iILq3VcVQqD14n83skjnw9ERF4OXBS jLaA== 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=lP+nOsNKl2jJJvhazgJeN/uzp96XdmFpJ71cEs//Ybg=; b=rJOR3gaYr6d1JOfhVKhyMmznIkFpxBsf47+r0QeM2yjBYJs2FfszbP6fuewI/TBFGu GtxX+TPuxKxirJdvflaxWrEpWQkoknzkcjrVIdxSMMd74101WOK3f8fqcyr6Sw4arVtl 6A2S10vXArt8X1GL6RNhX3yiFHOBcZogjVaU00xZIpCWi5q62PlWsWI0d6KZ+T5XEJxp gBJoSg7p6bPgZczc4BZVJpcloWbVFWbJdEK/Nd6a7dWF8mUTi2LlHUoxxOx9/FKLCBhe OBcAcwBk5nyOe9VjHMYtgkMk6NTrfHHE0Dc5h58FZsIYR52F97pONfZB02tpwlWu5Vht BSug== X-Gm-Message-State: AOAM532C9LeOvjBQPd0xNJJdezVR03o+XfNnabT7NOsCkpK1oIA+4i7N vHUI+Xa7DXFdh/3b4D8AiQk= X-Google-Smtp-Source: ABdhPJxkxfDMrMnL8n8g5bMz8dZXN1YO+x1LXxi8t/q8V3ydmM1En5rl+VpLdHdGXpW42p9D4MeAlQ== X-Received: by 2002:adf:fb44:: with SMTP id c4mr11527211wrs.179.1629305022423; Wed, 18 Aug 2021 09:43:42 -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: Jiaxun Yang , Thomas Huth , Aurelien Jarno , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , Aleksandar Rikalo Subject: [PATCH 4/5] target/mips: Store CP0_Config0 in DisasContext Date: Wed, 18 Aug 2021 18:43:20 +0200 Message-Id: <20210818164321.2474534-5-f4bug@amsat.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210818164321.2474534-1-f4bug@amsat.org> References: <20210818164321.2474534-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: 1629305025092100001 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 --- 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