target/m68k: Pass semihosting arg to exit
Instead of using d0 (the semihost function number), use d1 (the provide exit status). Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20230802161914.395443-2-keithp@keithp.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
7048fc59ef
commit
5fae5110ee
@ -132,8 +132,8 @@ void do_m68k_semihosting(CPUM68KState *env, int nr)
|
|||||||
args = env->dregs[1];
|
args = env->dregs[1];
|
||||||
switch (nr) {
|
switch (nr) {
|
||||||
case HOSTED_EXIT:
|
case HOSTED_EXIT:
|
||||||
gdb_exit(env->dregs[0]);
|
gdb_exit(env->dregs[1]);
|
||||||
exit(env->dregs[0]);
|
exit(env->dregs[1]);
|
||||||
|
|
||||||
case HOSTED_OPEN:
|
case HOSTED_OPEN:
|
||||||
GET_ARG(0);
|
GET_ARG(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user