Project

General

Profile

Backport #5636 ยป backport-r33757-r33758.patch

ngoto (Naohisa Goto), 11/15/2011 03:58 PM

View differences:

ruby_1_9_3/include/ruby/defines.h (working copy)
#endif
#if defined(sparc) || defined(__sparc__)
static inline void
flush_register_windows(void)
{
asm
#ifdef __GNUC__
volatile
#endif
# if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__)
("flushw")
# else
("ta 0x03")
# endif /* trap always to flush register windows if we are on a Sparc system */
;
}
# define FLUSH_REGISTER_WINDOWS flush_register_windows()
void rb_sparc_flush_register_windows(void);
# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
#elif defined(__ia64)
void *rb_ia64_bsp(void);
void rb_ia64_flushrs(void);
ruby_1_9_3/configure.in (working copy)
[CFLAGS="-mieee $CFLAGS"],
[osf*], # ccc
[CFLAGS="-ieee $CFLAGS"],
)])
)],
[sparc*], [AC_LIBOBJ([sparc])])
ac_cv_header_net_socket_h=${ac_cv_header_net_socket_h=no}
if test "$ac_cv_header_net_socket_h" = yes; then
ruby_1_9_3/sparc.c (revision 0)
/********************************************************************
Flush register windows on sparc.
This function is in a separate file to prevent inlining. The "flushw"
assembler instruction used on sparcv9 flushes all register windows
except the current one, so if it is inlined, the current register
window of the process executing the instruction will not be flushed
correctly.
See http://redmine.ruby-lang.org/issues/5244 for discussion.
*********************************************************************/
void rb_sparc_flush_register_windows(void)
{
asm
#ifdef __GNUC__
__volatile__
#endif
/* This condition should be in sync with one in configure.in */
#if defined(__sparcv9) || defined(__sparc_v9__) || defined(__arch64__)
# ifdef __GNUC__
("flushw" : : : "%o7")
# else
("flushw")
# endif /* __GNUC__ */
#else
("ta 0x03")
#endif
;
}
    (1-1/1)