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 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 __ pop(closure); | 1436 __ pop(closure); |
1437 __ pop(new_target); | 1437 __ pop(new_target); |
1438 __ pop(argument_count); | 1438 __ pop(argument_count); |
1439 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1439 __ ld(entry, FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1440 // Is the shared function marked for tier up? | 1440 // Is the shared function marked for tier up? |
1441 __ lbu(a5, FieldMemOperand(entry, | 1441 __ lbu(a5, FieldMemOperand(entry, |
1442 SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1442 SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1443 __ And(a5, a5, | 1443 __ And(a5, a5, |
1444 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); | 1444 Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
1445 __ Branch(&gotta_call_runtime_no_stack, ne, a5, Operand(zero_reg)); | 1445 __ Branch(&gotta_call_runtime_no_stack, ne, a5, Operand(zero_reg)); |
1446 // Is the full code valid? | 1446 |
| 1447 // If SFI points to anything other than CompileLazy, install that. |
1447 __ ld(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1448 __ ld(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1448 __ lw(a5, FieldMemOperand(entry, Code::kFlagsOffset)); | 1449 __ Move(t1, masm->CodeObject()); |
1449 __ And(a5, a5, Operand(Code::KindField::kMask)); | 1450 __ Branch(&gotta_call_runtime_no_stack, eq, entry, Operand(t1)); |
1450 __ dsrl(a5, a5, Code::KindField::kShift); | 1451 |
1451 __ Branch(&gotta_call_runtime_no_stack, eq, a5, Operand(Code::BUILTIN)); | 1452 // Install the SFI's code entry. |
1452 // Yes, install the full code. | |
1453 __ Daddu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1453 __ Daddu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1454 __ sd(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1454 __ sd(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
1455 __ RecordWriteCodeEntryField(closure, entry, a5); | 1455 __ RecordWriteCodeEntryField(closure, entry, a5); |
1456 __ Jump(entry); | 1456 __ Jump(entry); |
1457 | 1457 |
1458 __ bind(&gotta_call_runtime); | 1458 __ bind(&gotta_call_runtime); |
1459 __ pop(closure); | 1459 __ pop(closure); |
1460 __ pop(new_target); | 1460 __ pop(new_target); |
1461 __ pop(argument_count); | 1461 __ pop(argument_count); |
1462 __ bind(&gotta_call_runtime_no_stack); | 1462 __ bind(&gotta_call_runtime_no_stack); |
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2997 __ break_(0xCC); | 2997 __ break_(0xCC); |
2998 } | 2998 } |
2999 } | 2999 } |
3000 | 3000 |
3001 #undef __ | 3001 #undef __ |
3002 | 3002 |
3003 } // namespace internal | 3003 } // namespace internal |
3004 } // namespace v8 | 3004 } // namespace v8 |
3005 | 3005 |
3006 #endif // V8_TARGET_ARCH_MIPS64 | 3006 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |