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/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 2533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { | 2544 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
2545 Register reg = ToRegister(instr->value()); | 2545 Register reg = ToRegister(instr->value()); |
2546 Register temp = ToRegister(instr->temp()); | 2546 Register temp = ToRegister(instr->temp()); |
2547 | 2547 |
2548 __ LoadP(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); | 2548 __ LoadP(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); |
2549 __ Cmpi(temp, Operand(instr->map()), r0); | 2549 __ Cmpi(temp, Operand(instr->map()), r0); |
2550 EmitBranch(instr, eq); | 2550 EmitBranch(instr, eq); |
2551 } | 2551 } |
2552 | 2552 |
2553 | 2553 |
2554 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { | |
2555 DCHECK(ToRegister(instr->context()).is(cp)); | |
2556 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister())); | |
2557 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister())); | |
2558 DCHECK(ToRegister(instr->result()).is(r3)); | |
2559 InstanceOfStub stub(isolate()); | |
2560 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
2561 } | |
2562 | |
2563 | |
2564 void LCodeGen::DoHasInPrototypeChainAndBranch( | 2554 void LCodeGen::DoHasInPrototypeChainAndBranch( |
2565 LHasInPrototypeChainAndBranch* instr) { | 2555 LHasInPrototypeChainAndBranch* instr) { |
2566 Register const object = ToRegister(instr->object()); | 2556 Register const object = ToRegister(instr->object()); |
2567 Register const object_map = scratch0(); | 2557 Register const object_map = scratch0(); |
2568 Register const object_instance_type = ip; | 2558 Register const object_instance_type = ip; |
2569 Register const object_prototype = object_map; | 2559 Register const object_prototype = object_map; |
2570 Register const prototype = ToRegister(instr->prototype()); | 2560 Register const prototype = ToRegister(instr->prototype()); |
2571 | 2561 |
2572 // The {object} must be a spec object. It's sufficient to know that {object} | 2562 // The {object} must be a spec object. It's sufficient to know that {object} |
2573 // is not a smi, since all other non-spec objects have {null} prototypes and | 2563 // is not a smi, since all other non-spec objects have {null} prototypes and |
(...skipping 3259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5833 __ LoadP(result, | 5823 __ LoadP(result, |
5834 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5824 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
5835 __ bind(deferred->exit()); | 5825 __ bind(deferred->exit()); |
5836 __ bind(&done); | 5826 __ bind(&done); |
5837 } | 5827 } |
5838 | 5828 |
5839 #undef __ | 5829 #undef __ |
5840 | 5830 |
5841 } // namespace internal | 5831 } // namespace internal |
5842 } // namespace v8 | 5832 } // namespace v8 |
OLD | NEW |