aboutsummaryrefslogtreecommitdiff
path: root/target/nios2/cpu.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-12-20 18:50:06 -0800
committerLaurent Vivier <laurent@vivier.eu>2022-01-06 11:40:52 +0100
commit87d7bfdba1d4a963e9a89052c38a32327fa25473 (patch)
tree66821d335d044d60874d21e5bb09dd4054b275d2 /target/nios2/cpu.h
parente13685a6e5c92612c6eeeb8a17c052539c0f9da5 (diff)
linux-user/nios2: Properly emulate EXCP_TRAP
The real kernel has to load the instruction and extract the imm5 field; for qemu, modify the translator to do this. The use of R_AT for this in cpu_loop was a bug. Handle the other trap numbers as per the kernel's trap_table. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20211221025012.1057923-2-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'target/nios2/cpu.h')
-rw-r--r--target/nios2/cpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
index 1a69ed7a49..d2ba0c5bbd 100644
--- a/target/nios2/cpu.h
+++ b/target/nios2/cpu.h
@@ -160,9 +160,9 @@ struct CPUNios2State {
#if !defined(CONFIG_USER_ONLY)
Nios2MMU mmu;
-
uint32_t irq_pending;
#endif
+ int error_code;
};
/**