Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 43b8ae4631
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (28 sloc) 0.878 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/********************************************************************
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://bugs.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
    ;
}
Something went wrong with that request. Please try again.