Commit 6bd37e3f authored by jgruber's avatar jgruber Committed by Commit bot

[builtins] Fix clobbered reg in Math.{Max,Min}

edi is expected to contain the JS function. Ensure that it is not
overwritten.

BUG=chromium:621431,chromium:621550,chromium:621217
R=bmeurer@chromium.org

Review-Url: https://codereview.chromium.org/2085043004
Cr-Commit-Position: refs/heads/master@{#37173}
parent 2618eb0a
......@@ -1668,8 +1668,10 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
// Left and right hand side are equal, check for -0 vs. +0.
__ bind(&compare_equal);
__ Push(edi); // Preserve function in edi.
__ movmskpd(edi, reg);
__ test(edi, Immediate(1));
__ Pop(edi);
__ j(not_zero, &compare_swap);
__ bind(&done_compare);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment