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/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 Label miss; | 1361 Label miss; |
1362 Register receiver = LoadDescriptor::ReceiverRegister(); | 1362 Register receiver = LoadDescriptor::ReceiverRegister(); |
1363 // Ensure that the vector and slot registers won't be clobbered before | 1363 // Ensure that the vector and slot registers won't be clobbered before |
1364 // calling the miss handler. | 1364 // calling the miss handler. |
1365 DCHECK(!AreAliased(r6, r7, LoadWithVectorDescriptor::VectorRegister(), | 1365 DCHECK(!AreAliased(r6, r7, LoadWithVectorDescriptor::VectorRegister(), |
1366 LoadWithVectorDescriptor::SlotRegister())); | 1366 LoadWithVectorDescriptor::SlotRegister())); |
1367 | 1367 |
1368 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r6, | 1368 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r6, |
1369 r7, &miss); | 1369 r7, &miss); |
1370 __ bind(&miss); | 1370 __ bind(&miss); |
1371 PropertyAccessCompiler::TailCallBuiltin( | 1371 PropertyAccessCompiler::TailCallMissHandler(masm, Code::LOAD_IC); |
1372 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | |
1373 } | 1372 } |
1374 | 1373 |
1375 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 1374 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
1376 // Return address is in lr. | 1375 // Return address is in lr. |
1377 Label miss; | 1376 Label miss; |
1378 | 1377 |
1379 Register receiver = LoadDescriptor::ReceiverRegister(); | 1378 Register receiver = LoadDescriptor::ReceiverRegister(); |
1380 Register index = LoadDescriptor::NameRegister(); | 1379 Register index = LoadDescriptor::NameRegister(); |
1381 Register scratch = r7; | 1380 Register scratch = r7; |
1382 Register result = r2; | 1381 Register result = r2; |
1383 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | 1382 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
1384 DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) && | 1383 DCHECK(!scratch.is(LoadWithVectorDescriptor::VectorRegister()) && |
1385 result.is(LoadWithVectorDescriptor::SlotRegister())); | 1384 result.is(LoadWithVectorDescriptor::SlotRegister())); |
1386 | 1385 |
1387 // StringCharAtGenerator doesn't use the result register until it's passed | 1386 // StringCharAtGenerator doesn't use the result register until it's passed |
1388 // the different miss possibilities. If it did, we would have a conflict | 1387 // the different miss possibilities. If it did, we would have a conflict |
1389 // when FLAG_vector_ics is true. | 1388 // when FLAG_vector_ics is true. |
1390 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, | 1389 StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
1391 &miss, // When not a string. | 1390 &miss, // When not a string. |
1392 &miss, // When not a number. | 1391 &miss, // When not a number. |
1393 &miss, // When index out of range. | 1392 &miss, // When index out of range. |
1394 RECEIVER_IS_STRING); | 1393 RECEIVER_IS_STRING); |
1395 char_at_generator.GenerateFast(masm); | 1394 char_at_generator.GenerateFast(masm); |
1396 __ Ret(); | 1395 __ Ret(); |
1397 | 1396 |
1398 StubRuntimeCallHelper call_helper; | 1397 StubRuntimeCallHelper call_helper; |
1399 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); | 1398 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); |
1400 | 1399 |
1401 __ bind(&miss); | 1400 __ bind(&miss); |
1402 PropertyAccessCompiler::TailCallBuiltin( | 1401 PropertyAccessCompiler::TailCallMissHandler(masm, Code::KEYED_LOAD_IC); |
1403 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | |
1404 } | 1402 } |
1405 | 1403 |
1406 void RegExpExecStub::Generate(MacroAssembler* masm) { | 1404 void RegExpExecStub::Generate(MacroAssembler* masm) { |
1407 // Just jump directly to runtime if native RegExp is not selected at compile | 1405 // Just jump directly to runtime if native RegExp is not selected at compile |
1408 // time or if regexp entry in generated code is turned off runtime switch or | 1406 // time or if regexp entry in generated code is turned off runtime switch or |
1409 // at compilation. | 1407 // at compilation. |
1410 #ifdef V8_INTERPRETED_REGEXP | 1408 #ifdef V8_INTERPRETED_REGEXP |
1411 __ TailCallRuntime(Runtime::kRegExpExec); | 1409 __ TailCallRuntime(Runtime::kRegExpExec); |
1412 #else // V8_INTERPRETED_REGEXP | 1410 #else // V8_INTERPRETED_REGEXP |
1413 | 1411 |
(...skipping 4186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5600 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5598 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5601 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5599 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5602 } | 5600 } |
5603 | 5601 |
5604 #undef __ | 5602 #undef __ |
5605 | 5603 |
5606 } // namespace internal | 5604 } // namespace internal |
5607 } // namespace v8 | 5605 } // namespace v8 |
5608 | 5606 |
5609 #endif // V8_TARGET_ARCH_S390 | 5607 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |