OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/arm64/macro-assembler-arm64.h" | 8 #include "src/arm64/macro-assembler-arm64.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 static_cast<uint32_t>(i.InputOperand##width(1).ImmediateValue()); \ | 455 static_cast<uint32_t>(i.InputOperand##width(1).ImmediateValue()); \ |
456 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \ | 456 __ asm_instr(i.OutputRegister##width(), i.InputRegister##width(0), \ |
457 imm % (width)); \ | 457 imm % (width)); \ |
458 } \ | 458 } \ |
459 } while (0) | 459 } while (0) |
460 | 460 |
461 | 461 |
462 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { | 462 void CodeGenerator::AssembleDeconstructActivationRecord(int stack_param_delta) { |
463 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 463 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
464 if (sp_slot_delta > 0) { | 464 if (sp_slot_delta > 0) { |
465 __ Add(jssp, jssp, Operand(sp_slot_delta * kPointerSize)); | 465 __ Drop(sp_slot_delta); |
466 } | 466 } |
467 frame_access_state()->SetFrameAccessToDefault(); | 467 frame_access_state()->SetFrameAccessToDefault(); |
468 } | 468 } |
469 | 469 |
470 | 470 |
471 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { | 471 void CodeGenerator::AssemblePrepareTailCall(int stack_param_delta) { |
472 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); | 472 int sp_slot_delta = TailCallFrameStackSlotDelta(stack_param_delta); |
473 if (sp_slot_delta < 0) { | 473 if (sp_slot_delta < 0) { |
474 __ Sub(jssp, jssp, Operand(-sp_slot_delta * kPointerSize)); | 474 __ Claim(-sp_slot_delta); |
475 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); | 475 frame_access_state()->IncreaseSPDelta(-sp_slot_delta); |
476 } | 476 } |
477 if (frame()->needs_frame()) { | 477 if (frame()->needs_frame()) { |
478 __ Ldr(lr, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); | 478 __ Ldr(lr, MemOperand(fp, StandardFrameConstants::kCallerPCOffset)); |
479 __ Ldr(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 479 __ Ldr(fp, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
480 } | 480 } |
481 frame_access_state()->SetFrameAccessToSP(); | 481 frame_access_state()->SetFrameAccessToSP(); |
482 } | 482 } |
483 | 483 |
484 | 484 |
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 padding_size -= kInstructionSize; | 1565 padding_size -= kInstructionSize; |
1566 } | 1566 } |
1567 } | 1567 } |
1568 } | 1568 } |
1569 | 1569 |
1570 #undef __ | 1570 #undef __ |
1571 | 1571 |
1572 } // namespace compiler | 1572 } // namespace compiler |
1573 } // namespace internal | 1573 } // namespace internal |
1574 } // namespace v8 | 1574 } // namespace v8 |
OLD | NEW |