Instantly share code, notes, and snippets.

anonymous /_ruby_mjitp18966u0.c
Created Feb 6, 2018

Embed
What would you like to do?
#include "/tmp/_mjit_hp18966u0.h"
/* block in calculate@15a.rb:2 */
VALUE _mjit0(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) {
VALUE *stack = reg_cfp->sp;
if (reg_cfp->pc != 0x561e21fc1110) {
return Qundef;
}
label_0: /* nop */
{
reg_cfp->pc = (VALUE *)0x561e21fc1110;
reg_cfp->sp = reg_cfp->bp + 1;
{
/* none */
}
}
label_1: /* getlocal_WC_1 */
{
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x4;
reg_cfp->pc = (VALUE *)0x561e21fc1118;
reg_cfp->sp = reg_cfp->bp + 1;
{
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(VALUE) val;
val = (VALUE)0x834f;
reg_cfp->pc = (VALUE *)0x561e21fc1128;
reg_cfp->sp = reg_cfp->bp + 2;
{
/* */
}
stack[1] = val;
}
label_5: /* opt_mult */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x561e21fc13a0;
cc = (CALL_CACHE)0x561e21fc1420;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = (VALUE *)0x561e21fc1138;
reg_cfp->sp = reg_cfp->bp + 3;
{
val = vm_opt_mult(recv, obj);
if (val == Qundef) {
return Qundef; /* cancel JIT */
}
}
stack[0] = val;
}
label_8: /* putobject */
{
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0xffffffff;
reg_cfp->pc = (VALUE *)0x561e21fc1150;
reg_cfp->sp = reg_cfp->bp + 2;
{
/* */
}
stack[1] = val;
}
label_10: /* opt_mod */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x561e21fc13b0;
cc = (CALL_CACHE)0x561e21fc1448;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = (VALUE *)0x561e21fc1160;
reg_cfp->sp = reg_cfp->bp + 3;
{
val = vm_opt_mod(recv, obj);
if (val == Qundef) {
return Qundef; /* cancel JIT */
}
}
stack[0] = val;
}
label_13: /* setlocal_WC_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];
reg_cfp->pc = (VALUE *)0x561e21fc1178;
reg_cfp->sp = reg_cfp->bp + 2;
{
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(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x3;
reg_cfp->pc = (VALUE *)0x561e21fc1188;
reg_cfp->sp = reg_cfp->bp + 1;
{
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(VALUE) val;
val = (VALUE)0x1791f;
reg_cfp->pc = (VALUE *)0x561e21fc1198;
reg_cfp->sp = reg_cfp->bp + 2;
{
/* */
}
stack[1] = val;
}
label_19: /* opt_mult */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x561e21fc13c0;
cc = (CALL_CACHE)0x561e21fc1470;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = (VALUE *)0x561e21fc11a8;
reg_cfp->sp = reg_cfp->bp + 3;
{
val = vm_opt_mult(recv, obj);
if (val == Qundef) {
return Qundef; /* cancel JIT */
}
}
stack[0] = val;
}
label_22: /* putobject */
{
MAYBE_UNUSED(VALUE) val;
val = (VALUE)0xffffffff;
reg_cfp->pc = (VALUE *)0x561e21fc11c0;
reg_cfp->sp = reg_cfp->bp + 2;
{
/* */
}
stack[1] = val;
}
label_24: /* opt_mod */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x561e21fc13d0;
cc = (CALL_CACHE)0x561e21fc1498;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = (VALUE *)0x561e21fc11d0;
reg_cfp->sp = reg_cfp->bp + 3;
{
val = vm_opt_mod(recv, obj);
if (val == Qundef) {
return Qundef; /* cancel JIT */
}
}
stack[0] = val;
}
label_27: /* setlocal_WC_1 */
{
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x3;
val = stack[0];
reg_cfp->pc = (VALUE *)0x561e21fc11e8;
reg_cfp->sp = reg_cfp->bp + 2;
{
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(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x4;
reg_cfp->pc = (VALUE *)0x561e21fc11f8;
reg_cfp->sp = reg_cfp->bp + 1;
{
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(VALUE) val;
val = (VALUE)0x1ffff;
reg_cfp->pc = (VALUE *)0x561e21fc1208;
reg_cfp->sp = reg_cfp->bp + 2;
{
/* */
}
stack[1] = val;
}
label_33: /* opt_send_without_block */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) val;
ci = (CALL_INFO)0x561e21fc13e0;
cc = (CALL_CACHE)0x561e21fc14c0;
reg_cfp->pc = (VALUE *)0x561e21fc1230;
reg_cfp->sp = reg_cfp->bp + 3;
{
struct rb_calling_info calling;
calling.block_handler = VM_BLOCK_HANDLER_NONE;
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
CALL_METHOD(&calling, ci, cc);
}
stack[0] = val;
if (UNLIKELY(ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS)) {
reg_cfp->sp = reg_cfp->bp + 2;
return Qundef; /* cancel JIT */
}
}
label_36: /* getlocal_WC_1 */
{
MAYBE_UNUSED(VALUE) val;
MAYBE_UNUSED(lindex_t) idx;
MAYBE_UNUSED(rb_num_t) level;
level = 1;
idx = (lindex_t)0x3;
reg_cfp->pc = (VALUE *)0x561e21fc1230;
reg_cfp->sp = reg_cfp->bp + 2;
{
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(VALUE) val;
val = (VALUE)0x1ffff;
reg_cfp->pc = (VALUE *)0x561e21fc1240;
reg_cfp->sp = reg_cfp->bp + 3;
{
/* */
}
stack[2] = val;
}
label_40: /* opt_send_without_block */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) val;
ci = (CALL_INFO)0x561e21fc13f0;
cc = (CALL_CACHE)0x561e21fc14e8;
reg_cfp->pc = (VALUE *)0x561e21fc1268;
reg_cfp->sp = reg_cfp->bp + 4;
{
struct rb_calling_info calling;
calling.block_handler = VM_BLOCK_HANDLER_NONE;
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
CALL_METHOD(&calling, ci, cc);
}
stack[1] = val;
if (UNLIKELY(ruby_vm_event_enabled_flags & ISEQ_TRACE_EVENTS)) {
reg_cfp->sp = reg_cfp->bp + 3;
return Qundef; /* cancel JIT */
}
}
label_43: /* opt_eq */
{
MAYBE_UNUSED(CALL_CACHE) cc;
MAYBE_UNUSED(CALL_INFO) ci;
MAYBE_UNUSED(VALUE) obj, recv, val;
ci = (CALL_INFO)0x561e21fc1400;
cc = (CALL_CACHE)0x561e21fc1510;
recv = stack[0];
obj = stack[1];
reg_cfp->pc = (VALUE *)0x561e21fc1268;
reg_cfp->sp = reg_cfp->bp + 3;
{
val = opt_eq_func(recv, obj, ci, cc);
if (val == Qundef) {
return Qundef; /* cancel JIT */
}
}
stack[0] = val;
}
label_46: /* leave */
{
MAYBE_UNUSED(VALUE) val;
val = stack[0];
reg_cfp->pc = (VALUE *)0x561e21fc1288;
reg_cfp->sp = reg_cfp->bp + 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 {
return val;
}
}
stack[0] = val;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment