summaryrefslogtreecommitdiff
path: root/sparc.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-27 10:06:20 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-27 10:06:20 (GMT)
commit5cbc3e15d87eac643a698f72b62d760d9734279c (patch)
tree41463d6781e01f1955ddb4f1f4896e8198f6fc9b /sparc.c
parentef215077bc5d682a86a91d2a7c80e153896b87a7 (diff)
* sparc.c: Use __asm__ instead of asm for gcc.
gcc doesn't provide asm keyword if -ansi option is given. http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sparc.c')
-rw-r--r--sparc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sparc.c b/sparc.c
index 5c5dc8e..dc37790 100644
--- a/sparc.c
+++ b/sparc.c
@@ -12,7 +12,16 @@
void
rb_sparc_flush_register_windows(void)
{
- asm
+/*
+ * 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