summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
diff options
context:
space:
mode:
authorKevin Deisz <kevin.deisz@gmail.com>2021-07-06 16:26:56 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:37 -0400
commitba9aa1f8efb77c6cf58ec4ea6bb81ced17acbc2b (patch)
tree4efd2fd8946b958717d236858647e4ea22594d50 /yjit_codegen.c
parentb0ae4fdcfbe0004908adcc44f0ae0e3a3762917b (diff)
Implement opt_div
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r--yjit_codegen.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/yjit_codegen.c b/yjit_codegen.c
index ab838a233a..8cb5a105ce 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -1940,6 +1940,13 @@ gen_opt_mult(jitstate_t* jit, ctx_t* ctx)
return gen_opt_send_without_block(jit, ctx);
}
+static codegen_status_t
+gen_opt_div(jitstate_t* jit, ctx_t* ctx)
+{
+ // Delegate to send, call the method on the recv
+ return gen_opt_send_without_block(jit, ctx);
+}
+
VALUE rb_vm_opt_mod(VALUE recv, VALUE obj);
static codegen_status_t
@@ -3470,6 +3477,7 @@ yjit_init_codegen(void)
yjit_reg_op(BIN(opt_minus), gen_opt_minus);
yjit_reg_op(BIN(opt_plus), gen_opt_plus);
yjit_reg_op(BIN(opt_mult), gen_opt_mult);
+ yjit_reg_op(BIN(opt_div), gen_opt_div);
yjit_reg_op(BIN(opt_mod), gen_opt_mod);
yjit_reg_op(BIN(opt_ltlt), gen_opt_ltlt);
yjit_reg_op(BIN(opt_nil_p), gen_opt_nil_p);