Lines Matching +full:cs +full:- +full:2
4 * Copyright (c) 2005-2007 CodeSourcery.
8 * the Free Software Foundation; either version 2 of the License, or
21 * https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=libgloss/m68k/m68k-semi.txt;hb=HEAD
36 #define HOSTED_OPEN 2
78 static void m68k_semi_u32_cb(CPUState *cs, uint64_t ret, int err) in m68k_semi_u32_cb() argument
80 CPUM68KState *env = cpu_env(cs); in m68k_semi_u32_cb()
82 target_ulong args = env->dregs[1]; in m68k_semi_u32_cb()
90 qemu_log_mask(LOG_GUEST_ERROR, "m68k-semihosting: return value " in m68k_semi_u32_cb()
95 static void m68k_semi_u64_cb(CPUState *cs, uint64_t ret, int err) in m68k_semi_u64_cb() argument
97 CPUM68KState *env = cpu_env(cs); in m68k_semi_u64_cb()
99 target_ulong args = env->dregs[1]; in m68k_semi_u64_cb()
104 qemu_log_mask(LOG_GUEST_ERROR, "m68k-semihosting: return value " in m68k_semi_u64_cb()
128 CPUState *cs = env_cpu(env); in do_m68k_semihosting() local
132 args = env->dregs[1]; in do_m68k_semihosting()
135 gdb_exit(env->dregs[1]); in do_m68k_semihosting()
136 exit(env->dregs[1]); in do_m68k_semihosting()
141 GET_ARG(2); in do_m68k_semihosting()
143 semihost_sys_open(cs, m68k_semi_u32_cb, arg0, arg1, arg2, arg3); in do_m68k_semihosting()
148 semihost_sys_close(cs, m68k_semi_u32_cb, arg0); in do_m68k_semihosting()
154 GET_ARG(2); in do_m68k_semihosting()
155 semihost_sys_read(cs, m68k_semi_u32_cb, arg0, arg1, arg2); in do_m68k_semihosting()
161 GET_ARG(2); in do_m68k_semihosting()
162 semihost_sys_write(cs, m68k_semi_u32_cb, arg0, arg1, arg2); in do_m68k_semihosting()
168 GET_ARG64(2); in do_m68k_semihosting()
170 semihost_sys_lseek(cs, m68k_semi_u64_cb, arg0, in do_m68k_semihosting()
177 GET_ARG(2); in do_m68k_semihosting()
179 semihost_sys_rename(cs, m68k_semi_u32_cb, arg0, arg1, arg2, arg3); in do_m68k_semihosting()
185 semihost_sys_remove(cs, m68k_semi_u32_cb, arg0, arg1); in do_m68k_semihosting()
191 GET_ARG(2); in do_m68k_semihosting()
192 semihost_sys_stat(cs, m68k_semi_u32_cb, arg0, arg1, arg2); in do_m68k_semihosting()
198 semihost_sys_fstat(cs, m68k_semi_u32_cb, arg0, arg1); in do_m68k_semihosting()
204 semihost_sys_gettimeofday(cs, m68k_semi_u32_cb, arg0, arg1); in do_m68k_semihosting()
209 semihost_sys_isatty(cs, m68k_semi_u32_cb, arg0); in do_m68k_semihosting()
215 semihost_sys_system(cs, m68k_semi_u32_cb, arg0, arg1); in do_m68k_semihosting()
223 env->dregs[1] = current_machine->ram_size; in do_m68k_semihosting()
224 env->aregs[7] = current_machine->ram_size; in do_m68k_semihosting()
231 m68k_semi_u32_cb(cs, -1, EFAULT); in do_m68k_semihosting()
234 m68k_semi_u64_cb(cs, -1, EFAULT); in do_m68k_semihosting()