diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-27 20:03:53 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-27 20:03:53 +0000 |
commit | fd58a0836f2c4d0cf1c03be97011691a29a035ba (patch) | |
tree | 54febd72f25f57e16be29c4dcf7850892bb424d6 /vm.h | |
parent | c1849cf09476181825ab5f59f819245d3559bfa2 (diff) | |
download | ruby-fd58a0836f2c4d0cf1c03be97011691a29a035ba.tar.gz |
* common.mk (run.gdb): fix to load $(srcdir)/.gdbinit
* vm.c (rb_vm_set_finish_env): add a cast.
* vm.h: support __fastcall for MSVC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.h')
-rw-r--r-- | vm.h | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -97,23 +97,32 @@ error ! /************************************************/ #elif OPT_CALL_THREADED_CODE +#define LABEL(x) insn_func_##x +#define ELABEL(x) +#define LABEL_PTR(x) &LABEL(x) + #if __GCC__ -#define FASTCALL __attribute__ ((fastcall)) +#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 #endif - -#define LABEL(x) insn_func_##x -#define ELABEL(x) -#define LABEL_PTR(x) &LABEL(x) - typedef rb_control_frame_t * - (*insn_func_type) (rb_thread_t *, rb_control_frame_t *)FASTCALL; + (FASTCALL_KWD_VC *insn_func_type)(rb_thread_t *, rb_control_frame_t *) FASTCALL_KWD_GCC; #define INSN_ENTRY(insn) \ static rb_control_frame_t * \ - LABEL(insn)(rb_thread_t *th, rb_control_frame_t *reg_cfp) FASTCALL { + FASTCALL(LABEL(insn)(rb_thread_t *th, rb_control_frame_t *reg_cfp)) { #define END_INSN(insn) return reg_cfp;} |