| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 } else { | 1218 } else { |
| 1219 Label* true_label = chunk_->GetAssemblyLabel(true_block); | 1219 Label* true_label = chunk_->GetAssemblyLabel(true_block); |
| 1220 Label* false_label = chunk_->GetAssemblyLabel(false_block); | 1220 Label* false_label = chunk_->GetAssemblyLabel(false_block); |
| 1221 | 1221 |
| 1222 __ CompareRoot(reg, Heap::kUndefinedValueRootIndex); | 1222 __ CompareRoot(reg, Heap::kUndefinedValueRootIndex); |
| 1223 __ j(equal, false_label); | 1223 __ j(equal, false_label); |
| 1224 __ CompareRoot(reg, Heap::kTrueValueRootIndex); | 1224 __ CompareRoot(reg, Heap::kTrueValueRootIndex); |
| 1225 __ j(equal, true_label); | 1225 __ j(equal, true_label); |
| 1226 __ CompareRoot(reg, Heap::kFalseValueRootIndex); | 1226 __ CompareRoot(reg, Heap::kFalseValueRootIndex); |
| 1227 __ j(equal, false_label); | 1227 __ j(equal, false_label); |
| 1228 __ SmiCompare(reg, Smi::FromInt(0)); | 1228 __ Cmp(reg, Smi::FromInt(0)); |
| 1229 __ j(equal, false_label); | 1229 __ j(equal, false_label); |
| 1230 __ JumpIfSmi(reg, true_label); | 1230 __ JumpIfSmi(reg, true_label); |
| 1231 | 1231 |
| 1232 // Test for double values. Plus/minus zero and NaN are false. | 1232 // Test for double values. Plus/minus zero and NaN are false. |
| 1233 NearLabel call_stub; | 1233 NearLabel call_stub; |
| 1234 __ CompareRoot(FieldOperand(reg, HeapObject::kMapOffset), | 1234 __ CompareRoot(FieldOperand(reg, HeapObject::kMapOffset), |
| 1235 Heap::kHeapNumberMapRootIndex); | 1235 Heap::kHeapNumberMapRootIndex); |
| 1236 __ j(not_equal, &call_stub); | 1236 __ j(not_equal, &call_stub); |
| 1237 | 1237 |
| 1238 // HeapNumber => false iff +0, -0, or NaN. These three cases set the | 1238 // HeapNumber => false iff +0, -0, or NaN. These three cases set the |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2170 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2170 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2171 } | 2171 } |
| 2172 | 2172 |
| 2173 | 2173 |
| 2174 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 2174 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 2175 Register result = ToRegister(instr->result()); | 2175 Register result = ToRegister(instr->result()); |
| 2176 | 2176 |
| 2177 // Check for arguments adapter frame. | 2177 // Check for arguments adapter frame. |
| 2178 NearLabel done, adapted; | 2178 NearLabel done, adapted; |
| 2179 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 2179 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
| 2180 __ SmiCompare(Operand(result, StandardFrameConstants::kContextOffset), | 2180 __ Cmp(Operand(result, StandardFrameConstants::kContextOffset), |
| 2181 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 2181 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
| 2182 __ j(equal, &adapted); | 2182 __ j(equal, &adapted); |
| 2183 | 2183 |
| 2184 // No arguments adaptor frame. | 2184 // No arguments adaptor frame. |
| 2185 __ movq(result, rbp); | 2185 __ movq(result, rbp); |
| 2186 __ jmp(&done); | 2186 __ jmp(&done); |
| 2187 | 2187 |
| 2188 // Arguments adaptor frame present. | 2188 // Arguments adaptor frame present. |
| 2189 __ bind(&adapted); | 2189 __ bind(&adapted); |
| 2190 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 2190 __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
| 2191 | 2191 |
| (...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3604 EmitBranch(true_block, false_block, equal); | 3604 EmitBranch(true_block, false_block, equal); |
| 3605 } | 3605 } |
| 3606 | 3606 |
| 3607 | 3607 |
| 3608 void LCodeGen::EmitIsConstructCall(Register temp) { | 3608 void LCodeGen::EmitIsConstructCall(Register temp) { |
| 3609 // Get the frame pointer for the calling frame. | 3609 // Get the frame pointer for the calling frame. |
| 3610 __ movq(temp, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); | 3610 __ movq(temp, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
| 3611 | 3611 |
| 3612 // Skip the arguments adaptor frame if it exists. | 3612 // Skip the arguments adaptor frame if it exists. |
| 3613 NearLabel check_frame_marker; | 3613 NearLabel check_frame_marker; |
| 3614 __ SmiCompare(Operand(temp, StandardFrameConstants::kContextOffset), | 3614 __ Cmp(Operand(temp, StandardFrameConstants::kContextOffset), |
| 3615 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 3615 Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
| 3616 __ j(not_equal, &check_frame_marker); | 3616 __ j(not_equal, &check_frame_marker); |
| 3617 __ movq(temp, Operand(rax, StandardFrameConstants::kCallerFPOffset)); | 3617 __ movq(temp, Operand(rax, StandardFrameConstants::kCallerFPOffset)); |
| 3618 | 3618 |
| 3619 // Check the marker in the calling frame. | 3619 // Check the marker in the calling frame. |
| 3620 __ bind(&check_frame_marker); | 3620 __ bind(&check_frame_marker); |
| 3621 __ SmiCompare(Operand(temp, StandardFrameConstants::kMarkerOffset), | 3621 __ Cmp(Operand(temp, StandardFrameConstants::kMarkerOffset), |
| 3622 Smi::FromInt(StackFrame::CONSTRUCT)); | 3622 Smi::FromInt(StackFrame::CONSTRUCT)); |
| 3623 } | 3623 } |
| 3624 | 3624 |
| 3625 | 3625 |
| 3626 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { | 3626 void LCodeGen::DoLazyBailout(LLazyBailout* instr) { |
| 3627 // No code for lazy bailout instruction. Used to capture environment after a | 3627 // No code for lazy bailout instruction. Used to capture environment after a |
| 3628 // call for populating the safepoint data with deoptimization data. | 3628 // call for populating the safepoint data with deoptimization data. |
| 3629 } | 3629 } |
| 3630 | 3630 |
| 3631 | 3631 |
| 3632 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { | 3632 void LCodeGen::DoDeoptimize(LDeoptimize* instr) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3694 RegisterEnvironmentForDeoptimization(environment); | 3694 RegisterEnvironmentForDeoptimization(environment); |
| 3695 ASSERT(osr_pc_offset_ == -1); | 3695 ASSERT(osr_pc_offset_ == -1); |
| 3696 osr_pc_offset_ = masm()->pc_offset(); | 3696 osr_pc_offset_ = masm()->pc_offset(); |
| 3697 } | 3697 } |
| 3698 | 3698 |
| 3699 #undef __ | 3699 #undef __ |
| 3700 | 3700 |
| 3701 } } // namespace v8::internal | 3701 } } // namespace v8::internal |
| 3702 | 3702 |
| 3703 #endif // V8_TARGET_ARCH_X64 | 3703 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |