Skip to content
Snippets Groups Projects
Commit 46233676 authored by Xiaojuan Yang's avatar Xiaojuan Yang Committed by Richard Henderson
Browse files

target/loongarch: Fix the meaning of ECFG reg's VS field


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: default avatarXiaojuan Yang <yangxiaojuan@loongson.cn>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <20220701093407.2150607-9-yangxiaojuan@loongson.cn>
Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent 59e52dcf
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment