From 6d50d62258e9a76df98ab604293851cc2a8a4625 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 14 Jun 2017 16:46:29 +0200 Subject: [PATCH] Bug 1372883: wasm baseline: don't read returned values from x87 FPU stack on x86; r=lth MozReview-Commit-ID: L2ovA8EXqy1 --HG-- extra : rebase_source : efc48ad1244dbb298eec937d738eb32d7a37e247 extra : amend_source : f8577e6f60e51df6733f0ab2422b1ce16c12ab8a --- js/src/wasm/WasmBaselineCompile.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/js/src/wasm/WasmBaselineCompile.cpp b/js/src/wasm/WasmBaselineCompile.cpp index d8eda0f9a629..43cc37c9d9f1 100644 --- a/js/src/wasm/WasmBaselineCompile.cpp +++ b/js/src/wasm/WasmBaselineCompile.cpp @@ -2747,15 +2747,7 @@ class BaseCompiler RegF32 rv = RegF32(ReturnFloat32Reg); MOZ_ASSERT(isAvailable(rv)); needF32(rv); -#if defined(JS_CODEGEN_X86) - if (call.usesSystemAbi) { - masm.reserveStack(sizeof(float)); - Operand op(esp, 0); - masm.fstp32(op); - masm.loadFloat32(op, rv); - masm.freeStack(sizeof(float)); - } -#elif defined(JS_CODEGEN_ARM) +#if defined(JS_CODEGEN_ARM) if (call.usesSystemAbi && !call.hardFP) masm.ma_vxfer(r0, rv); #endif @@ -2766,15 +2758,7 @@ class BaseCompiler RegF64 rv = RegF64(ReturnDoubleReg); MOZ_ASSERT(isAvailable(rv)); needF64(rv); -#if defined(JS_CODEGEN_X86) - if (call.usesSystemAbi) { - masm.reserveStack(sizeof(double)); - Operand op(esp, 0); - masm.fstp(op); - masm.loadDouble(op, rv); - masm.freeStack(sizeof(double)); - } -#elif defined(JS_CODEGEN_ARM) +#if defined(JS_CODEGEN_ARM) if (call.usesSystemAbi && !call.hardFP) masm.ma_vxfer(r0, r1, rv); #endif