From nobody Tue Feb 10 08:41:05 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.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=1598890422; cv=none; d=zohomail.com; s=zohoarc; b=ZUJZ/wb+Iw8iMuoy7nfR7T60tLlxyOc17JLFf7itTl5F8tHOVfoGP1EQqlOYepXa9E35IPnscAEEjvd+UkLQxPKzsiKO9JxxGNSJPnDlZNu6UuZY08gkPSSPJVMnoVJUkMXyUBLe2EfGeL12dyCvgnfZuWU8WSQ1xdMg1oaqhFs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598890422; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2lk+ZBWQv/ZXsPrb8oTjpivGovxY9zx2pXrc7J4dxPM=; b=oFTniCCbtxvAprbMd3NFak7Ihcpaq4t0v34oVYoCw4YBFiSAslVKbFVxCR5O72QR2cLiwirqI992GwtzIn+FxFc5wpvLG4gmmT0Phqp+7TPnqEA8s41y6JFjmVjeA8tJQgwWxVtDFsoxdUzmPGAsda368WoEALSmhCahs5AgsDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.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 1598890422189356.75645685316783; Mon, 31 Aug 2020 09:13:42 -0700 (PDT) Received: from localhost ([::1]:60418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kCmRB-00026c-Ci for importer@patchew.org; Mon, 31 Aug 2020 12:13:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kCmK5-0003ih-Sm for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:06:21 -0400 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:38483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kCmK3-0005wO-V1 for qemu-devel@nongnu.org; Mon, 31 Aug 2020 12:06:21 -0400 Received: by mail-pl1-x643.google.com with SMTP id t11so3245408plr.5 for ; Mon, 31 Aug 2020 09:06:19 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id gt13sm17218pjb.43.2020.08.31.09.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 09:06:17 -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 :mime-version:content-transfer-encoding; bh=2lk+ZBWQv/ZXsPrb8oTjpivGovxY9zx2pXrc7J4dxPM=; b=X2lRUWSfLxP75aJVqWsUnA87fqiUroI4bDp2dCk9ctGSgd7fwNJ0nrQSXDDQhicmLM DN8qq9+nAZmNOlHOBNQROdqwUnyVGfD9P8IHPk2aacLpZ3AmnBVbfKCDV8wmnnmFIXeG mW9GcR35z6BmQnrEX7VAJn1hNn/Y3nR/hS4YjkxmcR35npPmJuCI6wi0AnJW9qzBS0AK /jcHlQTNeffUf7tBFz0++7f5F53D7jb+VTLNk1vwsUUJOelXX6ZUxCgXBXSmw7hc5qii M7Em6nvUAnQkhEYA8EadPs6TntAJ7J8kWTs4ANubbw3Dn9seG9/+efRmw4No8yxSrDIB 4xOA== 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:mime-version:content-transfer-encoding; bh=2lk+ZBWQv/ZXsPrb8oTjpivGovxY9zx2pXrc7J4dxPM=; b=hBiRE3w4t4ERTNFqiEMaOyMPnTXvNFPbZhavTmbrJ9ve/bkQIrSo20WIiHSNfmPJGB d6YaE/XsV9tuBDm9lRTbTKKIaP0fNcDDdBtWYxKd3T/vuK1+b6lBNhRbs249J4W3jcwk DpdaxiC8IamUEbneAbT5gVACgetTK8+HRgXmG76yaB7JX8TpAsKdCCYpGIlOh/2kmpEV ZJYLUpNKXDYqcIWxdQhLz5qNbXfNSMpK+bz3MdMIxE8aX1jr7IKDXkA6AfgJENnfr9Bs T2vqDB3dqluzeCngIp3BMhbujHoU1pCrhV9yiFt/L//N6QyZuF1ggDDxI6bMJEUWVeLG plkw== X-Gm-Message-State: AOAM530s2W2Hzrbes+Zx4tVhiY8uj7DMpi0ymHs50N66v6UDo5387cI3 JPX3llMF07P/ec59uKzAtaPjP3VIumvUZQ== X-Google-Smtp-Source: ABdhPJwBKVnswPYj4NMtd55sGUZzce2fHd5YUjdo/JvDPeBVP/GXgi4iHIWspH7RsbbPhpYmnrxKTQ== X-Received: by 2002:a17:902:708b:: with SMTP id z11mr1577952plk.326.1598889978061; Mon, 31 Aug 2020 09:06:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 10/76] target/microblaze: Split out BTR from env->sregs Date: Mon, 31 Aug 2020 09:04:55 -0700 Message-Id: <20200831160601.833692-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200831160601.833692-1-richard.henderson@linaro.org> References: <20200831160601.833692-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=2607:f8b0:4864:20::643; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x643.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: "Edgar E . Iglesias" , peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Continue eliminating the sregs array in favor of individual members. Does not correct the width of BTR, yet. Tested-by: Edgar E. Iglesias Reviewed-by: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/cpu.h | 1 + target/microblaze/gdbstub.c | 4 ++-- target/microblaze/helper.c | 4 ++-- target/microblaze/translate.c | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index bcafef99b0..deddb47abb 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -241,6 +241,7 @@ struct CPUMBState { uint64_t ear; uint64_t esr; uint64_t fsr; + uint64_t btr; uint64_t sregs[14]; float_status fp_status; /* Stack protectors. Yes, it's a hw feature. */ diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c index 2634ce49fc..cde8c169bf 100644 --- a/target/microblaze/gdbstub.c +++ b/target/microblaze/gdbstub.c @@ -74,7 +74,7 @@ int mb_cpu_gdb_read_register(CPUState *cs, GByteArray *me= m_buf, int n) val =3D env->fsr; break; case GDB_BTR: - val =3D env->sregs[SR_BTR]; + val =3D env->btr; break; case GDB_PVR0 ... GDB_PVR11: /* PVR12 is intentionally skipped */ @@ -130,7 +130,7 @@ int mb_cpu_gdb_write_register(CPUState *cs, uint8_t *me= m_buf, int n) env->fsr =3D tmp; break; case GDB_BTR: - env->sregs[SR_BTR] =3D tmp; + env->btr =3D tmp; break; case GDB_PVR0 ... GDB_PVR11: /* PVR12 is intentionally skipped */ diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index ea290be780..b240dc76f6 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c @@ -132,7 +132,7 @@ void mb_cpu_do_interrupt(CPUState *cs) /* Exception breaks branch + dslot sequence? */ if (env->iflags & D_FLAG) { env->esr |=3D 1 << 12 ; - env->sregs[SR_BTR] =3D env->btarget; + env->btr =3D env->btarget; } =20 /* Disable the MMU. */ @@ -160,7 +160,7 @@ void mb_cpu_do_interrupt(CPUState *cs) if (env->iflags & D_FLAG) { D(qemu_log("D_FLAG set at exception bimm=3D%d\n", env->bim= m)); env->esr |=3D 1 << 12 ; - env->sregs[SR_BTR] =3D env->btarget; + env->btr =3D env->btarget; =20 /* Reexecute the branch. */ env->regs[17] -=3D 4; diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index c58c49ea8f..469e1f103a 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -1811,7 +1811,7 @@ void mb_cpu_dump_state(CPUState *cs, FILE *f, int fla= gs) "rbtr=3D%" PRIx64 "\n", env->msr, env->esr, env->ear, env->debug, env->imm, env->iflags, env->fsr, - env->sregs[SR_BTR]); + env->btr); qemu_fprintf(f, "btaken=3D%d btarget=3D%" PRIx64 " mode=3D%s(saved=3D%= s) " "eip=3D%d ie=3D%d\n", env->btaken, env->btarget, @@ -1879,8 +1879,10 @@ void mb_tcg_init(void) tcg_global_mem_new_i64(cpu_env, offsetof(CPUMBState, esr), "resr"); cpu_SR[SR_FSR] =3D tcg_global_mem_new_i64(cpu_env, offsetof(CPUMBState, fsr), "rfsr"); + cpu_SR[SR_BTR] =3D + tcg_global_mem_new_i64(cpu_env, offsetof(CPUMBState, btr), "rbtr"); =20 - for (i =3D SR_FSR + 1; i < ARRAY_SIZE(cpu_SR); i++) { + for (i =3D SR_BTR + 1; i < ARRAY_SIZE(cpu_SR); i++) { cpu_SR[i] =3D tcg_global_mem_new_i64(cpu_env, offsetof(CPUMBState, sregs[i]), special_regnames[i]); --=20 2.25.1