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 2448 matching lines...) Loading... |
2459 __ Ret(); | 2459 __ Ret(); |
2460 __ bind(¬_oddball); | 2460 __ bind(¬_oddball); |
2461 | 2461 |
2462 __ push(r2); // Push argument. | 2462 __ push(r2); // Push argument. |
2463 __ TailCallRuntime(Runtime::kToString); | 2463 __ TailCallRuntime(Runtime::kToString); |
2464 | 2464 |
2465 __ bind(&done); | 2465 __ bind(&done); |
2466 __ Ret(); | 2466 __ Ret(); |
2467 } | 2467 } |
2468 | 2468 |
2469 void ToNameStub::Generate(MacroAssembler* masm) { | |
2470 // The ToName stub takes one argument in r2. | |
2471 Label is_number; | |
2472 __ JumpIfSmi(r2, &is_number); | |
2473 | |
2474 STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); | |
2475 __ CompareObjectType(r2, r3, r3, LAST_NAME_TYPE); | |
2476 // r2: receiver | |
2477 // r3: receiver instance type | |
2478 __ Ret(le); | |
2479 | |
2480 Label not_heap_number; | |
2481 __ CmpP(r3, Operand(HEAP_NUMBER_TYPE)); | |
2482 __ bne(¬_heap_number); | |
2483 __ bind(&is_number); | |
2484 NumberToStringStub stub(isolate()); | |
2485 __ TailCallStub(&stub); | |
2486 __ bind(¬_heap_number); | |
2487 | |
2488 Label not_oddball; | |
2489 __ CmpP(r3, Operand(ODDBALL_TYPE)); | |
2490 __ bne(¬_oddball); | |
2491 __ LoadP(r2, FieldMemOperand(r2, Oddball::kToStringOffset)); | |
2492 __ Ret(); | |
2493 __ bind(¬_oddball); | |
2494 | |
2495 __ push(r2); // Push argument. | |
2496 __ TailCallRuntime(Runtime::kToName); | |
2497 } | |
2498 | |
2499 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, | 2469 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, |
2500 Register left, | 2470 Register left, |
2501 Register right, | 2471 Register right, |
2502 Register scratch1, | 2472 Register scratch1, |
2503 Register scratch2) { | 2473 Register scratch2) { |
2504 Register length = scratch1; | 2474 Register length = scratch1; |
2505 | 2475 |
2506 // Compare lengths. | 2476 // Compare lengths. |
2507 Label strings_not_equal, check_zero_length; | 2477 Label strings_not_equal, check_zero_length; |
2508 __ LoadP(length, FieldMemOperand(left, String::kLengthOffset)); | 2478 __ LoadP(length, FieldMemOperand(left, String::kLengthOffset)); |
(...skipping 2878 matching lines...) Loading... |
5387 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5357 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5388 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5358 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5389 } | 5359 } |
5390 | 5360 |
5391 #undef __ | 5361 #undef __ |
5392 | 5362 |
5393 } // namespace internal | 5363 } // namespace internal |
5394 } // namespace v8 | 5364 } // namespace v8 |
5395 | 5365 |
5396 #endif // V8_TARGET_ARCH_S390 | 5366 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |