Commit 80a9d035 authored by bellard's avatar bellard
Browse files

64 bit target fixes - removed warnings


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1187 c046a42c-6fe2-441c-8c8c-71466251a162
parent 75598f61
......@@ -181,7 +181,7 @@ static void set_idt(int n, unsigned int dpl)
void cpu_loop(CPUX86State *env)
{
int trapnr;
uint8_t *pc;
target_ulong pc;
target_siginfo_t info;
for(;;) {
......@@ -440,6 +440,7 @@ static void restore_window(CPUSPARCState *env)
env->wim = new_wim;
}
#if 0
static void flush_windows(CPUSPARCState *env)
{
int offset, cwp1;
......@@ -459,6 +460,7 @@ static void flush_windows(CPUSPARCState *env)
offset++;
}
}
#endif
void cpu_loop (CPUSPARCState *env)
{
......@@ -1067,7 +1069,7 @@ int main(int argc, char **argv)
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);
......@@ -1092,7 +1094,7 @@ int main(int argc, char **argv)
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 |
......
......@@ -1272,6 +1272,7 @@ badframe:
}
#elif defined(TARGET_SPARC)
#define __SUNOS_MAXWIN 31
/* This is what SunOS does, so shall I. */
......@@ -1400,6 +1401,7 @@ setup___siginfo(__siginfo_t *si, CPUState *env, target_ulong mask)
return err;
}
#if 0
static int
setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
CPUState *env, unsigned long mask)
......@@ -1416,6 +1418,7 @@ setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
return err;
}
#endif
#define NF_ALIGNEDSZ (((sizeof(struct target_signal_frame) + 7) & (~7)))
static void setup_frame(int sig, struct emulated_sigaction *ka,
......@@ -1483,12 +1486,12 @@ 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");
......@@ -1544,12 +1547,14 @@ long do_sigreturn(CPUState *env)
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 */
......@@ -1564,7 +1569,7 @@ long do_sigreturn(CPUState *env)
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;
......@@ -1585,7 +1590,7 @@ long do_sigreturn(CPUState *env)
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);
......@@ -1604,7 +1609,7 @@ long do_sigreturn(CPUState *env)
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:
......
......@@ -1326,7 +1326,7 @@ static int write_ldt(CPUX86State *env,
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;
}
......@@ -2502,6 +2502,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
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;
......@@ -3046,7 +3047,9 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment