14 #if VM_COLLECT_USAGE_DETAILS 15 static void vm_analysis_insn(
int insn);
19 #define DECL_SC_REG(type, r, reg) register type reg_##r 21 #elif defined(__GNUC__) && defined(__x86_64__) 22 #define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("r" reg) 24 #elif defined(__GNUC__) && defined(__i386__) 25 #define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("e" reg) 27 #elif defined(__GNUC__) && defined(__powerpc64__) 28 #define DECL_SC_REG(type, r, reg) register type reg_##r __asm__("r" reg) 31 #define DECL_SC_REG(type, r, reg) register type reg_##r 35 #if VM_DEBUG_STACKOVERFLOW 36 NORETURN(
static void vm_stack_overflow_for_insn(
void));
38 vm_stack_overflow_for_insn(
void)
40 rb_bug(
"CHECK_VM_STACK_OVERFLOW_FOR_INSN: should not overflow here. " 41 "Please contact ruby-core/dev with your (a part of) script. " 42 "This check will be removed soon.");
46 #if !OPT_CALL_THREADED_CODE 53 #elif __GNUC__ && __x86_64__ && !defined(__native_client__) 62 #if defined(__GNUC__) && defined(__i386__) 65 #define USE_MACHINE_REGS 1 67 #elif defined(__GNUC__) && defined(__x86_64__) 69 # if defined(__native_client__) 74 #define USE_MACHINE_REGS 1 76 #elif defined(__GNUC__) && defined(__powerpc64__) 79 #define USE_MACHINE_REGS 1 89 #define RESTORE_REGS() \ 91 VM_REG_CFP = th->ec.cfp; \ 92 reg_pc = reg_cfp->pc; \ 96 #define VM_REG_PC reg_pc 98 #define GET_PC() (reg_pc) 100 #define SET_PC(x) (reg_cfp->pc = VM_REG_PC = (x)) 103 #if OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE 106 return (
VALUE)insns_address_table;
109 reg_cfp = th->
ec.
cfp;
110 reg_pc = reg_cfp->
pc;
112 #if OPT_STACK_CACHING 125 rb_bug(
"vm_eval: unreachable");
132 return (
const void **)vm_exec_core(0, 0);
143 return (
const void **)insns_address_table;
159 if (th->retval !=
Qundef) {
160 VALUE ret = th->retval;
#define END_INSNS_DISPATCH()
void rb_bug(const char *fmt,...)
const void ** rb_vm_get_insns_address_table(void)
#define DECL_SC_REG(type, r, reg)
rb_control_frame_t *FUNC_FASTCALL rb_insn_func_t(rb_thread_t *, rb_control_frame_t *)
rb_execution_context_t ec