Sha256: 1bb108c4215a53f6f28b1ad556709457e9f264486112a9b1ce8fed523c5d0857

Contents?: true

Size: 1.06 KB

Versions: 7

Compression:

Stored size: 1.06 KB

Contents

/********************************************************************
 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)
{
/*
 * gcc doesn't provide "asm" keyword if -ansi and the various -std options
 * are given.
 * http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html
 */
#ifndef __GNUC__
#define __asm__ asm
#endif

    __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
    ;
}

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rhodes-7.6.0 platform/shared/ruby/sparc.c
rhodes-7.5.1 platform/shared/ruby/sparc.c
rhodes-7.4.1 platform/shared/ruby/sparc.c
rhodes-7.1.17 platform/shared/ruby/sparc.c
rhodes-6.2.0 platform/shared/ruby/sparc.c
rhodes-6.0.11 platform/shared/ruby/sparc.c
ruby-compiler-0.1.1 vendor/ruby/sparc.c