* configure.ac: AIX threads are Posix threads. Define aix-signal.h signal handler. * classpath/native/fdlibm/fdlibm.h: Undef hz. * include/aix-signal.h: New file. * sysdep/powerpc/locks.h: Avoid GNU Assembler syntax. Index: configure.ac =================================================================== --- configure.ac (revision 141127) +++ configure.ac (working copy) @@ -880,7 +880,7 @@ no | none | single) THREADS=none ;; - posix | posix95 | pthreads) + aix | posix | posix95 | pthreads) THREADS=posix case "$host" in *-*-linux*) @@ -1575,6 +1575,9 @@ powerpc*-*-darwin* | i?86-*-darwin9* | x86_64-*-darwin9*) SIGNAL_HANDLER=include/darwin-signal.h ;; + powerpc*-*-aix*) + SIGNAL_HANDLER=include/aix-signal.h + ;; *) SIGNAL_HANDLER=include/default-signal.h ;; Index: classpath/native/fdlibm/fdlibm.h =================================================================== --- classpath/native/fdlibm/fdlibm.h (revision 141127) +++ classpath/native/fdlibm/fdlibm.h (working copy) @@ -23,6 +23,7 @@ #include #include +#undef hz /* GCJ LOCAL: Include files. */ #include "ieeefp.h" Index: include/aix-signal.h =================================================================== --- include/aix-signal.h (revision 0) +++ include/aix-signal.h (revision 0) @@ -0,0 +1,50 @@ +/* aix-signal.h - Catch runtime signals and turn them into exceptions, + on a Darwin system. */ + +/* Copyright (C) 2008 Free Software Foundation + + This file is part of libgcj. + +This software is copyrighted work licensed under the terms of the +Libgcj License. Please consult the file "LIBGCJ_LICENSE" for +details. */ + +/* This file is really more of a specification. The rest of the system + should be arranged so that this Just Works. */ + +#ifndef JAVA_SIGNAL_H +# define JAVA_SIGNAL_H 1 + +#include +#include + +typedef void (* SIG_PF)(int); + +# define HANDLE_SEGV 1 +# undef HANDLE_FPE + +# define SIGNAL_HANDLER(_name) \ + static void _name (int _dummy __attribute__ ((unused))) + +# define MAKE_THROW_FRAME(_exception) + +# define INIT_SEGV \ + do { \ + struct sigaction sa; \ + sa.sa_handler = catch_segv; \ + sigemptyset (&sa.sa_mask); \ + sa.sa_flags = SA_NODEFER; \ + sigaction (SIGBUS, &sa, NULL); \ + sigaction (SIGSEGV, &sa, NULL); \ + } while (0) + +# define INIT_FPE \ + do { \ + struct sigaction sa; \ + sa.sa_handler = catch_fpe; \ + sigemptyset (&sa.sa_mask); \ + sa.sa_flags = SA_NODEFER; \ + sigaction (SIGFPE, &sa, NULL); \ + } while (0) + +#endif /* JAVA_SIGNAL_H */ Index: sysdep/powerpc/locks.h =================================================================== --- sysdep/powerpc/locks.h (revision 141127) +++ sysdep/powerpc/locks.h (working copy) @@ -33,12 +33,11 @@ obj_addr_t ret; __asm__ __volatile__ ( - "0: " _LARX "%0,0,%1 \n" + " " _LARX "%0,0,%1 \n" " xor. %0,%3,%0\n" - " bne 1f\n" + " bne $+12\n" " " _STCX "%2,0,%1\n" - " bne- 0b\n" - "1: \n" + " bne- $-16\n" : "=&r" (ret) : "r" (addr), "r" (new_val), "r" (old) : "cr0", "memory"); @@ -67,12 +66,11 @@ __asm__ __volatile__ ("sync" : : : "memory"); __asm__ __volatile__ ( - "0: " _LARX "%0,0,%1 \n" + " " _LARX "%0,0,%1 \n" " xor. %0,%3,%0\n" - " bne 1f\n" + " bne $+12\n" " " _STCX "%2,0,%1\n" - " bne- 0b\n" - "1: \n" + " bne- $-16\n" : "=&r" (ret) : "r" (addr), "r" (new_val), "r" (old) : "cr0", "memory"); Index: configure =================================================================== --- configure (revision 141127) +++ configure (working copy) @@ -20622,7 +20622,7 @@ no | none | single) THREADS=none ;; - posix | posix95 | pthreads) + aix | posix | posix95 | pthreads) THREADS=posix case "$host" in *-*-linux*) @@ -27420,6 +27420,9 @@ powerpc*-*-darwin* | i?86-*-darwin9* | x86_64-*-darwin9*) SIGNAL_HANDLER=include/darwin-signal.h ;; + powerpc*-*-aix*) + SIGNAL_HANDLER=include/aix-signal.h + ;; *) SIGNAL_HANDLER=include/default-signal.h ;;