Project

General

Profile

Bug #15513 » _ruby_mjit_p23890u0.c

kajisha (Hiroshi Kajisha), 01/07/2019 10:38 AM

 
#include "/tmp/_ruby_mjit_hp23890u0.h"
/* block in calculate@/tmp/t.rb:2 */

#undef OPT_CHECKED_RUN
#define OPT_CHECKED_RUN 0

VALUE
_mjit0(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
{
VALUE stack[3];
static const VALUE *const original_body_iseq = (VALUE *)0x55d02f6c0e80;

label_0: /* nop */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
{
/* none */
}
}

label_1: /* getlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x5;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[0] = val;
}

label_3: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0x834f;
{
/* */
}
stack[1] = val;
}

label_5: /* opt_mult */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f37c0;
cc = (CALL_CACHE)0x55d02f6f3840;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_mult(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 5;
goto cancel;
}
}
stack[0] = val;
}

label_8: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0xffffffff;
{
/* */
}
stack[1] = val;
}

label_10: /* opt_mod */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f37d0;
cc = (CALL_CACHE)0x55d02f6f3868;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_mod(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 10;
goto cancel;
}
}
stack[0] = val;
}

label_13: /* setlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x5;
val = stack[0];
{
vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
RB_DEBUG_COUNTER_INC(lvar_set);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
}
}

label_15: /* getlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x4;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[0] = val;
}

label_17: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0x1791f;
{
/* */
}
stack[1] = val;
}

label_19: /* opt_mult */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f37e0;
cc = (CALL_CACHE)0x55d02f6f3890;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_mult(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 19;
goto cancel;
}
}
stack[0] = val;
}

label_22: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0xffffffff;
{
/* */
}
stack[1] = val;
}

label_24: /* opt_mod */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f37f0;
cc = (CALL_CACHE)0x55d02f6f38b8;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_mod(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 24;
goto cancel;
}
}
stack[0] = val;
}

label_27: /* setlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x4;
val = stack[0];
{
vm_env_write(vm_get_ep(GET_EP(), level), -(int)idx, val);
RB_DEBUG_COUNTER_INC(lvar_set);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
}
}

label_29: /* getlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 0;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x5;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[0] = val;
}

label_31: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0x1ffff;
{
/* */
}
stack[1] = val;
}

label_33: /* opt_and */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f3800;
cc = (CALL_CACHE)0x55d02f6f38e0;
recv = stack[0];
obj = stack[1];
{
val = vm_opt_and(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 33;
goto cancel;
}
}
stack[0] = val;
}

label_36: /* getlocal_WC_1 */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x4;
{
val = *(vm_get_ep(GET_EP(), level) - idx);
RB_DEBUG_COUNTER_INC(lvar_get);
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
}
stack[1] = val;
}

label_38: /* putobject */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0x1ffff;
{
/* */
}
stack[2] = val;
}

label_40: /* opt_and */
{
MAYBE_UNUSED(unsigned int) stack_size = 3;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f3810;
cc = (CALL_CACHE)0x55d02f6f3908;
recv = stack[1];
obj = stack[2];
{
val = vm_opt_and(recv, obj);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 4;
reg_cfp->pc = original_body_iseq + 40;
goto cancel;
}
}
stack[1] = val;
}

label_43: /* opt_eq */
{
MAYBE_UNUSED(unsigned int) stack_size = 2;
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x55d02f6f3820;
cc = (CALL_CACHE)0x55d02f6f3930;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = original_body_iseq + 46;
{
val = opt_eq_func(recv, obj, ci, cc);

if (val == Qundef) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 3;
reg_cfp->pc = original_body_iseq + 43;
goto cancel;
}
}
stack[0] = val;
if (UNLIKELY(ruby_vm_event_enabled_global_flags & ISEQ_TRACE_EVENTS)) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 2;
goto cancel;
}
}

label_46: /* nop */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
{
/* none */
}
}

label_47: /* leave */
{
MAYBE_UNUSED(unsigned int) stack_size = 1;
MAYBE_UNUSED(VALUE) val;
val = stack[0];
reg_cfp->pc = original_body_iseq + 48;
reg_cfp->sp = (VALUE *)reg_cfp->bp + 0 + 1;
{
if (OPT_CHECKED_RUN) {
const VALUE *const bp = vm_base_ptr(reg_cfp);
if (reg_cfp->sp != bp) {
vm_stack_consistency_error(ec, reg_cfp, bp);
}
}

RUBY_VM_CHECK_INTS(ec);

if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
#if OPT_CALL_THREADED_CODE
rb_ec_thread_ptr(ec)->retval = val;
return 0;
#else
return val;
#endif
}
else {
#if OPT_CALL_THREADED_CODE
rb_ec_thread_ptr(ec)->retval = val;
return 0;
#else
return val;
#endif
}
}
stack[0] = val;
if (UNLIKELY(ruby_vm_event_enabled_global_flags & ISEQ_TRACE_EVENTS)) {
reg_cfp->sp = (VALUE *)reg_cfp->bp + 2;
goto cancel;
}
}

cancel:
*((VALUE *)reg_cfp->bp + 1) = stack[0];
*((VALUE *)reg_cfp->bp + 2) = stack[1];
*((VALUE *)reg_cfp->bp + 3) = stack[2];
return Qundef;

} /* end of _mjit0 */
(2-2/2)