mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
sparc.c was missing in r34199
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
94443cf523
commit
e87360009c
1 changed files with 30 additions and 0 deletions
30
sparc.c
Normal file
30
sparc.c
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/********************************************************************
|
||||||
|
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
|
||||||
|
;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue