| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 3056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3067 .code(); | 3067 .code(); |
| 3068 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3068 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3069 } | 3069 } |
| 3070 | 3070 |
| 3071 | 3071 |
| 3072 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3072 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3073 Register result = ToRegister(instr->result()); | 3073 Register result = ToRegister(instr->result()); |
| 3074 | 3074 |
| 3075 if (instr->hydrogen()->from_inlined()) { | 3075 if (instr->hydrogen()->from_inlined()) { |
| 3076 __ lea(result, Operand(esp, -2 * kPointerSize)); | 3076 __ lea(result, Operand(esp, -2 * kPointerSize)); |
| 3077 } else { | 3077 } else if (instr->hydrogen()->arguments_adaptor()) { |
| 3078 // Check for arguments adapter frame. | 3078 // Check for arguments adapter frame. |
| 3079 Label done, adapted; | 3079 Label done, adapted; |
| 3080 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 3080 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
| 3081 __ mov(result, | 3081 __ mov(result, |
| 3082 Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset)); | 3082 Operand(result, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 3083 __ cmp(Operand(result), | 3083 __ cmp(Operand(result), |
| 3084 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 3084 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 3085 __ j(equal, &adapted, Label::kNear); | 3085 __ j(equal, &adapted, Label::kNear); |
| 3086 | 3086 |
| 3087 // No arguments adaptor frame. | 3087 // No arguments adaptor frame. |
| 3088 __ mov(result, Operand(ebp)); | 3088 __ mov(result, Operand(ebp)); |
| 3089 __ jmp(&done, Label::kNear); | 3089 __ jmp(&done, Label::kNear); |
| 3090 | 3090 |
| 3091 // Arguments adaptor frame present. | 3091 // Arguments adaptor frame present. |
| 3092 __ bind(&adapted); | 3092 __ bind(&adapted); |
| 3093 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | 3093 __ mov(result, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); |
| 3094 | 3094 |
| 3095 // Result is the frame pointer for the frame if not adapted and for the real | 3095 // Result is the frame pointer for the frame if not adapted and for the real |
| 3096 // frame below the adaptor frame if adapted. | 3096 // frame below the adaptor frame if adapted. |
| 3097 __ bind(&done); | 3097 __ bind(&done); |
| 3098 } else { |
| 3099 __ mov(result, Operand(ebp)); |
| 3098 } | 3100 } |
| 3099 } | 3101 } |
| 3100 | 3102 |
| 3101 | 3103 |
| 3102 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 3104 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
| 3103 Operand elem = ToOperand(instr->elements()); | 3105 Operand elem = ToOperand(instr->elements()); |
| 3104 Register result = ToRegister(instr->result()); | 3106 Register result = ToRegister(instr->result()); |
| 3105 | 3107 |
| 3106 Label done; | 3108 Label done; |
| 3107 | 3109 |
| (...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5826 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); | 5828 __ mov(Operand(ebp, StandardFrameConstants::kContextOffset), context); |
| 5827 } | 5829 } |
| 5828 | 5830 |
| 5829 | 5831 |
| 5830 #undef __ | 5832 #undef __ |
| 5831 | 5833 |
| 5832 } // namespace internal | 5834 } // namespace internal |
| 5833 } // namespace v8 | 5835 } // namespace v8 |
| 5834 | 5836 |
| 5835 #endif // V8_TARGET_ARCH_X87 | 5837 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |