| 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 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1368 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset)); | 1368 __ LoadP(index, FieldMemOperand(closure, JSFunction::kLiteralsOffset)); |
| 1369 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset)); | 1369 __ LoadP(index, FieldMemOperand(index, LiteralsArray::kFeedbackVectorOffset)); |
| 1370 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime); | 1370 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, &gotta_call_runtime); |
| 1371 | 1371 |
| 1372 __ LoadP(map, | 1372 __ LoadP(map, |
| 1373 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1373 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1374 __ LoadP(map, | 1374 __ LoadP(map, |
| 1375 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); | 1375 FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); |
| 1376 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); | 1376 __ LoadP(index, FieldMemOperand(map, FixedArray::kLengthOffset)); |
| 1377 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); | 1377 __ CmpSmiLiteral(index, Smi::FromInt(2), r0); |
| 1378 __ blt(&try_shared); | 1378 __ blt(&gotta_call_runtime); |
| 1379 | 1379 |
| 1380 // r10 : native context | 1380 // r10 : native context |
| 1381 // r5 : length / index | 1381 // r5 : length / index |
| 1382 // r9 : optimized code map | 1382 // r9 : optimized code map |
| 1383 // r6 : new target | 1383 // r6 : new target |
| 1384 // r4 : closure | 1384 // r4 : closure |
| 1385 Register native_context = r10; | 1385 Register native_context = r10; |
| 1386 __ LoadP(native_context, NativeContextMemOperand()); | 1386 __ LoadP(native_context, NativeContextMemOperand()); |
| 1387 | 1387 |
| 1388 __ bind(&loop_top); | 1388 __ bind(&loop_top); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 __ RecordWriteContextSlot(native_context, function_list_offset, r8, temp, | 1433 __ RecordWriteContextSlot(native_context, function_list_offset, r8, temp, |
| 1434 kLRHasNotBeenSaved, kDontSaveFPRegs); | 1434 kLRHasNotBeenSaved, kDontSaveFPRegs); |
| 1435 __ JumpToJSEntry(entry); | 1435 __ JumpToJSEntry(entry); |
| 1436 | 1436 |
| 1437 __ bind(&loop_bottom); | 1437 __ bind(&loop_bottom); |
| 1438 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), | 1438 __ SubSmiLiteral(index, index, Smi::FromInt(SharedFunctionInfo::kEntryLength), |
| 1439 r0); | 1439 r0); |
| 1440 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); | 1440 __ CmpSmiLiteral(index, Smi::FromInt(1), r0); |
| 1441 __ bgt(&loop_top); | 1441 __ bgt(&loop_top); |
| 1442 | 1442 |
| 1443 // We found no code. Try the SharedFunctionInfo. | 1443 // We found no code. |
| 1444 __ b(&gotta_call_runtime); |
| 1445 |
| 1444 __ bind(&try_shared); | 1446 __ bind(&try_shared); |
| 1445 __ LoadP(entry, | 1447 __ LoadP(entry, |
| 1446 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1448 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1447 // Is the shared function marked for tier up? | 1449 // Is the shared function marked for tier up? |
| 1448 __ lbz(r8, FieldMemOperand(entry, | 1450 __ lbz(r8, FieldMemOperand(entry, |
| 1449 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1451 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
| 1450 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); | 1452 __ TestBit(r8, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); |
| 1451 __ bne(&gotta_call_runtime, cr0); | 1453 __ bne(&gotta_call_runtime, cr0); |
| 1452 | 1454 |
| 1453 // If SFI points to anything other than CompileLazy, install that. | 1455 // If SFI points to anything other than CompileLazy, install that. |
| (...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2965 __ CallRuntime(Runtime::kThrowStackOverflow); | 2967 __ CallRuntime(Runtime::kThrowStackOverflow); |
| 2966 __ bkpt(0); | 2968 __ bkpt(0); |
| 2967 } | 2969 } |
| 2968 } | 2970 } |
| 2969 | 2971 |
| 2970 #undef __ | 2972 #undef __ |
| 2971 } // namespace internal | 2973 } // namespace internal |
| 2972 } // namespace v8 | 2974 } // namespace v8 |
| 2973 | 2975 |
| 2974 #endif // V8_TARGET_ARCH_PPC | 2976 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |