Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index 645b92d4372d81101962dcd601010f9031898b14..29eb43224e6cd5c5e7b5bda19a8fa966c4345813 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -1566,7 +1566,7 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
// get a pointer which will work well with LAccessArgumentsAt. |
DCHECK(masm()->StackPointer().Is(jssp)); |
__ Sub(result, jssp, 2 * kPointerSize); |
- } else { |
+ } else if (instr->hydrogen()->arguments_adaptor()) { |
DCHECK(instr->temp() != NULL); |
Register previous_fp = ToRegister(instr->temp()); |
@@ -1576,6 +1576,8 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
CommonFrameConstants::kContextOrFrameTypeOffset)); |
__ Cmp(result, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
__ Csel(result, fp, previous_fp, ne); |
+ } else { |
+ __ Mov(result, fp); |
} |
} |