void cpu_loop(CPUX86State *env)
{
int trapnr;
- uint8_t *pc;
+ target_ulong pc;
target_siginfo_t info;
for(;;) {
env->wim = new_wim;
}
+#if 0
static void flush_windows(CPUSPARCState *env)
{
int offset, cwp1;
offset++;
}
}
+#endif
void cpu_loop (CPUSPARCState *env)
{
env->eip = regs->eip;
/* linux interrupt setup */
- env->idt.base = (void *)idt_table;
+ env->idt.base = (long)idt_table;
env->idt.limit = sizeof(idt_table) - 1;
set_idt(0, 0);
set_idt(1, 0);
set_idt(0x80, 3);
/* linux segment setup */
- env->gdt.base = (void *)gdt_table;
+ env->gdt.base = (long)gdt_table;
env->gdt.limit = sizeof(gdt_table) - 1;
write_dt(&gdt_table[__USER_CS >> 3], 0, 0xfffff,
DESC_G_MASK | DESC_B_MASK | DESC_P_MASK | DESC_S_MASK |
}
#elif defined(TARGET_SPARC)
+
#define __SUNOS_MAXWIN 31
/* This is what SunOS does, so shall I. */
return err;
}
+#if 0
static int
setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
CPUState *env, unsigned long mask)
return err;
}
+#endif
#define NF_ALIGNEDSZ (((sizeof(struct target_signal_frame) + 7) & (~7)))
static void setup_frame(int sig, struct emulated_sigaction *ka,
/* Flush instruction space. */
//flush_sig_insns(current->mm, (unsigned long) &(sf->insns[0]));
- tb_flush(env);
+ // tb_flush(env);
}
//cpu_dump_state(env, stderr, fprintf, 0);
return;
-sigill_and_return:
+ //sigill_and_return:
force_sig(TARGET_SIGILL);
sigsegv:
//fprintf(stderr, "force_sig\n");
uint32_t up_psr, pc, npc;
target_sigset_t set;
sigset_t host_set;
- __siginfo_fpu_t *fpu_save;
+ target_ulong fpu_save;
int err, i;
sf = (struct target_signal_frame *) env->regwptr[UREG_FP];
+#if 0
fprintf(stderr, "sigreturn\n");
fprintf(stderr, "sf: %x pc %x fp %x sp %x\n", sf, env->pc, env->regwptr[UREG_FP], env->regwptr[UREG_SP]);
+#endif
//cpu_dump_state(env, stderr, fprintf, 0);
/* 1. Make sure we are not getting garbage from the user */
err = __get_user(pc, &sf->info.si_regs.pc);
err |= __get_user(npc, &sf->info.si_regs.npc);
- fprintf(stderr, "pc: %lx npc %lx\n", pc, npc);
+ // fprintf(stderr, "pc: %lx npc %lx\n", pc, npc);
if ((pc | npc) & 3)
goto segv_and_exit;
err |= __get_user(env->regwptr[i + UREG_I0], &sf->info.si_regs.u_regs[i+8]);
}
- err |= __get_user(fpu_save, &sf->fpu_save);
+ err |= __get_user(fpu_save, (target_ulong *)&sf->fpu_save);
//if (fpu_save)
// err |= restore_fpu_state(env, fpu_save);
if (err)
goto segv_and_exit;
- fprintf(stderr, "returning %lx\n", env->regwptr[0]);
+ // fprintf(stderr, "returning %lx\n", env->regwptr[0]);
return env->regwptr[0];
segv_and_exit:
if (!ldt_table)
return -ENOMEM;
memset(ldt_table, 0, TARGET_LDT_ENTRIES * TARGET_LDT_ENTRY_SIZE);
- env->ldt.base = ldt_table;
+ env->ldt.base = (long)ldt_table;
env->ldt.limit = 0xffff;
}
tnamelen = treclen - (2 * sizeof(target_long) + 2);
if (tnamelen > 256)
tnamelen = 256;
+ /* XXX: may not be correct */
strncpy(tde->d_name, de->d_name, tnamelen);
de = (struct dirent *)((char *)de + reclen);
len -= reclen;
default:
unimplemented:
gemu_log("qemu: Unsupported syscall: %d\n", num);
+#if defined(TARGET_NR_setxattr) || defined(TARGET_NR_set_thread_area)
unimplemented_nowarn:
+#endif
ret = -ENOSYS;
break;
}