Index: gcc/ChangeLog
2006-06-02 Geoffrey Keating <geoffk@apple.com> * config/rs6000/host-darwin.c (sigaltstack): Protect prototype with HAVE_DECL_SIGALTSTACK. (MC_FLD): New. (segv_handler): Use MC_FLD. * configure.ac: Check for a sigaltstack declaration. Compute HAS_MCONTEXT_T_UNDERSCORES on Darwin. * configure: Regenerate. * config.in: Regenerate. Index: boehm-gc/ChangeLog 2006-06-02 Geoffrey Keating <geoffk@apple.com> * configure.ac: Define HAS_PPC_THREAD_STATE_R0, HAS_PPC_THREAD_STATE___R0, HAS_PPC_THREAD_STATE64_R0, HAS_PPC_THREAD_STATE64___R0, HAS_I386_THREAD_STATE_EAX, HAS_I386_THREAD_STATE___EAX. * configure: Regenerate. * include/gc_config.h.in: Regenerate. * darwin_stop_world.c (PPC_RED_ZONE_SIZE): Use standard Darwin macro names to determine value. (THREAD_STATE): New. (THREAD_FLD): New. (GC_push_all_stacks): Use THREAD_STATE and THREAD_FLD in both versions. From-SVN: r114339
This commit is contained in:
parent
347b9c46e1
commit
4f6d8cc800
10 changed files with 1061 additions and 98 deletions
|
@ -1,3 +1,17 @@
|
|||
2006-06-02 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* configure.ac: Define HAS_PPC_THREAD_STATE_R0,
|
||||
HAS_PPC_THREAD_STATE___R0, HAS_PPC_THREAD_STATE64_R0,
|
||||
HAS_PPC_THREAD_STATE64___R0, HAS_I386_THREAD_STATE_EAX,
|
||||
HAS_I386_THREAD_STATE___EAX.
|
||||
* configure: Regenerate.
|
||||
* include/gc_config.h.in: Regenerate.
|
||||
* darwin_stop_world.c (PPC_RED_ZONE_SIZE): Use standard Darwin
|
||||
macro names to determine value.
|
||||
(THREAD_STATE): New.
|
||||
(THREAD_FLD): New.
|
||||
(GC_push_all_stacks): Use THREAD_STATE and THREAD_FLD in both versions.
|
||||
|
||||
2006-05-24 Carlos O'Donell <carlos@codesourcery.com>
|
||||
|
||||
* Makefile.am: Add install-html target.
|
||||
|
|
676
boehm-gc/configure
vendored
676
boehm-gc/configure
vendored
|
@ -5597,6 +5597,682 @@ else
|
|||
fi
|
||||
|
||||
|
||||
# Darwin needs a few extra special tests to deal with variation in the
|
||||
# system headers.
|
||||
case "$host" in
|
||||
powerpc*-*-darwin*)
|
||||
echo "$as_me:$LINENO: checking for ppc_thread_state_t.r0" >&5
|
||||
echo $ECHO_N "checking for ppc_thread_state_t.r0... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_ppc_thread_state_t_r0+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state_t ac_aggr;
|
||||
if (ac_aggr.r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state_t_r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state_t ac_aggr;
|
||||
if (sizeof ac_aggr.r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state_t_r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_ppc_thread_state_t_r0=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state_t_r0" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_ppc_thread_state_t_r0" >&6
|
||||
if test $ac_cv_member_ppc_thread_state_t_r0 = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_PPC_THREAD_STATE_R0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for ppc_thread_state_t.__r0" >&5
|
||||
echo $ECHO_N "checking for ppc_thread_state_t.__r0... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_ppc_thread_state_t___r0+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state_t ac_aggr;
|
||||
if (ac_aggr.__r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state_t___r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state_t ac_aggr;
|
||||
if (sizeof ac_aggr.__r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state_t___r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_ppc_thread_state_t___r0=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state_t___r0" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_ppc_thread_state_t___r0" >&6
|
||||
if test $ac_cv_member_ppc_thread_state_t___r0 = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_PPC_THREAD_STATE___R0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for ppc_thread_state64_t.r0" >&5
|
||||
echo $ECHO_N "checking for ppc_thread_state64_t.r0... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_ppc_thread_state64_t_r0+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state64_t ac_aggr;
|
||||
if (ac_aggr.r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state64_t_r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state64_t ac_aggr;
|
||||
if (sizeof ac_aggr.r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state64_t_r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_ppc_thread_state64_t_r0=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state64_t_r0" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_ppc_thread_state64_t_r0" >&6
|
||||
if test $ac_cv_member_ppc_thread_state64_t_r0 = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_PPC_THREAD_STATE64_R0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for ppc_thread_state64_t.__r0" >&5
|
||||
echo $ECHO_N "checking for ppc_thread_state64_t.__r0... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_ppc_thread_state64_t___r0+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state64_t ac_aggr;
|
||||
if (ac_aggr.__r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state64_t___r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static ppc_thread_state64_t ac_aggr;
|
||||
if (sizeof ac_aggr.__r0)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_ppc_thread_state64_t___r0=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_ppc_thread_state64_t___r0=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_ppc_thread_state64_t___r0" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_ppc_thread_state64_t___r0" >&6
|
||||
if test $ac_cv_member_ppc_thread_state64_t___r0 = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_PPC_THREAD_STATE64___R0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
;;
|
||||
i?86*-*-darwin*)
|
||||
echo "$as_me:$LINENO: checking for i386_thread_state_t.eax" >&5
|
||||
echo $ECHO_N "checking for i386_thread_state_t.eax... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_i386_thread_state_t_eax+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static i386_thread_state_t ac_aggr;
|
||||
if (ac_aggr.eax)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_i386_thread_state_t_eax=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static i386_thread_state_t ac_aggr;
|
||||
if (sizeof ac_aggr.eax)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_i386_thread_state_t_eax=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_i386_thread_state_t_eax=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_i386_thread_state_t_eax" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_i386_thread_state_t_eax" >&6
|
||||
if test $ac_cv_member_i386_thread_state_t_eax = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_I386_THREAD_STATE_EAX
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for i386_thread_state_t.__eax" >&5
|
||||
echo $ECHO_N "checking for i386_thread_state_t.__eax... $ECHO_C" >&6
|
||||
if test "${ac_cv_member_i386_thread_state_t___eax+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static i386_thread_state_t ac_aggr;
|
||||
if (ac_aggr.__eax)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_i386_thread_state_t___eax=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <mach/thread_status.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
static i386_thread_state_t ac_aggr;
|
||||
if (sizeof ac_aggr.__eax)
|
||||
return 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_member_i386_thread_state_t___eax=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_member_i386_thread_state_t___eax=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_member_i386_thread_state_t___eax" >&5
|
||||
echo "${ECHO_T}$ac_cv_member_i386_thread_state_t___eax" >&6
|
||||
if test $ac_cv_member_i386_thread_state_t___eax = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_I386_THREAD_STATE___EAX
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# We never want libdl on darwin. It is a fake libdl that just ends up making
|
||||
# dyld calls anyway
|
||||
case "$host" in
|
||||
|
|
|
@ -232,6 +232,39 @@ case "$host" in
|
|||
esac
|
||||
AM_CONDITIONAL(POWERPC_DARWIN,test x$powerpc_darwin = xtrue)
|
||||
|
||||
# Darwin needs a few extra special tests to deal with variation in the
|
||||
# system headers.
|
||||
case "$host" in
|
||||
powerpc*-*-darwin*)
|
||||
AC_CHECK_MEMBER(ppc_thread_state_t.r0,
|
||||
AC_DEFINE(HAS_PPC_THREAD_STATE_R0,,[ppc_thread_state_t has field r0]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
AC_CHECK_MEMBER(ppc_thread_state_t.__r0,
|
||||
AC_DEFINE(HAS_PPC_THREAD_STATE___R0,,dnl
|
||||
[ppc_thread_state_t has field __r0]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
AC_CHECK_MEMBER(ppc_thread_state64_t.r0,
|
||||
AC_DEFINE(HAS_PPC_THREAD_STATE64_R0,,dnl
|
||||
[ppc_thread_state64_t has field r0]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
AC_CHECK_MEMBER(ppc_thread_state64_t.__r0,
|
||||
AC_DEFINE(HAS_PPC_THREAD_STATE64___R0,,dnl
|
||||
[ppc_thread_state64_t has field __r0]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
;;
|
||||
i?86*-*-darwin*)
|
||||
AC_CHECK_MEMBER(i386_thread_state_t.eax,
|
||||
AC_DEFINE(HAS_I386_THREAD_STATE_EAX,,dnl
|
||||
[i386_thread_state_t has field eax]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
AC_CHECK_MEMBER(i386_thread_state_t.__eax,
|
||||
AC_DEFINE(HAS_I386_THREAD_STATE___EAX,,dnl
|
||||
[i386_thread_state_t has field __eax]),,
|
||||
[#include <mach/thread_status.h>])
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
# We never want libdl on darwin. It is a fake libdl that just ends up making
|
||||
# dyld calls anyway
|
||||
case "$host" in
|
||||
|
|
|
@ -14,12 +14,43 @@
|
|||
Page 50: "If a leaf procedure's red zone usage would exceed 224 bytes, then
|
||||
it must set up a stack frame just like routines that call other routines."
|
||||
*/
|
||||
#ifdef POWERPC
|
||||
# if CPP_WORDSZ == 32
|
||||
# define PPC_RED_ZONE_SIZE 224
|
||||
# elif CPP_WORDSZ == 64
|
||||
# define PPC_RED_ZONE_SIZE 320
|
||||
#if defined(__ppc__)
|
||||
# define PPC_RED_ZONE_SIZE 224
|
||||
#elif defined(__ppc64__)
|
||||
# define PPC_RED_ZONE_SIZE 320
|
||||
#endif
|
||||
|
||||
/* Try to work out the right way to access thread state structure members.
|
||||
The structure has changed its definition in different Darwin versions. */
|
||||
#if defined(__ppc__)
|
||||
# define THREAD_STATE ppc_thread_state_t
|
||||
# if defined (HAS_PPC_THREAD_STATE_R0)
|
||||
# define THREAD_FLD(x) x
|
||||
# elif defined (HAS_PPC_THREAD_STATE___R0)
|
||||
# define THREAD_FLD(x) __ ## x
|
||||
# else
|
||||
# error can not work out how to access fields of ppc_thread_state_t
|
||||
# endif
|
||||
#elif defined(__ppc64__)
|
||||
# define THREAD_STATE ppc_thread_state64_t
|
||||
# if defined (HAS_PPC_THREAD_STATE64_R0)
|
||||
# define THREAD_FLD(x) x
|
||||
# elif defined (HAS_PPC_THREAD_STATE64___R0)
|
||||
# define THREAD_FLD(x) __ ## x
|
||||
# else
|
||||
# error can not work out how to access fields of ppc_thread_state64_t
|
||||
# endif
|
||||
#elif defined(__i386__)
|
||||
# define THREAD_STATE i386_thread_state_t
|
||||
# if defined (HAS_I386_THREAD_STATE_EAX)
|
||||
# define THREAD_FLD(x) x
|
||||
# elif defined (HAS_I386_THREAD_STATE___EAX)
|
||||
# define THREAD_FLD(x) __ ## x
|
||||
# else
|
||||
# error can not work out how to access fields of i386_thread_state_t
|
||||
# endif
|
||||
#else
|
||||
# error unknown architecture
|
||||
#endif
|
||||
|
||||
typedef struct StackFrame {
|
||||
|
@ -75,7 +106,7 @@ void GC_push_all_stacks() {
|
|||
GC_thread p;
|
||||
pthread_t me;
|
||||
ptr_t lo, hi;
|
||||
ppc_thread_state_t state;
|
||||
THREAD_STATE state;
|
||||
mach_msg_type_number_t thread_state_count = MACHINE_THREAD_STATE_COUNT;
|
||||
|
||||
me = pthread_self();
|
||||
|
@ -95,39 +126,39 @@ void GC_push_all_stacks() {
|
|||
&thread_state_count);
|
||||
if(r != KERN_SUCCESS) ABORT("thread_get_state failed");
|
||||
|
||||
lo = (void*)(state.r1 - PPC_RED_ZONE_SIZE);
|
||||
lo = (void*)(state . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
|
||||
|
||||
GC_push_one(state.r0);
|
||||
GC_push_one(state.r2);
|
||||
GC_push_one(state.r3);
|
||||
GC_push_one(state.r4);
|
||||
GC_push_one(state.r5);
|
||||
GC_push_one(state.r6);
|
||||
GC_push_one(state.r7);
|
||||
GC_push_one(state.r8);
|
||||
GC_push_one(state.r9);
|
||||
GC_push_one(state.r10);
|
||||
GC_push_one(state.r11);
|
||||
GC_push_one(state.r12);
|
||||
GC_push_one(state.r13);
|
||||
GC_push_one(state.r14);
|
||||
GC_push_one(state.r15);
|
||||
GC_push_one(state.r16);
|
||||
GC_push_one(state.r17);
|
||||
GC_push_one(state.r18);
|
||||
GC_push_one(state.r19);
|
||||
GC_push_one(state.r20);
|
||||
GC_push_one(state.r21);
|
||||
GC_push_one(state.r22);
|
||||
GC_push_one(state.r23);
|
||||
GC_push_one(state.r24);
|
||||
GC_push_one(state.r25);
|
||||
GC_push_one(state.r26);
|
||||
GC_push_one(state.r27);
|
||||
GC_push_one(state.r28);
|
||||
GC_push_one(state.r29);
|
||||
GC_push_one(state.r30);
|
||||
GC_push_one(state.r31);
|
||||
GC_push_one(state . THREAD_FLD (r0));
|
||||
GC_push_one(state . THREAD_FLD (r2));
|
||||
GC_push_one(state . THREAD_FLD (r3));
|
||||
GC_push_one(state . THREAD_FLD (r4));
|
||||
GC_push_one(state . THREAD_FLD (r5));
|
||||
GC_push_one(state . THREAD_FLD (r6));
|
||||
GC_push_one(state . THREAD_FLD (r7));
|
||||
GC_push_one(state . THREAD_FLD (r8));
|
||||
GC_push_one(state . THREAD_FLD (r9));
|
||||
GC_push_one(state . THREAD_FLD (r10));
|
||||
GC_push_one(state . THREAD_FLD (r11));
|
||||
GC_push_one(state . THREAD_FLD (r12));
|
||||
GC_push_one(state . THREAD_FLD (r13));
|
||||
GC_push_one(state . THREAD_FLD (r14));
|
||||
GC_push_one(state . THREAD_FLD (r15));
|
||||
GC_push_one(state . THREAD_FLD (r16));
|
||||
GC_push_one(state . THREAD_FLD (r17));
|
||||
GC_push_one(state . THREAD_FLD (r18));
|
||||
GC_push_one(state . THREAD_FLD (r19));
|
||||
GC_push_one(state . THREAD_FLD (r20));
|
||||
GC_push_one(state . THREAD_FLD (r21));
|
||||
GC_push_one(state . THREAD_FLD (r22));
|
||||
GC_push_one(state . THREAD_FLD (r23));
|
||||
GC_push_one(state . THREAD_FLD (r24));
|
||||
GC_push_one(state . THREAD_FLD (r25));
|
||||
GC_push_one(state . THREAD_FLD (r26));
|
||||
GC_push_one(state . THREAD_FLD (r27));
|
||||
GC_push_one(state . THREAD_FLD (r28));
|
||||
GC_push_one(state . THREAD_FLD (r29));
|
||||
GC_push_one(state . THREAD_FLD (r30));
|
||||
GC_push_one(state . THREAD_FLD (r31));
|
||||
} /* p != me */
|
||||
if(p->flags & MAIN_THREAD)
|
||||
hi = GC_stackbottom;
|
||||
|
@ -166,78 +197,74 @@ void GC_push_all_stacks() {
|
|||
lo = GC_approx_sp();
|
||||
hi = (ptr_t)FindTopOfStack(0);
|
||||
} else {
|
||||
# if defined(POWERPC)
|
||||
# if CPP_WORDSZ == 32
|
||||
ppc_thread_state_t info;
|
||||
# else
|
||||
ppc_thread_state64_t info;
|
||||
# endif
|
||||
# if defined(__ppc__) || defined(__ppc64__)
|
||||
THREAD_STATE info;
|
||||
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
|
||||
r = thread_get_state(thread, MACHINE_THREAD_STATE,
|
||||
(natural_t *)&info, &outCount);
|
||||
if(r != KERN_SUCCESS) ABORT("task_get_state failed");
|
||||
|
||||
lo = (void*)(info.r1 - PPC_RED_ZONE_SIZE);
|
||||
hi = (ptr_t)FindTopOfStack(info.r1);
|
||||
lo = (void*)(info . THREAD_FLD (r1) - PPC_RED_ZONE_SIZE);
|
||||
hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (r1));
|
||||
|
||||
GC_push_one(info.r0);
|
||||
GC_push_one(info.r2);
|
||||
GC_push_one(info.r3);
|
||||
GC_push_one(info.r4);
|
||||
GC_push_one(info.r5);
|
||||
GC_push_one(info.r6);
|
||||
GC_push_one(info.r7);
|
||||
GC_push_one(info.r8);
|
||||
GC_push_one(info.r9);
|
||||
GC_push_one(info.r10);
|
||||
GC_push_one(info.r11);
|
||||
GC_push_one(info.r12);
|
||||
GC_push_one(info.r13);
|
||||
GC_push_one(info.r14);
|
||||
GC_push_one(info.r15);
|
||||
GC_push_one(info.r16);
|
||||
GC_push_one(info.r17);
|
||||
GC_push_one(info.r18);
|
||||
GC_push_one(info.r19);
|
||||
GC_push_one(info.r20);
|
||||
GC_push_one(info.r21);
|
||||
GC_push_one(info.r22);
|
||||
GC_push_one(info.r23);
|
||||
GC_push_one(info.r24);
|
||||
GC_push_one(info.r25);
|
||||
GC_push_one(info.r26);
|
||||
GC_push_one(info.r27);
|
||||
GC_push_one(info.r28);
|
||||
GC_push_one(info.r29);
|
||||
GC_push_one(info.r30);
|
||||
GC_push_one(info.r31);
|
||||
GC_push_one(info . THREAD_FLD (r0));
|
||||
GC_push_one(info . THREAD_FLD (r2));
|
||||
GC_push_one(info . THREAD_FLD (r3));
|
||||
GC_push_one(info . THREAD_FLD (r4));
|
||||
GC_push_one(info . THREAD_FLD (r5));
|
||||
GC_push_one(info . THREAD_FLD (r6));
|
||||
GC_push_one(info . THREAD_FLD (r7));
|
||||
GC_push_one(info . THREAD_FLD (r8));
|
||||
GC_push_one(info . THREAD_FLD (r9));
|
||||
GC_push_one(info . THREAD_FLD (r10));
|
||||
GC_push_one(info . THREAD_FLD (r11));
|
||||
GC_push_one(info . THREAD_FLD (r12));
|
||||
GC_push_one(info . THREAD_FLD (r13));
|
||||
GC_push_one(info . THREAD_FLD (r14));
|
||||
GC_push_one(info . THREAD_FLD (r15));
|
||||
GC_push_one(info . THREAD_FLD (r16));
|
||||
GC_push_one(info . THREAD_FLD (r17));
|
||||
GC_push_one(info . THREAD_FLD (r18));
|
||||
GC_push_one(info . THREAD_FLD (r19));
|
||||
GC_push_one(info . THREAD_FLD (r20));
|
||||
GC_push_one(info . THREAD_FLD (r21));
|
||||
GC_push_one(info . THREAD_FLD (r22));
|
||||
GC_push_one(info . THREAD_FLD (r23));
|
||||
GC_push_one(info . THREAD_FLD (r24));
|
||||
GC_push_one(info . THREAD_FLD (r25));
|
||||
GC_push_one(info . THREAD_FLD (r26));
|
||||
GC_push_one(info . THREAD_FLD (r27));
|
||||
GC_push_one(info . THREAD_FLD (r28));
|
||||
GC_push_one(info . THREAD_FLD (r29));
|
||||
GC_push_one(info . THREAD_FLD (r30));
|
||||
GC_push_one(info . THREAD_FLD (r31));
|
||||
# else
|
||||
/* FIXME: Remove after testing: */
|
||||
WARN("This is completely untested and likely will not work\n", 0);
|
||||
i386_thread_state_t info;
|
||||
THREAD_STATE info;
|
||||
mach_msg_type_number_t outCount = THREAD_STATE_MAX;
|
||||
r = thread_get_state(thread, MACHINE_THREAD_STATE,
|
||||
(natural_t *)&info, &outCount);
|
||||
if(r != KERN_SUCCESS) ABORT("task_get_state failed");
|
||||
|
||||
lo = (void*)info.esp;
|
||||
hi = (ptr_t)FindTopOfStack(info.esp);
|
||||
lo = (void*)info . THREAD_FLD (esp);
|
||||
hi = (ptr_t)FindTopOfStack(info . THREAD_FLD (esp));
|
||||
|
||||
GC_push_one(info.eax);
|
||||
GC_push_one(info.ebx);
|
||||
GC_push_one(info.ecx);
|
||||
GC_push_one(info.edx);
|
||||
GC_push_one(info.edi);
|
||||
GC_push_one(info.esi);
|
||||
/* GC_push_one(info.ebp); */
|
||||
/* GC_push_one(info.esp); */
|
||||
GC_push_one(info.ss);
|
||||
GC_push_one(info.eip);
|
||||
GC_push_one(info.cs);
|
||||
GC_push_one(info.ds);
|
||||
GC_push_one(info.es);
|
||||
GC_push_one(info.fs);
|
||||
GC_push_one(info.gs);
|
||||
GC_push_one(info . THREAD_FLD (eax));
|
||||
GC_push_one(info . THREAD_FLD (ebx));
|
||||
GC_push_one(info . THREAD_FLD (ecx));
|
||||
GC_push_one(info . THREAD_FLD (edx));
|
||||
GC_push_one(info . THREAD_FLD (edi));
|
||||
GC_push_one(info . THREAD_FLD (esi));
|
||||
/* GC_push_one(info . THREAD_FLD (ebp)); */
|
||||
/* GC_push_one(info . THREAD_FLD (esp)); */
|
||||
GC_push_one(info . THREAD_FLD (ss));
|
||||
GC_push_one(info . THREAD_FLD (eip));
|
||||
GC_push_one(info . THREAD_FLD (cs));
|
||||
GC_push_one(info . THREAD_FLD (ds));
|
||||
GC_push_one(info . THREAD_FLD (es));
|
||||
GC_push_one(info . THREAD_FLD (fs));
|
||||
GC_push_one(info . THREAD_FLD (gs));
|
||||
# endif /* !POWERPC */
|
||||
}
|
||||
# if DEBUG_THREADS
|
||||
|
|
|
@ -57,6 +57,24 @@
|
|||
/* support for win32 threads */
|
||||
#undef GC_WIN32_THREADS
|
||||
|
||||
/* i386_thread_state_t has field eax */
|
||||
#undef HAS_I386_THREAD_STATE_EAX
|
||||
|
||||
/* i386_thread_state_t has field __eax */
|
||||
#undef HAS_I386_THREAD_STATE___EAX
|
||||
|
||||
/* ppc_thread_state64_t has field r0 */
|
||||
#undef HAS_PPC_THREAD_STATE64_R0
|
||||
|
||||
/* ppc_thread_state64_t has field __r0 */
|
||||
#undef HAS_PPC_THREAD_STATE64___R0
|
||||
|
||||
/* ppc_thread_state_t has field r0 */
|
||||
#undef HAS_PPC_THREAD_STATE_R0
|
||||
|
||||
/* ppc_thread_state_t has field __r0 */
|
||||
#undef HAS_PPC_THREAD_STATE___R0
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -154,5 +172,5 @@
|
|||
/* POSIX version of C Source */
|
||||
#undef _POSIX_C_SOURCE
|
||||
|
||||
/* Use reentrant code */
|
||||
/* Required define if using POSIX threads */
|
||||
#undef _REENTRANT
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
2006-06-02 Geoffrey Keating <geoffk@apple.com>
|
||||
|
||||
* config/rs6000/host-darwin.c (sigaltstack): Protect prototype with
|
||||
HAVE_DECL_SIGALTSTACK.
|
||||
(MC_FLD): New.
|
||||
(segv_handler): Use MC_FLD.
|
||||
* configure.ac: Check for a sigaltstack declaration.
|
||||
Compute HAS_MCONTEXT_T_UNDERSCORES on Darwin.
|
||||
* configure: Regenerate.
|
||||
* config.in: Regenerate.
|
||||
|
||||
2006-06-03 J"orn Rennecke <joern.rennecke@st.com>
|
||||
|
||||
PR other/27850
|
||||
|
|
|
@ -148,6 +148,12 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* mcontext_t fields start with __ */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef HAS_MCONTEXT_T_UNDERSCORES
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if you have the `alphasort' function. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef HAVE_ALPHASORT
|
||||
|
@ -568,6 +574,13 @@
|
|||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if we found a declaration for 'sigaltstack', otherwise define
|
||||
to 0. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef HAVE_DECL_SIGALTSTACK
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if we found a declaration for 'snprintf', otherwise define to
|
||||
0. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
|
|
|
@ -33,9 +33,19 @@ static void segv_crash_handler (int);
|
|||
static void segv_handler (int, siginfo_t *, void *);
|
||||
static void darwin_rs6000_extra_signals (void);
|
||||
|
||||
#ifndef HAVE_DECL_SIGALTSTACK
|
||||
/* This doesn't have a prototype in signal.h in 10.2.x and earlier,
|
||||
fixed in later releases. */
|
||||
extern int sigaltstack(const struct sigaltstack *, struct sigaltstack *);
|
||||
#endif
|
||||
|
||||
/* The fields of the mcontext_t type have acquired underscores in later
|
||||
OS versions. */
|
||||
#ifdef HAS_MCONTEXT_T_UNDERSCORES
|
||||
#define MC_FLD(x) __ ## x
|
||||
#else
|
||||
#define MC_FLD(x) x
|
||||
#endif
|
||||
|
||||
#undef HOST_HOOKS_EXTRA_SIGNALS
|
||||
#define HOST_HOOKS_EXTRA_SIGNALS darwin_rs6000_extra_signals
|
||||
|
@ -68,7 +78,7 @@ segv_handler (int sig ATTRIBUTE_UNUSED,
|
|||
sigaddset (&sigset, SIGSEGV);
|
||||
sigprocmask (SIG_UNBLOCK, &sigset, NULL);
|
||||
|
||||
faulting_insn = *(unsigned *)uc->uc_mcontext->ss.srr0;
|
||||
faulting_insn = *(unsigned *)uc->uc_mcontext->MC_FLD(ss).MC_FLD(srr0);
|
||||
|
||||
/* Note that this only has to work for GCC, so we don't have to deal
|
||||
with all the possible cases (GCC has no AltiVec code, for
|
||||
|
@ -117,7 +127,8 @@ segv_handler (int sig ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
fprintf (stderr, "[address=%08lx pc=%08x]\n",
|
||||
uc->uc_mcontext->es.dar, uc->uc_mcontext->ss.srr0);
|
||||
uc->uc_mcontext->MC_FLD(es).MC_FLD(dar),
|
||||
uc->uc_mcontext->MC_FLD(ss).MC_FLD(srr0));
|
||||
internal_error ("Segmentation Fault");
|
||||
exit (FATAL_EXIT_CODE);
|
||||
}
|
||||
|
|
138
gcc/configure
vendored
138
gcc/configure
vendored
|
@ -11756,6 +11756,88 @@ fi
|
|||
done
|
||||
|
||||
|
||||
|
||||
for ac_func in sigaltstack
|
||||
do
|
||||
ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp`
|
||||
echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5
|
||||
echo $ECHO_N "checking whether $ac_func is declared... $ECHO_C" >&6
|
||||
if eval "test \"\${gcc_cv_have_decl_$ac_func+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#undef $ac_tr_decl
|
||||
#define $ac_tr_decl 1
|
||||
|
||||
#include "ansidecl.h"
|
||||
#include "system.h"
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
#ifndef $ac_func
|
||||
char *(*pfn) = (char *(*)) $ac_func ;
|
||||
#endif
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
eval "gcc_cv_have_decl_$ac_func=yes"
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
eval "gcc_cv_have_decl_$ac_func=no"
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
if eval "test \"`echo '$gcc_cv_have_decl_'$ac_func`\" = yes"; then
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6 ; cat >>confdefs.h <<_ACEOF
|
||||
#define $ac_tr_decl 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6 ; cat >>confdefs.h <<_ACEOF
|
||||
#define $ac_tr_decl 0
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
# More time-related stuff.
|
||||
echo "$as_me:$LINENO: checking for struct tms" >&5
|
||||
echo $ECHO_N "checking for struct tms... $ECHO_C" >&6
|
||||
|
@ -12195,6 +12277,62 @@ if test "$host_xm_file" != "$build_xm_file"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
case ${host} in
|
||||
powerpc-*-darwin*)
|
||||
echo "$as_me:$LINENO: checking whether mcontext_t fields have underscores" >&5
|
||||
echo $ECHO_N "checking whether mcontext_t fields have underscores... $ECHO_C" >&6
|
||||
if test "${gcc_cv_mcontext_underscores+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
|
||||
#include <ucontext.h>
|
||||
int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
|
||||
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
gcc_cv_mcontext_underscores=no
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
gcc_cv_mcontext_underscores=yes
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $gcc_cv_mcontext_underscores" >&5
|
||||
echo "${ECHO_T}$gcc_cv_mcontext_underscores" >&6
|
||||
if test $gcc_cv_mcontext_underscores = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAS_MCONTEXT_T_UNDERSCORES
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# ---------
|
||||
# Threading
|
||||
# ---------
|
||||
|
|
|
@ -1154,6 +1154,12 @@ gcc_AC_CHECK_DECLS(times, , ,[
|
|||
#endif
|
||||
])
|
||||
|
||||
gcc_AC_CHECK_DECLS(sigaltstack, , ,[
|
||||
#include "ansidecl.h"
|
||||
#include "system.h"
|
||||
#include <signal.h>
|
||||
])
|
||||
|
||||
# More time-related stuff.
|
||||
AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
|
@ -1337,6 +1343,22 @@ if test "$host_xm_file" != "$build_xm_file"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
case ${host} in
|
||||
powerpc-*-darwin*)
|
||||
AC_CACHE_CHECK([whether mcontext_t fields have underscores],
|
||||
gcc_cv_mcontext_underscores,
|
||||
AC_COMPILE_IFELSE([
|
||||
#include <ucontext.h>
|
||||
int main() { mcontext_t m; if (m->ss.srr0) return 0; return 0; }
|
||||
],
|
||||
gcc_cv_mcontext_underscores=no, gcc_cv_mcontext_underscores=yes))
|
||||
if test $gcc_cv_mcontext_underscores = yes; then
|
||||
AC_DEFINE(HAS_MCONTEXT_T_UNDERSCORES,,dnl
|
||||
[mcontext_t fields start with __])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# ---------
|
||||
# Threading
|
||||
# ---------
|
||||
|
|
Loading…
Add table
Reference in a new issue