aboutsummaryrefslogtreecommitdiff
path: root/arm-semi.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-16 10:46:05 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2007-11-16 10:46:05 +0000
commit2f6196984b98fe2a852b1b5254756f1614eb7635 (patch)
tree4efb51527f2f43fc4d96eefb88d96001697f271a /arm-semi.c
parent67276f53dc0b66d843bff01da722c19d03108503 (diff)
suppressed tgetx and tputx (initial patch by Thayne Harbaugh)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3653 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'arm-semi.c')
-rw-r--r--arm-semi.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/arm-semi.c b/arm-semi.c
index d5fb9a55a7..423aaf7b59 100644
--- a/arm-semi.c
+++ b/arm-semi.c
@@ -165,8 +165,14 @@ static void arm_semi_flen_cb(CPUState *env, target_ulong ret, target_ulong err)
#endif
}
-#define ARG(n) tget32(args + (n) * 4)
-#define SET_ARG(n, val) tput32(args + (n) * 4,val)
+#define ARG(n) \
+({ \
+ target_ulong __arg; \
+ /* FIXME - handle get_user() failure */ \
+ get_user_ual(__arg, args + (n) * 4); \
+ __arg; \
+})
+#define SET_ARG(n, val) put_user_ual(val, args + (n) * 4)
uint32_t do_arm_semihosting(CPUState *env)
{
target_ulong args;
@@ -213,7 +219,11 @@ uint32_t do_arm_semihosting(CPUState *env)
}
case SYS_WRITEC:
{
- char c = tget8(args);
+ char c;
+
+ if (get_user_u8(c, args))
+ /* FIXME - should this error code be -TARGET_EFAULT ? */
+ return (uint32_t)-1;
/* Write to debug console. stderr is near enough. */
if (use_gdb_syscalls()) {
gdb_do_syscall(arm_semi_cb, "write,2,%x,1", args);