diff --git a/insns.def b/insns.def index 1c2c074c5c..f21a1810a5 100644 --- a/insns.def +++ b/insns.def @@ -1481,6 +1481,7 @@ opt_and (CALL_DATA cd) (VALUE recv, VALUE obj) (VALUE val) +// attr bool zjit_profile = true; { val = vm_opt_and(recv, obj); @@ -1495,6 +1496,7 @@ opt_or (CALL_DATA cd) (VALUE recv, VALUE obj) (VALUE val) +// attr bool zjit_profile = true; { val = vm_opt_or(recv, obj); diff --git a/zjit/src/cruby_bindings.inc.rs b/zjit/src/cruby_bindings.inc.rs index dcb9cb5ce2..8510e02efd 100644 --- a/zjit/src/cruby_bindings.inc.rs +++ b/zjit/src/cruby_bindings.inc.rs @@ -695,7 +695,9 @@ pub const YARVINSN_zjit_opt_lt: ruby_vminsn_type = 231; pub const YARVINSN_zjit_opt_le: ruby_vminsn_type = 232; pub const YARVINSN_zjit_opt_gt: ruby_vminsn_type = 233; pub const YARVINSN_zjit_opt_ge: ruby_vminsn_type = 234; -pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 235; +pub const YARVINSN_zjit_opt_and: ruby_vminsn_type = 235; +pub const YARVINSN_zjit_opt_or: ruby_vminsn_type = 236; +pub const VM_INSTRUCTION_SIZE: ruby_vminsn_type = 237; pub type ruby_vminsn_type = u32; pub type rb_iseq_callback = ::std::option::Option< unsafe extern "C" fn(arg1: *const rb_iseq_t, arg2: *mut ::std::os::raw::c_void), diff --git a/zjit/src/profile.rs b/zjit/src/profile.rs index 92d74053ff..f4cba221a0 100644 --- a/zjit/src/profile.rs +++ b/zjit/src/profile.rs @@ -63,6 +63,8 @@ fn profile_insn(profiler: &mut Profiler, opcode: ruby_vminsn_type) { YARVINSN_opt_le => profile_operands(profiler, 2), YARVINSN_opt_gt => profile_operands(profiler, 2), YARVINSN_opt_ge => profile_operands(profiler, 2), + YARVINSN_opt_and => profile_operands(profiler, 2), + YARVINSN_opt_or => profile_operands(profiler, 2), YARVINSN_opt_send_without_block => { let cd: *const rb_call_data = profiler.insn_opnd(0).as_ptr(); let argc = unsafe { vm_ci_argc((*cd).ci) };