Ruby
1.9.3p429(2013-05-15revision40747)
Main Page
Modules
Data Structures
Files
File List
Globals
sparc.c
Go to the documentation of this file.
1
/********************************************************************
2
Flush register windows on sparc.
3
4
This function is in a separate file to prevent inlining. The "flushw"
5
assembler instruction used on sparcv9 flushes all register windows
6
except the current one, so if it is inlined, the current register
7
window of the process executing the instruction will not be flushed
8
correctly.
9
10
See http://bugs.ruby-lang.org/issues/5244 for discussion.
11
*********************************************************************/
12
void
rb_sparc_flush_register_windows
(
void
)
13
{
14
asm
15
#ifdef __GNUC__
16
__volatile__
17
#endif
18
19
/* This condition should be in sync with one in configure.in */
20
#if defined(__sparcv9) || defined(__sparc_v9__) || defined(__arch64__)
21
# ifdef __GNUC__
22
(
"flushw"
: : :
"%o7"
)
23
#
else
24
(
"flushw"
)
25
# endif
/* __GNUC__ */
26
#else
27
(
"ta 0x03"
)
28
#endif
29
;
30
}
31
Generated on Thu May 23 2013 20:33:13 for Ruby by
1.8.3