Index: src/assembler.cc |
=================================================================== |
--- src/assembler.cc (revision 2339) |
+++ src/assembler.cc (working copy) |
@@ -608,6 +608,16 @@ |
} |
+static double div_two_doubles(double x, double y) { |
+ return x / y; |
+} |
+ |
+ |
+static double mod_two_doubles(double x, double y) { |
+ return fmod(x, y); |
+} |
+ |
+ |
static int native_compare_doubles(double x, double y) { |
if (x == y) return 0; |
return x < y ? 1 : -1; |
@@ -628,6 +638,12 @@ |
case Token::MUL: |
function = &mul_two_doubles; |
break; |
+ case Token::DIV: |
+ function = &div_two_doubles; |
+ break; |
+ case Token::MOD: |
+ function = &mod_two_doubles; |
+ break; |
default: |
UNREACHABLE(); |
} |