On 7/19/15 19:31, Chen Gang wrote: > On 6/13/15 21:10, Chen Gang wrote: >> + >> +void cpu_loop(CPUTLGState *env) >> +{ >> + CPUState *cs = CPU(tilegx_env_get_cpu(env)); >> + int trapnr; >> + >> + while (1) { >> + cpu_exec_start(cs); >> + trapnr = cpu_tilegx_exec(env); >> + cpu_exec_end(cs); >> + switch (trapnr) { >> + case TILEGX_EXCP_SYSCALL: >> + env->regs[TILEGX_R_RE] = do_syscall(env, env->regs[TILEGX_R_NR], >> + env->regs[0], env->regs[1], >> + env->regs[2], env->regs[3], >> + env->regs[4], env->regs[5], >> + env->regs[6], env->regs[7]); >> + env->regs[TILEGX_R_ERR] = >> TILEGX_IS_ERRNO(env->regs[TILEGX_R_RE]) >> + ? >> env->regs[TILEGX_R_RE] > > It needs "- env->regs[TILEGX_R_RE]" instead of "env->regs[TILEGX_R_RE]". > > For stat64, when return ENOENT, qemu will mark it as -ENOENT, so syscall > should revert it again. >
After this fix, the tilegx linux-user can let busybox pass simple test (manually using sh, ls, cp, mv, and vi are OK). Next, I shall start gcc testsuite with tilegx linux-user. :-) Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed