re PR java/35485 (libjava is disabled by default)
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. From-SVN: r141335
This commit is contained in:
parent
dec014a92e
commit
887e6178d4
6 changed files with 83 additions and 11 deletions
|
@ -1,3 +1,13 @@
|
|||
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).
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
#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: */
|
||||
|
|
5
libjava/configure
vendored
5
libjava/configure
vendored
|
@ -20711,7 +20711,7 @@ case "$THREADS" in
|
|||
no | none | single)
|
||||
THREADS=none
|
||||
;;
|
||||
posix | posix95 | pthreads)
|
||||
aix | posix | posix95 | pthreads)
|
||||
THREADS=posix
|
||||
case "$host" in
|
||||
*-*-linux*)
|
||||
|
@ -27510,6 +27510,9 @@ case "${host}" in
|
|||
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
|
||||
;;
|
||||
|
|
|
@ -938,7 +938,7 @@ case "$THREADS" in
|
|||
no | none | single)
|
||||
THREADS=none
|
||||
;;
|
||||
posix | posix95 | pthreads)
|
||||
aix | posix | posix95 | pthreads)
|
||||
THREADS=posix
|
||||
case "$host" in
|
||||
*-*-linux*)
|
||||
|
@ -1634,6 +1634,9 @@ case "${host}" in
|
|||
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
|
||||
;;
|
||||
|
|
50
libjava/include/aix-signal.h
Normal file
50
libjava/include/aix-signal.h
Normal file
|
@ -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 <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 */
|
|
@ -1,6 +1,6 @@
|
|||
// 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.
|
||||
|
||||
|
@ -33,12 +33,11 @@ compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
|
|||
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 @@ compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
|
|||
__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");
|
||||
|
|
Loading…
Add table
Reference in a new issue