[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] target/s390x: Use env_archcpu() in handle_diag_308()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 3/6] target/s390x: Use env_archcpu() in handle_diag_308() |
Date: |
Mon, 9 Oct 2023 13:02:36 +0200 |
When CPUArchState* is available (here CPUS390XState*), we
can use the fast env_archcpu() macro to get ArchCPU* (here
S390CPU*). The QOM cast S390_CPU() macro will be slower when
building with --enable-qom-cast-debug.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
target/s390x/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index 8ce18e08f3..27ffd48576 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -77,7 +77,7 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1,
uint64_t r3, uintptr_t ra)
{
bool valid;
CPUState *cs = env_cpu(env);
- S390CPU *cpu = S390_CPU(cs);
+ S390CPU *cpu = env_archcpu(env);
uint64_t addr = env->regs[r1];
uint64_t subcode = env->regs[r3];
IplParameterBlock *iplb;
--
2.41.0
- [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp(), (continued)
- [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 4/6] target/xtensa: Use env_archcpu() in update_c[compare|count](), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 3/6] target/s390x: Use env_archcpu() in handle_diag_308(),
Philippe Mathieu-Daudé <=
- [PATCH 5/6] target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr](), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 6/6] target/i386: Use env_archcpu() in simulate_[rdmsr/wrmsr](), Philippe Mathieu-Daudé, 2023/10/09
- Re: [PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env)), Philippe Mathieu-Daudé, 2023/10/20