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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 __ b(&gotta_call_runtime); | 1454 __ b(&gotta_call_runtime); |
1455 | 1455 |
1456 __ bind(&try_shared); | 1456 __ bind(&try_shared); |
1457 __ LoadP(entry, | 1457 __ LoadP(entry, |
1458 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); | 1458 FieldMemOperand(closure, JSFunction::kSharedFunctionInfoOffset)); |
1459 // Is the shared function marked for tier up? | 1459 // Is the shared function marked for tier up? |
1460 __ LoadlB(temp, FieldMemOperand( | 1460 __ LoadlB(temp, FieldMemOperand( |
1461 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset)); | 1461 entry, SharedFunctionInfo::kMarkedForTierUpByteOffset)); |
1462 __ TestBit(temp, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); | 1462 __ TestBit(temp, SharedFunctionInfo::kMarkedForTierUpBitWithinByte, r0); |
1463 __ bne(&gotta_call_runtime); | 1463 __ bne(&gotta_call_runtime); |
1464 // Is the full code valid? | 1464 |
| 1465 // If SFI points to anything other than CompileLazy, install that. |
1465 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); | 1466 __ LoadP(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset)); |
1466 __ LoadlW(r7, FieldMemOperand(entry, Code::kFlagsOffset)); | 1467 __ mov(r7, Operand(masm->CodeObject())); |
1467 __ DecodeField<Code::KindField>(r7); | 1468 __ CmpP(entry, r7); |
1468 __ CmpP(r7, Operand(Code::BUILTIN)); | |
1469 __ beq(&gotta_call_runtime); | 1469 __ beq(&gotta_call_runtime); |
1470 // Yes, install the full code. | 1470 |
| 1471 // Install the SFI's code entry. |
1471 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); | 1472 __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag)); |
1472 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); | 1473 __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0); |
1473 __ RecordWriteCodeEntryField(closure, entry, r7); | 1474 __ RecordWriteCodeEntryField(closure, entry, r7); |
1474 __ JumpToJSEntry(entry); | 1475 __ JumpToJSEntry(entry); |
1475 | 1476 |
1476 __ bind(&gotta_call_runtime); | 1477 __ bind(&gotta_call_runtime); |
1477 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); | 1478 GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy); |
1478 } | 1479 } |
1479 | 1480 |
1480 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) { | 1481 void Builtins::Generate_CompileBaseline(MacroAssembler* masm) { |
(...skipping 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2984 __ bkpt(0); | 2985 __ bkpt(0); |
2985 } | 2986 } |
2986 } | 2987 } |
2987 | 2988 |
2988 #undef __ | 2989 #undef __ |
2989 | 2990 |
2990 } // namespace internal | 2991 } // namespace internal |
2991 } // namespace v8 | 2992 } // namespace v8 |
2992 | 2993 |
2993 #endif // V8_TARGET_ARCH_S390 | 2994 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |