]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/s390x: Use env_archcpu() in handle_diag_308()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 9 Oct 2023 10:42:42 +0000 (12:42 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 7 Nov 2023 11:13:27 +0000 (12:13 +0100)
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20231009110239.66778-4-philmd@linaro.org>

target/s390x/diag.c

index 8ce18e08f34fbe4df42e3bbdf80e91d11330bc1e..27ffd48576d3eccb7b241a7734bac5976b845f1b 100644 (file)
@@ -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;