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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 // We found neither literals nor code. | 1499 // We found neither literals nor code. |
1500 __ b(&gotta_call_runtime); | 1500 __ b(&gotta_call_runtime); |
1501 | 1501 |
1502 __ bind(&try_shared); | 1502 __ bind(&try_shared); |
1503 __ LoadP(entry, | 1503 __ LoadP(entry, |
1504 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1504 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1505 // Is the shared function marked for tier up? | 1505 // Is the shared function marked for tier up? |
1506 __ lbz(r8, FieldMemOperand(entry, | 1506 __ lbz(r8, FieldMemOperand(entry, |
1507 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1507 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1508 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); | 1508 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); |
1509 __ beq(&gotta_call_runtime); | 1509 __ bne(&gotta_call_runtime); |
1510 // Is the full code valid? | 1510 // Is the full code valid? |
1511 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1511 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1512 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); | 1512 __ lwz(r8, FieldMemOperand(entry, Code::kFlagsOffset)); |
1513 __ DecodeField<Code::KindField>(r8); | 1513 __ DecodeField<Code::KindField>(r8); |
1514 __ cmpi(r8, Operand(Code::BUILTIN)); | 1514 __ cmpi(r8, Operand(Code::BUILTIN)); |
1515 __ beq(&gotta_call_runtime); | 1515 __ beq(&gotta_call_runtime); |
1516 // Yes, install the full code. | 1516 // Yes, install the full code. |
1517 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1517 __ addi(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1518 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); | 1518 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); |
1519 __ RecordWriteCodeEntryField(closure, entry, r8); | 1519 __ RecordWriteCodeEntryField(closure, entry, r8); |
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3001 __ CallRuntime(Runtime::kThrowStackOverflow); | 3001 __ CallRuntime(Runtime::kThrowStackOverflow); |
3002 __ bkpt(0); | 3002 __ bkpt(0); |
3003 } | 3003 } |
3004 } | 3004 } |
3005 | 3005 |
3006 #undef __ | 3006 #undef __ |
3007 } // namespace internal | 3007 } // namespace internal |
3008 } // namespace v8 | 3008 } // namespace v8 |
3009 | 3009 |
3010 #endif // V8_TARGET_ARCH_PPC | 3010 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |