target/nios2: Pass semihosting arg to exit
authorKeith Packard <keithp@keithp.com>
Tue, 1 Aug 2023 15:22:45 +0000 (08:22 -0700)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 1 Aug 2023 21:52:23 +0000 (23:52 +0200)
commitc11d5bdae79a8edaf00dfcb2e49c064a50c67671
treebb9912fa2a57a739de1ebe84136a8997016141c4
parent7a06a8fec9df3b6a0f72e7b37dff0969430aab96
target/nios2: Pass semihosting arg to exit

Instead of using R_ARG0 (the semihost function number), use R_ARG1
(the provided exit status).

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230801152245.332749-1-keithp@keithp.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
target/nios2/nios2-semi.c