--- Makefile.target | 3 --- cpu-exec.c | 3 +-- dyngen.c | 6 ++++-- dyngen.h | 3 +++ linux-user/syscall.c | 2 +- target-mips/exec.h | 4 ++++ 6 files changed, 13 insertions(+), 8 deletions(-) Index: Makefile.target =================================================================== --- Makefile.target.orig 2006-03-07 02:12:48.000000000 +0100 +++ Makefile.target 2006-03-07 02:12:48.000000000 +0100 @@ -252,9 +252,6 @@ ifeq ($(findstring m68k, $(TARGET_ARCH) LIBOBJS+=m68k-dis.o endif -ifeq ($(ARCH),ia64) -OBJS += ia64-syscall.o -endif ifdef CONFIG_GDBSTUB OBJS+=gdbstub.o endif Index: cpu-exec.c =================================================================== --- cpu-exec.c.orig 2005-12-19 23:51:53.000000000 +0100 +++ cpu-exec.c 2006-03-07 02:12:48.000000000 +0100 @@ -1351,7 +1351,6 @@ int cpu_signal_handler(int host_signum, #ifndef __ISR_VALID /* This ought to be in ... */ # define __ISR_VALID 1 -# define si_flags _sifields._sigfault._si_pad0 #endif int cpu_signal_handler(int host_signum, struct siginfo *info, void *puc) @@ -1367,7 +1366,7 @@ int cpu_signal_handler(int host_signum, case SIGSEGV: case SIGBUS: case SIGTRAP: - if (info->si_code && (info->si_flags & __ISR_VALID)) + if (info->si_code && (info->si_segvflags & __ISR_VALID)) /* ISR.W (write-access) is bit 33: */ is_write = (info->si_isr >> 33) & 1; break; Index: dyngen.c =================================================================== --- dyngen.c.orig 2005-12-19 23:51:53.000000000 +0100 +++ dyngen.c 2006-03-07 02:14:36.000000000 +0100 @@ -2469,10 +2469,12 @@ fprintf(outfile, ); #ifdef HOST_IA64 fprintf(outfile, - " ia64_apply_fixes(&gen_code_ptr, ltoff_fixes, " + " {\n" + " extern char code_gen_buffer[];\n" + " ia64_apply_fixes(&gen_code_ptr, ltoff_fixes, " "(uint64_t) code_gen_buffer + 2*(1<<20), plt_fixes,\n\t\t\t" "sizeof(plt_target)/sizeof(plt_target[0]),\n\t\t\t" - "plt_target, plt_offset);\n"); + "plt_target, plt_offset);\n }\n"); #endif /* generate some code patching */ Index: dyngen.h =================================================================== --- dyngen.h.orig 2005-12-19 23:51:53.000000000 +0100 +++ dyngen.h 2006-03-07 02:12:48.000000000 +0100 @@ -420,6 +420,9 @@ static inline void ia64_apply_fixes (uin } ia64_imm22(fixup->addr, (long) vp - gp); } + /* Keep code ptr aligned. */ + if ((long) gen_code_ptr & 15) + gen_code_ptr += 8; *gen_code_pp = gen_code_ptr; } Index: linux-user/syscall.c =================================================================== --- linux-user/syscall.c.orig 2006-03-07 02:12:48.000000000 +0100 +++ linux-user/syscall.c 2006-03-07 02:12:48.000000000 +0100 @@ -1513,7 +1513,7 @@ int do_fork(CPUState *env, unsigned int #endif new_env->opaque = ts; #ifdef __ia64__ - ret = clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); + ret = __clone2(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); #else ret = clone(clone_func, new_stack + NEW_STACK_SIZE, flags, new_env); #endif Index: target-mips/exec.h =================================================================== --- target-mips/exec.h.orig 2005-12-19 23:51:53.000000000 +0100 +++ target-mips/exec.h 2006-03-07 02:12:48.000000000 +0100 @@ -31,7 +31,11 @@ register double FT2 asm(FREG2); #endif #if defined (DEBUG_OP) +#if defined (__ia64__) +#define RETURN() __asm__ __volatile__("nop 0"); +#else #define RETURN() __asm__ __volatile__("nop"); +#endif #else #define RETURN() __asm__ __volatile__(""); #endif