OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2994 .code(); | 2994 .code(); |
2995 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2995 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2996 } | 2996 } |
2997 | 2997 |
2998 | 2998 |
2999 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 2999 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3000 Register result = ToRegister(instr->result()); | 3000 Register result = ToRegister(instr->result()); |
3001 | 3001 |
3002 if (instr->hydrogen()->from_inlined()) { | 3002 if (instr->hydrogen()->from_inlined()) { |
3003 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); | 3003 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); |
3004 } else { | 3004 } else if (instr->hydrogen()->arguments_adaptor()) { |
3005 // Check for arguments adapter frame. | 3005 // Check for arguments adapter frame. |
3006 Label done, adapted; | 3006 Label done, adapted; |
3007 __ movp(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 3007 __ movp(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
3008 __ Cmp(Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset), | 3008 __ Cmp(Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset), |
3009 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 3009 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
3010 __ j(equal, &adapted, Label::kNear); | 3010 __ j(equal, &adapted, Label::kNear); |
3011 | 3011 |
3012 // No arguments adaptor frame. | 3012 // No arguments adaptor frame. |
3013 __ movp(result, rbp); | 3013 __ movp(result, rbp); |
3014 __ jmp(&done, Label::kNear); | 3014 __ jmp(&done, Label::kNear); |
3015 | 3015 |
3016 // Arguments adaptor frame present. | 3016 // Arguments adaptor frame present. |
3017 __ bind(&adapted); | 3017 __ bind(&adapted); |
3018 __ movp(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 3018 __ movp(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
3019 | 3019 |
3020 // Result is the frame pointer for the frame if not adapted and for the real | 3020 // Result is the frame pointer for the frame if not adapted and for the real |
3021 // frame below the adaptor frame if adapted. | 3021 // frame below the adaptor frame if adapted. |
3022 __ bind(&done); | 3022 __ bind(&done); |
| 3023 } else { |
| 3024 __ movp(result, rbp); |
3023 } | 3025 } |
3024 } | 3026 } |
3025 | 3027 |
3026 | 3028 |
3027 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 3029 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
3028 Register result = ToRegister(instr->result()); | 3030 Register result = ToRegister(instr->result()); |
3029 | 3031 |
3030 Label done; | 3032 Label done; |
3031 | 3033 |
3032 // If no arguments adaptor frame the number of arguments is fixed. | 3034 // If no arguments adaptor frame the number of arguments is fixed. |
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5576 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context); | 5578 __ movp(Operand(rbp, StandardFrameConstants::kContextOffset), context); |
5577 } | 5579 } |
5578 | 5580 |
5579 | 5581 |
5580 #undef __ | 5582 #undef __ |
5581 | 5583 |
5582 } // namespace internal | 5584 } // namespace internal |
5583 } // namespace v8 | 5585 } // namespace v8 |
5584 | 5586 |
5585 #endif // V8_TARGET_ARCH_X64 | 5587 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |