diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-24 20:32:17 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-04-24 20:32:17 +0000 |
commit | fd4a43e4e28a594a20beefe78b0fe7ecd34bd981 (patch) | |
tree | 1186cab290333dc8c149e72c5b7240aef0cafd1f | |
parent | ad1a5b7853dbc510a9f6c9628ff623148d06c9d5 (diff) |
ia64 fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1846 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | Makefile.target | 3 | ||||
-rw-r--r-- | cpu-exec.c | 3 | ||||
-rw-r--r-- | dyngen.c | 6 | ||||
-rw-r--r-- | dyngen.h | 3 | ||||
-rw-r--r-- | ia64-syscall.S | 32 | ||||
-rw-r--r-- | linux-user/syscall.c | 2 |
6 files changed, 9 insertions, 40 deletions
diff --git a/Makefile.target b/Makefile.target index 9b5ebcde0..20fb8f0d1 100644 --- a/Makefile.target +++ b/Makefile.target @@ -252,9 +252,6 @@ ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) LIBOBJS+=m68k-dis.o endif -ifeq ($(ARCH),ia64) -OBJS += ia64-syscall.o -endif ifdef CONFIG_GDBSTUB OBJS+=gdbstub.o endif diff --git a/cpu-exec.c b/cpu-exec.c index 872f51f62..ca4695343 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -1363,7 +1363,6 @@ int cpu_signal_handler(int host_signum, struct siginfo *info, #ifndef __ISR_VALID /* This ought to be in <bits/siginfo.h>... */ # define __ISR_VALID 1 -# define si_flags _sifields._sigfault._si_pad0 #endif int cpu_signal_handler(int host_signum, struct siginfo *info, void *puc) @@ -1379,7 +1378,7 @@ int cpu_signal_handler(int host_signum, struct siginfo *info, void *puc) 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; @@ -2475,10 +2475,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 */ @@ -420,6 +420,9 @@ static inline void ia64_apply_fixes (uint8_t **gen_code_pp, } 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; } diff --git a/ia64-syscall.S b/ia64-syscall.S deleted file mode 100644 index ab073f22b..000000000 --- a/ia64-syscall.S +++ /dev/null @@ -1,32 +0,0 @@ -/* derived from glibc sysdeps/unix/sysv/linux/ia64/sysdep.S */ - -#define __ASSEMBLY__ - -#include <asm/asmmacro.h> -#include <asm/unistd.h> - -ENTRY(__syscall_error) - .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0) - alloc r33=ar.pfs, 0, 4, 0, 0 - mov r32=rp - .body - mov r35=r8 - mov r34=r1 - ;; - br.call.sptk.many b0 = __errno_location -.Lret0: /* force new bundle */ - st4 [r8]=r35 - mov r1=r34 - mov rp=r32 - mov r8=-1 - mov ar.pfs=r33 - br.ret.sptk.few b0 -END(__syscall_error) - -GLOBAL_ENTRY(__ia64_syscall) - mov r15=r37 /* syscall number */ - break __BREAK_SYSCALL - cmp.eq p6,p0=-1,r10 /* r10 = -1 on error */ -(p6) br.cond.spnt.few __syscall_error - br.ret.sptk.few b0 -.endp __ia64_syscall diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 516b32bf9..c3b22ce72 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1623,7 +1623,7 @@ int do_fork(CPUState *env, unsigned int flags, unsigned long newsp) #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 |