summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-12 07:14:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-12 07:14:43 +0000
commitd6cd22dbc55b6b3507aa0193185b45c99ff37889 (patch)
tree5e50adb6bc8a779aa97910905dba67868959257c
parent767ab942bc4edddee2e92a86ac93c46dd3d8df94 (diff)
Export rb_flo_div_flo for MJIT
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--numeric.c2
-rw-r--r--test/ruby/test_jit.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/numeric.c b/numeric.c
index f51f398b4f..6ec7caf921 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1104,7 +1104,7 @@ double_div_double(double x, double y)
}
}
-VALUE
+MJIT_FUNC_EXPORTED VALUE
rb_flo_div_flo(VALUE x, VALUE y)
{
double num = RFLOAT_VALUE(x);
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index dbc8732e4c..b1c43bd5dc 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -463,6 +463,7 @@ class TestJIT < Test::Unit::TestCase
def test_compile_insn_opt_calc
assert_compile_once('4 + 2 - ((2 * 3 / 2) % 2)', result_inspect: '5', insns: %i[opt_plus opt_minus opt_mult opt_div opt_mod])
+ assert_compile_once('4.0 + 2.0 - ((2.0 * 3.0 / 2.0) % 2.0)', result_inspect: '5.0', insns: %i[opt_plus opt_minus opt_mult opt_div opt_mod])
assert_compile_once('4 + 2', result_inspect: '6')
end