Ruby 1.9.3p327(2012-11-10revision37606)
|
00001 /******************************************************************** 00002 Flush register windows on sparc. 00003 00004 This function is in a separate file to prevent inlining. The "flushw" 00005 assembler instruction used on sparcv9 flushes all register windows 00006 except the current one, so if it is inlined, the current register 00007 window of the process executing the instruction will not be flushed 00008 correctly. 00009 00010 See http://bugs.ruby-lang.org/issues/5244 for discussion. 00011 *********************************************************************/ 00012 void rb_sparc_flush_register_windows(void) 00013 { 00014 asm 00015 #ifdef __GNUC__ 00016 __volatile__ 00017 #endif 00018 00019 /* This condition should be in sync with one in configure.in */ 00020 #if defined(__sparcv9) || defined(__sparc_v9__) || defined(__arch64__) 00021 # ifdef __GNUC__ 00022 ("flushw" : : : "%o7") 00023 # else 00024 ("flushw") 00025 # endif /* __GNUC__ */ 00026 #else 00027 ("ta 0x03") 00028 #endif 00029 ; 00030 } 00031