[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 03/12] target/ppc: powerpc_excp: Move system call vectored code
From: |
Fabiano Rosas |
Subject: |
[RFC v2 03/12] target/ppc: powerpc_excp: Move system call vectored code together |
Date: |
Mon, 20 Dec 2021 15:18:54 -0300 |
Now that 'vector' is known before calling the interrupt-specific setup
code, we can move all of the scv setup into one place.
No functional change intended.
Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
target/ppc/excp_helper.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 14fd0213a0..7bdc1e8410 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -549,6 +549,11 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int
excp_model, int excp)
env->nip += 4;
new_msr |= env->msr & ((target_ulong)1 << MSR_EE);
new_msr |= env->msr & ((target_ulong)1 << MSR_RI);
+
+ vector += lev * 0x20;
+
+ env->lr = env->nip;
+ env->ctr = msr;
break;
case POWERPC_EXCP_FPU: /* Floating-point unavailable exception */
case POWERPC_EXCP_APU: /* Auxiliary processor unavailable */
@@ -862,14 +867,6 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int
excp_model, int excp)
/* Save MSR */
env->spr[srr1] = msr;
-
-#if defined(TARGET_PPC64)
- } else {
- vector += lev * 0x20;
-
- env->lr = env->nip;
- env->ctr = msr;
-#endif
}
/* This can update new_msr and vector if AIL applies */
--
2.33.1
- Re: [RFC v2 02/12] target/ppc: powerpc_excp: Set vector earlier, (continued)
- [RFC v2 01/12] target/ppc: powerpc_excp: Set alternate SRRs directly, Fabiano Rosas, 2021/12/20
- [RFC v2 04/12] target/ppc: powerpc_excp: Stop passing excp_model around, Fabiano Rosas, 2021/12/20
- [RFC v2 03/12] target/ppc: powerpc_excp: Move system call vectored code together,
Fabiano Rosas <=
- [RFC v2 07/12] target/ppc: Introduce PPCInterrupt, Fabiano Rosas, 2021/12/20
- [RFC v2 05/12] target/ppc: powerpc_excp: Standardize arguments to interrupt code, Fabiano Rosas, 2021/12/20
- [RFC v2 10/12] target/ppc: Split powerpc_excp into book3s, booke and 32 bit, Fabiano Rosas, 2021/12/20
- [RFC v2 09/12] target/ppc: Use common code for Hypervisor interrupts, Fabiano Rosas, 2021/12/20
- [RFC v2 06/12] target/ppc: Extract interrupt routines into a new file, Fabiano Rosas, 2021/12/20
- [RFC v2 12/12] target/ppc: Do not enable all interrupts when running KVM, Fabiano Rosas, 2021/12/20