aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 13:31:08 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 13:31:08 +0000
commit480c602bdc9ad15c40e093bd1acf9776e3ade5de (patch)
tree75986031b90ef37b150e1a42e19d048f633d2922
parentc4a0a17df12c2bcc3777a846765982e94c2cc3bd (diff)
downloadruby-480c602bdc9ad15c40e093bd1acf9776e3ade5de.tar.gz
* win32/Makefile.sub: define FUNC_FASTCALL macro.
* vm.h: fix to use FUNC_FASTCALL macro. TODO: add FUNC_FASTCALL macro by configure. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--vm.h20
-rw-r--r--win32/Makefile.sub1
3 files changed, 12 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 08377998b7..3020ccc1f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jun 28 22:24:33 2007 Koichi Sasada <ko1@atdot.net>
+
+ * win32/Makefile.sub: define FUNC_FASTCALL macro.
+
+ * vm.h: fix to use FUNC_FASTCALL macro.
+ TODO: add FUNC_FASTCALL macro by configure.
+
Thu Jun 28 19:38:53 2007 Koichi Sasada <ko1@atdot.net>
* compile.c: fix to remove -Wall warnings on gcc.
diff --git a/vm.h b/vm.h
index 3b87033344..072563e1f7 100644
--- a/vm.h
+++ b/vm.h
@@ -101,28 +101,16 @@ error !
#define ELABEL(x)
#define LABEL_PTR(x) &LABEL(x)
-#if __GCC__
-#define FASTCALL(x) x __attribute__ ((fastcall))
-#define FASTCALL_KWD_GCC __attribute__ ((fastcall))
-#define FASTCALL_KWD_VC
-
-#elif defined(_MSC_VER)
-#define FASTCALL(x) __fastcall x
-#define FASTCALL_KWD_GCC
-#define FASTCALL_KWD_VC __fastcall
-#else
-
-#define FASTCALL
-#define FASTCALL_KWD_GCC
-#define FASTCALL_KWD_VC
+#ifndef FUNC_FASTCALL
+#define FUNC_FASTCALL(x) x
#endif
typedef rb_control_frame_t *
- (FASTCALL_KWD_VC *insn_func_type)(rb_thread_t *, rb_control_frame_t *) FASTCALL_KWD_GCC;
+ (FUNC_FASTCALL(*insn_func_type))(rb_thread_t *, rb_control_frame_t *);
#define INSN_ENTRY(insn) \
static rb_control_frame_t * \
- FASTCALL(LABEL(insn)(rb_thread_t *th, rb_control_frame_t *reg_cfp)) {
+ FUNC_FASTCALL(LABEL(insn))(rb_thread_t *th, rb_control_frame_t *reg_cfp) {
#define END_INSN(insn) return reg_cfp;}
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index b9d02efcb3..0f4d7172fa 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -279,6 +279,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub
!endif
#define FUNC_STDCALL(x) __stdcall x
#define FUNC_CDECL(x) __cdecl x
+#define FUNC_FASTCALL(x) __fastcall x
#define RUBY_EXTERN extern __declspec(dllimport)
#define HAVE_DECL_SYS_NERR 1
#define HAVE_LIMITS_H 1