* configure.ac: AIX threads are Posix threads.
Set signal handler to aix-signal.h
* configure: Regenerate.
* classpath/native/fdlibm/fdlibm.h: Undef hz.
* include/aix-signal.h: New file.
* sysdep/powerpc/locks.h: Avoid GNU Assembler syntax.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141335
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-10-23 David Edelsohn <edelsohn@gnu.org>
+
+ PR target/35485
+ * configure.ac: AIX threads are Posix threads.
+ Set signal handler to aix-signal.h
+ * configure: Regenerate.
+ * classpath/native/fdlibm/fdlibm.h: Undef hz.
+ * include/aix-signal.h: New file.
+ * sysdep/powerpc/locks.h: Avoid GNU Assembler syntax.
+
2008-10-22 Matthias Klose <doko@ubuntu.com>
Import GNU Classpath (libgcj-import-20081021).
#include <config.h>
#include <stdlib.h>
+/*
+ * AIX includes a header that defines hz,
+ * which conflicts with an fdlibm variable in some functions.
+ */
+#ifdef _AIX
+#undef hz
+#endif
+
/* GCJ LOCAL: Include files. */
#include "ieeefp.h"
/* CLASSPATH LOCAL: */
no | none | single)
THREADS=none
;;
- posix | posix95 | pthreads)
+ aix | posix | posix95 | pthreads)
THREADS=posix
case "$host" in
*-*-linux*)
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
;;
no | none | single)
THREADS=none
;;
- posix | posix95 | pthreads)
+ aix | posix | posix95 | pthreads)
THREADS=posix
case "$host" in
*-*-linux*)
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
;;
--- /dev/null
+/* 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 <sys/types.h>
+#include <sys/signal.h>
+
+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 */
// locks.h - Thread synchronization primitives. PowerPC implementation.
-/* Copyright (C) 2002 Free Software Foundation
+/* Copyright (C) 2002,2008 Free Software Foundation
This file is part of libgcj.
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");
__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");