From 3b3c1694cfd394b73de426edebdbf90c28f664fd Mon Sep 17 00:00:00 2001 From: Leon Alrae Date: Fri, 19 Jun 2015 11:08:43 +0100 Subject: target-mips: add Unified Hosting Interface (UHI) support Add UHI semihosting support for MIPS. QEMU run with "-semihosting" option will alter the behaviour of SDBBP 1 instruction -- UHI operation will be called instead of generating a debug exception. Also tweak Malta's pseudo-bootloader. On CPU reset the $4 register is set to -1 if semihosting arguments are passed to indicate that the UHI operations should be used to obtain input arguments. Signed-off-by: Leon Alrae Reviewed-by: Aurelien Jarno --- target-mips/helper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'target-mips/helper.h') diff --git a/target-mips/helper.h b/target-mips/helper.h index 8df98c71b8..2b28e875cf 100644 --- a/target-mips/helper.h +++ b/target-mips/helper.h @@ -1,6 +1,8 @@ DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int) DEF_HELPER_2(raise_exception, noreturn, env, i32) +DEF_HELPER_1(do_semihosting, void, env) + #ifdef TARGET_MIPS64 DEF_HELPER_4(sdl, void, env, tl, tl, int) DEF_HELPER_4(sdr, void, env, tl, tl, int) -- cgit v1.2.3