OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 | 1428 |
1429 __ Bind(&try_shared); | 1429 __ Bind(&try_shared); |
1430 __ Ldr(entry, | 1430 __ Ldr(entry, |
1431 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1431 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1432 // Is the shared function marked for tier up? | 1432 // Is the shared function marked for tier up? |
1433 __ Ldrb(temp, FieldMemOperand( | 1433 __ Ldrb(temp, FieldMemOperand( |
1434 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1434 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1435 __ TestAndBranchIfAnySet( | 1435 __ TestAndBranchIfAnySet( |
1436 temp, 1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte, | 1436 temp, 1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte, |
1437 &gotta_call_runtime); | 1437 &gotta_call_runtime); |
1438 // Is the full code valid? | 1438 |
| 1439 // If SFI points to anything other than CompileLazy, install that. |
1439 __ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1440 __ Ldr(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1440 __ Ldr(x5, FieldMemOperand(entry, Code::kFlagsOffset)); | 1441 __ Move(temp, masm->CodeObject()); |
1441 __ and_(x5, x5, Operand(Code::KindField::kMask)); | 1442 __ Cmp(entry, temp); |
1442 __ Mov(x5, Operand(x5, LSR, Code::KindField::kShift)); | |
1443 __ Cmp(x5, Operand(Code::BUILTIN)); | |
1444 __ B(eq, &gotta_call_runtime); | 1443 __ B(eq, &gotta_call_runtime); |
1445 // Yes, install the full code. | 1444 |
| 1445 // Install the SFI's code entry. |
1446 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1446 __ Add(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1447 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); | 1447 __ Str(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset)); |
1448 __ RecordWriteCodeEntryField(closure, entry, x5); | 1448 __ RecordWriteCodeEntryField(closure, entry, x5); |
1449 __ Jump(entry); | 1449 __ Jump(entry); |
1450 | 1450 |
1451 __ Bind(&gotta_call_runtime); | 1451 __ Bind(&gotta_call_runtime); |
1452 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); | 1452 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); |
1453 } | 1453 } |
1454 | 1454 |
1455 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) { | 1455 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) { |
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2998 __ Unreachable(); | 2998 __ Unreachable(); |
2999 } | 2999 } |
3000 } | 3000 } |
3001 | 3001 |
3002 #undef __ | 3002 #undef __ |
3003 | 3003 |
3004 } // namespace internal | 3004 } // namespace internal |
3005 } // namespace v8 | 3005 } // namespace v8 |
3006 | 3006 |
3007 #endif // V8_TARGET_ARCH_ARM | 3007 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |