Index: src/x87/codegen-x87.cc |
diff --git a/src/x87/codegen-x87.cc b/src/x87/codegen-x87.cc |
index 496cfb410a11334db9fea6931649dec49a99004c..87b76508a1098f2b9867c960954e56be78b1d555 100644 |
--- a/src/x87/codegen-x87.cc |
+++ b/src/x87/codegen-x87.cc |
@@ -32,21 +32,20 @@ void StubRuntimeCallHelper::AfterCall(MacroAssembler* masm) const { |
#define __ masm. |
-double x87_std_exp(double x, Isolate* isolate) { return std::exp(x); } |
UnaryMathFunctionWithIsolate CreateExpFunction(Isolate* isolate) { |
- return x87_std_exp; |
+ return nullptr; |
} |
-UnaryMathFunction CreateSqrtFunction() { |
+UnaryMathFunctionWithIsolate CreateSqrtFunction(Isolate* isolate) { |
size_t actual_size; |
// Allocate buffer in executable space. |
byte* buffer = |
static_cast<byte*>(base::OS::Allocate(1 * KB, &actual_size, true)); |
- if (buffer == NULL) return &std::sqrt; |
+ if (buffer == nullptr) return nullptr; |
- MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size), |
+ MacroAssembler masm(isolate, buffer, static_cast<int>(actual_size), |
CodeObjectRequired::kNo); |
// Load double input into registers. |
__ fld_d(MemOperand(esp, 4)); |
@@ -59,9 +58,9 @@ UnaryMathFunction CreateSqrtFunction() { |
masm.GetCode(&desc); |
DCHECK(!RelocInfo::RequiresRelocation(desc)); |
- Assembler::FlushICacheWithoutIsolate(buffer, actual_size); |
+ Assembler::FlushICache(isolate, buffer, actual_size); |
base::OS::ProtectCode(buffer, actual_size); |
- return FUNCTION_CAST<UnaryMathFunction>(buffer); |
+ return FUNCTION_CAST<UnaryMathFunctionWithIsolate>(buffer); |
} |