| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1352 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, | 1352 __ JumpIfRoot(index, Heap::kUndefinedValueRootIndex, |
| 1353 &gotta_call_runtime_no_stack); | 1353 &gotta_call_runtime_no_stack); |
| 1354 | 1354 |
| 1355 __ push(argument_count); | 1355 __ push(argument_count); |
| 1356 __ push(new_target); | 1356 __ push(new_target); |
| 1357 __ push(closure); | 1357 __ push(closure); |
| 1358 | 1358 |
| 1359 __ ld(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1359 __ ld(map, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1360 __ ld(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); | 1360 __ ld(map, FieldMemOperand(map, SharedFunctionInfo::kOptimizedCodeMapOffset)); |
| 1361 __ ld(index, FieldMemOperand(map, FixedArray::kLengthOffset)); | 1361 __ ld(index, FieldMemOperand(map, FixedArray::kLengthOffset)); |
| 1362 __ Branch(&try_shared, lt, index, Operand(Smi::FromInt(2))); | 1362 __ Branch(&gotta_call_runtime, lt, index, Operand(Smi::FromInt(2))); |
| 1363 | 1363 |
| 1364 // a3 : native context | 1364 // a3 : native context |
| 1365 // a2 : length / index | 1365 // a2 : length / index |
| 1366 // a0 : optimized code map | 1366 // a0 : optimized code map |
| 1367 // stack[0] : new target | 1367 // stack[0] : new target |
| 1368 // stack[4] : closure | 1368 // stack[4] : closure |
| 1369 Register native_context = a3; | 1369 Register native_context = a3; |
| 1370 __ ld(native_context, NativeContextMemOperand()); | 1370 __ ld(native_context, NativeContextMemOperand()); |
| 1371 | 1371 |
| 1372 __ bind(&loop_top); | 1372 __ bind(&loop_top); |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 __ mov(closure, a5); | 1417 __ mov(closure, a5); |
| 1418 __ pop(new_target); | 1418 __ pop(new_target); |
| 1419 __ pop(argument_count); | 1419 __ pop(argument_count); |
| 1420 __ Jump(entry); | 1420 __ Jump(entry); |
| 1421 | 1421 |
| 1422 __ bind(&loop_bottom); | 1422 __ bind(&loop_bottom); |
| 1423 __ Dsubu(index, index, | 1423 __ Dsubu(index, index, |
| 1424 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); | 1424 Operand(Smi::FromInt(SharedFunctionInfo::kEntryLength))); |
| 1425 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); | 1425 __ Branch(&loop_top, gt, index, Operand(Smi::FromInt(1))); |
| 1426 | 1426 |
| 1427 // We found no code. Try the SharedFunctionInfo. | 1427 // We found no code. |
| 1428 __ jmp(&gotta_call_runtime); |
| 1429 |
| 1428 __ bind(&try_shared); | 1430 __ bind(&try_shared); |
| 1429 __ pop(closure); | 1431 __ pop(closure); |
| 1430 __ pop(new_target); | 1432 __ pop(new_target); |
| 1431 __ pop(argument_count); | 1433 __ pop(argument_count); |
| 1432 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1434 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
| 1433 // Is the shared function marked for tier up? | 1435 // Is the shared function marked for tier up? |
| 1434 __ lbu(a5, FieldMemOperand(entry, | 1436 __ lbu(a5, FieldMemOperand(entry, |
| 1435 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1437 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
| 1436 __ And(a5, a5, | 1438 __ And(a5, a5, |
| 1437 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1439 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3121 __ break_(0xCC); | 3123 __ break_(0xCC); |
| 3122 } | 3124 } |
| 3123 } | 3125 } |
| 3124 | 3126 |
| 3125 #undef __ | 3127 #undef __ |
| 3126 | 3128 |
| 3127 } // namespace internal | 3129 } // namespace internal |
| 3128 } // namespace v8 | 3130 } // namespace v8 |
| 3129 | 3131 |
| 3130 #endif // V8_TARGET_ARCH_MIPS64 | 3132 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |