[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/22] target/s390x: Move cpu_get_tb_cpu_state out of line
From: |
Thomas Huth |
Subject: |
[PULL 02/22] target/s390x: Move cpu_get_tb_cpu_state out of line |
Date: |
Wed, 29 May 2024 12:54:34 +0200 |
From: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20240502054417.234340-3-richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
target/s390x/cpu.h | 23 ++---------------------
target/s390x/cpu.c | 22 ++++++++++++++++++++++
2 files changed, 24 insertions(+), 21 deletions(-)
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 414680eed1..950f84f316 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -413,27 +413,8 @@ static inline int s390x_env_mmu_index(CPUS390XState *env,
bool ifetch)
#include "tcg/tcg_s390x.h"
-static inline void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
- uint64_t *cs_base, uint32_t *flags)
-{
- if (env->psw.addr & 1) {
- /*
- * Instructions must be at even addresses.
- * This needs to be checked before address translation.
- */
- env->int_pgm_ilen = 2; /* see s390_cpu_tlb_fill() */
- tcg_s390_program_interrupt(env, PGM_SPECIFICATION, 0);
- }
- *pc = env->psw.addr;
- *cs_base = env->ex_value;
- *flags = (env->psw.mask >> FLAG_MASK_PSW_SHIFT) & FLAG_MASK_PSW;
- if (env->cregs[0] & CR0_AFP) {
- *flags |= FLAG_MASK_AFP;
- }
- if (env->cregs[0] & CR0_VECTOR) {
- *flags |= FLAG_MASK_VECTOR;
- }
-}
+void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
+ uint64_t *cs_base, uint32_t *flags);
#endif /* CONFIG_TCG */
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index f7194534ae..a8428b5a1e 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -324,6 +324,28 @@ static void s390_cpu_reset_full(DeviceState *dev)
#ifdef CONFIG_TCG
#include "hw/core/tcg-cpu-ops.h"
+void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
+ uint64_t *cs_base, uint32_t *flags)
+{
+ if (env->psw.addr & 1) {
+ /*
+ * Instructions must be at even addresses.
+ * This needs to be checked before address translation.
+ */
+ env->int_pgm_ilen = 2; /* see s390_cpu_tlb_fill() */
+ tcg_s390_program_interrupt(env, PGM_SPECIFICATION, 0);
+ }
+ *pc = env->psw.addr;
+ *cs_base = env->ex_value;
+ *flags = (env->psw.mask >> FLAG_MASK_PSW_SHIFT) & FLAG_MASK_PSW;
+ if (env->cregs[0] & CR0_AFP) {
+ *flags |= FLAG_MASK_AFP;
+ }
+ if (env->cregs[0] & CR0_VECTOR) {
+ *flags |= FLAG_MASK_VECTOR;
+ }
+}
+
static const TCGCPUOps s390_tcg_ops = {
.initialize = s390x_translate_init,
.restore_state_to_opc = s390x_restore_state_to_opc,
--
2.45.1
- [PULL 00/22] s390x, build-oss-fuzz and Clang -fsanitize=undefined fixes, Thomas Huth, 2024/05/29
- [PULL 01/22] target/s390x: Do not use unwind for per_check_exception, Thomas Huth, 2024/05/29
- [PULL 03/22] target/s390x: Update CR9 bits, Thomas Huth, 2024/05/29
- [PULL 02/22] target/s390x: Move cpu_get_tb_cpu_state out of line,
Thomas Huth <=
- [PULL 05/22] target/s390x: Disable conditional branch-to-next for PER, Thomas Huth, 2024/05/29
- [PULL 04/22] target/s390x: Record separate PER bits in TB flags, Thomas Huth, 2024/05/29
- [PULL 06/22] target/s390x: Introduce help_goto_indirect, Thomas Huth, 2024/05/29
- [PULL 07/22] target/s390x: Simplify help_branch, Thomas Huth, 2024/05/29
- [PULL 08/22] target/s390x: Split per_breaking_event from per_branch_*, Thomas Huth, 2024/05/29
- [PULL 09/22] target/s390x: Raise exception from helper_per_branch, Thomas Huth, 2024/05/29
- [PULL 10/22] target/s390x: Raise exception from per_store_real, Thomas Huth, 2024/05/29
- [PULL 11/22] target/s390x: Fix helper_per_ifetch flags, Thomas Huth, 2024/05/29
- [PULL 12/22] target/s390x: Simplify per_ifetch, per_check_exception, Thomas Huth, 2024/05/29
- [PULL 13/22] target/s390x: Adjust check of noreturn in translate_one, Thomas Huth, 2024/05/29