]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user/nios2: Fix EA vs PC confusion
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 21 Dec 2021 02:50:10 +0000 (18:50 -0800)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 6 Jan 2022 10:40:52 +0000 (11:40 +0100)
commit8222d8ba6f62aaab2da81618e56c5055ccbc7be0
tree15324f4ac2aa7c95ccf22147a92c4ff76bc8a2ce
parentf5ef0e518d0331920cef0fb6f6c1141695ffab7b
linux-user/nios2: Fix EA vs PC confusion

The real kernel will talk about the user PC as EA,
because that's where the hardware will have copied it,
and where it expects to put it to then use ERET.
But qemu does not emulate all of the exception stuff
while emulating user-only.  Manipulate PC directly.

This fixes signal entry and return, and eliminates
some slight confusion from target_cpu_copy_regs.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211221025012.1057923-6-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/nios2/cpu_loop.c
linux-user/nios2/signal.c