]> www.infradead.org Git - users/dwmw2/qemu.git/commit
linux-user/nios2: Properly emulate EXCP_TRAP
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 21 Dec 2021 02:50:06 +0000 (18:50 -0800)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 6 Jan 2022 10:40:52 +0000 (11:40 +0100)
commit87d7bfdba1d4a963e9a89052c38a32327fa25473
tree66821d335d044d60874d21e5bb09dd4054b275d2
parente13685a6e5c92612c6eeeb8a17c052539c0f9da5
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>
linux-user/nios2/cpu_loop.c
target/nios2/cpu.h
target/nios2/translate.c