target-xtensa: return ENOSYS for unimplemented simcalls
This prevents guest from proceeding with uninitialised garbage returned from unimplemented simcalls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
0232cd355d
commit
e7eee62a90
|
@ -218,6 +218,8 @@ void HELPER(simcall)(CPUXtensaState *env)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
qemu_log("%s(%d): not implemented\n", __func__, regs[2]);
|
qemu_log("%s(%d): not implemented\n", __func__, regs[2]);
|
||||||
|
regs[2] = -1;
|
||||||
|
regs[3] = ENOSYS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue