mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
c4a0a17df1
commit
480c602bdc
3 changed files with 12 additions and 16 deletions
20
vm.h
20
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;}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue