[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/23] target/loongarch: Fix the meaning of ECFG reg's VS field
From: |
Richard Henderson |
Subject: |
[PULL 22/23] target/loongarch: Fix the meaning of ECFG reg's VS field |
Date: |
Mon, 4 Jul 2022 15:03:56 +0530 |
From: Xiaojuan Yang <yangxiaojuan@loongson.cn>
By the manual of LoongArch CSR, the VS field(18:16 bits) of
ECFG reg means that the number of instructions between each
exception entry is 2^VS.
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220701093407.2150607-9-yangxiaojuan@loongson.cn>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/loongarch/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 47c0bdd1ac..d2d4667a34 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -223,6 +223,10 @@ static void loongarch_cpu_do_interrupt(CPUState *cs)
env->CSR_CRMD = FIELD_DP64(env->CSR_CRMD, CSR_CRMD, PLV, 0);
env->CSR_CRMD = FIELD_DP64(env->CSR_CRMD, CSR_CRMD, IE, 0);
+ if (vec_size) {
+ vec_size = (1 << vec_size) * 4;
+ }
+
if (cs->exception_index == EXCCODE_INT) {
/* Interrupt */
uint32_t vector = 0;
--
2.34.1
- [PULL 11/23] target/loongarch: Adjust functions and structure to support user-mode, (continued)
- [PULL 11/23] target/loongarch: Adjust functions and structure to support user-mode, Richard Henderson, 2022/07/04
- [PULL 14/23] hw/intc/loongarch_pch_msi: Fix msi vector convertion, Richard Henderson, 2022/07/04
- [PULL 13/23] target/loongarch: Update README, Richard Henderson, 2022/07/04
- [PULL 15/23] hw/rtc/ls7a_rtc: Fix uninitialied bugs and toymatch writing function, Richard Henderson, 2022/07/04
- [PULL 16/23] hw/rtc/ls7a_rtc: Fix timer call back function, Richard Henderson, 2022/07/04
- [PULL 17/23] hw/rtc/ls7a_rtc: Remove unimplemented device in realized function, Richard Henderson, 2022/07/04
- [PULL 18/23] hw/rtc/ls7a_rtc: Add reset function, Richard Henderson, 2022/07/04
- [PULL 19/23] hw/rtc/ls7a_rtc: Fix rtc enable and disable function, Richard Henderson, 2022/07/04
- [PULL 20/23] hw/rtc/ls7a_rtc: Use tm struct pointer as arguments in toy_time_to_val(), Richard Henderson, 2022/07/04
- [PULL 21/23] hw/rtc/ls7a_rtc: Fix 'calculate' spelling errors, Richard Henderson, 2022/07/04
- [PULL 22/23] target/loongarch: Fix the meaning of ECFG reg's VS field,
Richard Henderson <=
- [PULL 23/23] target/loongarch: Add lock when writing timer clear reg, Richard Henderson, 2022/07/04
- Re: [PULL 00/23] loongarch64 patch queue, Richard Henderson, 2022/07/04