зеркало из https://github.com/github/ruby.git
Avoid defining DISPATCH_ARCH_DEPEND_WAY macro
when it's not used. This macro is not used when it's direct threaded code. This patch is purely for readability and has no impact for any behavior.
This commit is contained in:
Родитель
a9b63db3b6
Коммит
ae8b977742
22
vm_exec.h
22
vm_exec.h
|
@ -90,16 +90,6 @@ error !
|
|||
LABEL(insn): \
|
||||
INSN_ENTRY_SIG(insn); \
|
||||
|
||||
/* dispatcher */
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3
|
||||
#define DISPATCH_ARCH_DEPEND_WAY(addr) \
|
||||
__asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr))
|
||||
|
||||
#else
|
||||
#define DISPATCH_ARCH_DEPEND_WAY(addr) \
|
||||
/* do nothing */
|
||||
#endif
|
||||
|
||||
/**********************************/
|
||||
#if OPT_DIRECT_THREADED_CODE
|
||||
|
||||
|
@ -112,14 +102,22 @@ error !
|
|||
#else
|
||||
/* token threaded code */
|
||||
|
||||
/* dispatcher */
|
||||
#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && __GNUC__ == 3
|
||||
#define DISPATCH_ARCH_DEPEND_WAY(addr) \
|
||||
__asm__ __volatile__("jmp *%0;\t# -- inserted by vm.h\t[length = 2]" : : "r" (addr))
|
||||
|
||||
#else
|
||||
#define DISPATCH_ARCH_DEPEND_WAY(addr) \
|
||||
/* do nothing */
|
||||
#endif
|
||||
#define TC_DISPATCH(insn) \
|
||||
DISPATCH_ARCH_DEPEND_WAY(insns_address_table[GET_CURRENT_INSN()]); \
|
||||
INSN_DISPATCH_SIG(insn); \
|
||||
RB_GNUC_EXTENSION_BLOCK(goto *insns_address_table[GET_CURRENT_INSN()]); \
|
||||
rb_bug("tc error");
|
||||
|
||||
|
||||
#endif /* DISPATCH_DIRECT_THREADED_CODE */
|
||||
#endif /* OPT_DIRECT_THREADED_CODE */
|
||||
|
||||
#define END_INSN(insn) \
|
||||
DEBUG_END_INSN(); \
|
||||
|
|
Загрузка…
Ссылка в новой задаче