[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/62] target/loongarch: Replace `tb_pc()` with `tb->pc`
From: |
Richard Henderson |
Subject: |
[PULL 25/62] target/loongarch: Replace `tb_pc()` with `tb->pc` |
Date: |
Tue, 28 Feb 2023 16:56:06 -1000 |
From: Anton Johansson via <qemu-devel@nongnu.org>
Signed-off-by: Anton Johansson <anjo@rev.ng>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230227135202.9710-22-anjo@rev.ng>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/loongarch/cpu.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 290ab4d526..e5efe4ebd7 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -18,6 +18,7 @@
#include "fpu/softfloat-helpers.h"
#include "cpu-csr.h"
#include "sysemu/reset.h"
+#include "tcg/tcg.h"
const char * const regnames[32] = {
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
@@ -321,7 +322,8 @@ static void loongarch_cpu_synchronize_from_tb(CPUState *cs,
LoongArchCPU *cpu = LOONGARCH_CPU(cs);
CPULoongArchState *env = &cpu->env;
- env->pc = tb_pc(tb);
+ tcg_debug_assert(!(cs->tcg_cflags & CF_PCREL));
+ env->pc = tb->pc;
}
static void loongarch_restore_state_to_opc(CPUState *cs,
@@ -599,7 +601,7 @@ static ObjectClass *loongarch_cpu_class_by_name(const char
*cpu_model)
oc = object_class_by_name(cpu_model);
if (!oc) {
- g_autofree char *typename
+ g_autofree char *typename
= g_strdup_printf(LOONGARCH_CPU_TYPE_NAME("%s"), cpu_model);
oc = object_class_by_name(typename);
if (!oc) {
--
2.34.1
- [PULL 17/62] target/tricore: Replace `tb_pc()` with `tb->pc`, (continued)
- [PULL 17/62] target/tricore: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 21/62] target/riscv: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 15/62] accel/tcg: Move jmp-cache `CF_PCREL` checks to caller, Richard Henderson, 2023/02/28
- [PULL 19/62] target/sh4: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 22/62] target/openrisc: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 23/62] target/mips: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 24/62] target/microblaze: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 28/62] target/hexagon: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 30/62] target/arm: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 32/62] tcg: Adjust TCGContext.temps_in_use check, Richard Henderson, 2023/02/28
- [PULL 25/62] target/loongarch: Replace `tb_pc()` with `tb->pc`,
Richard Henderson <=
- [PULL 31/62] include/exec: Remove `tb_pc()`, Richard Henderson, 2023/02/28
- [PULL 33/62] accel/tcg: Pass max_insn to gen_intermediate_code by pointer, Richard Henderson, 2023/02/28
- [PULL 29/62] target/avr: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 34/62] accel/tcg: Use more accurate max_insns for tb_overflow, Richard Henderson, 2023/02/28
- [PULL 35/62] tcg: Remove branch-to-next regardless of reference count, Richard Henderson, 2023/02/28
- [PULL 26/62] target/i386: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 27/62] target/hppa: Replace `tb_pc()` with `tb->pc`, Richard Henderson, 2023/02/28
- [PULL 36/62] tcg: Rename TEMP_LOCAL to TEMP_TB, Richard Henderson, 2023/02/28
- [PULL 37/62] tcg: Use noinline for major tcg_gen_code subroutines, Richard Henderson, 2023/02/28
- [PULL 38/62] tcg: Add liveness_pass_0, Richard Henderson, 2023/02/28