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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 __ bne(&new_object); | 327 __ bne(&new_object); |
328 | 328 |
329 // 5. Allocate a JSValue wrapper for the number. | 329 // 5. Allocate a JSValue wrapper for the number. |
330 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); | 330 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); |
331 __ b(&drop_frame_and_ret); | 331 __ b(&drop_frame_and_ret); |
332 | 332 |
333 // 6. Fallback to the runtime to create new object. | 333 // 6. Fallback to the runtime to create new object. |
334 __ bind(&new_object); | 334 __ bind(&new_object); |
335 { | 335 { |
336 FrameScope scope(masm, StackFrame::MANUAL); | 336 FrameScope scope(masm, StackFrame::MANUAL); |
337 FastNewObjectStub stub(masm->isolate()); | |
338 __ SmiTag(r8); | 337 __ SmiTag(r8); |
339 __ EnterBuiltinFrame(cp, r3, r8); | 338 __ EnterBuiltinFrame(cp, r3, r8); |
340 __ Push(r4); // first argument | 339 __ Push(r4); // first argument |
341 __ CallStub(&stub); | 340 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 341 RelocInfo::CODE_TARGET); |
342 __ Pop(r4); | 342 __ Pop(r4); |
343 __ LeaveBuiltinFrame(cp, r3, r8); | 343 __ LeaveBuiltinFrame(cp, r3, r8); |
344 __ SmiUntag(r8); | 344 __ SmiUntag(r8); |
345 } | 345 } |
346 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); | 346 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); |
347 | 347 |
348 __ bind(&drop_frame_and_ret); | 348 __ bind(&drop_frame_and_ret); |
349 { | 349 { |
350 __ Drop(r8); | 350 __ Drop(r8); |
351 __ Ret(1); | 351 __ Ret(1); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 __ bne(&new_object); | 477 __ bne(&new_object); |
478 | 478 |
479 // 5. Allocate a JSValue wrapper for the string. | 479 // 5. Allocate a JSValue wrapper for the string. |
480 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); | 480 __ AllocateJSValue(r2, r3, r4, r6, r7, &new_object); |
481 __ b(&drop_frame_and_ret); | 481 __ b(&drop_frame_and_ret); |
482 | 482 |
483 // 6. Fallback to the runtime to create new object. | 483 // 6. Fallback to the runtime to create new object. |
484 __ bind(&new_object); | 484 __ bind(&new_object); |
485 { | 485 { |
486 FrameScope scope(masm, StackFrame::MANUAL); | 486 FrameScope scope(masm, StackFrame::MANUAL); |
487 FastNewObjectStub stub(masm->isolate()); | |
488 __ SmiTag(r8); | 487 __ SmiTag(r8); |
489 __ EnterBuiltinFrame(cp, r3, r8); | 488 __ EnterBuiltinFrame(cp, r3, r8); |
490 __ Push(r4); // first argument | 489 __ Push(r4); // first argument |
491 __ CallStub(&stub); | 490 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
| 491 RelocInfo::CODE_TARGET); |
492 __ Pop(r4); | 492 __ Pop(r4); |
493 __ LeaveBuiltinFrame(cp, r3, r8); | 493 __ LeaveBuiltinFrame(cp, r3, r8); |
494 __ SmiUntag(r8); | 494 __ SmiUntag(r8); |
495 } | 495 } |
496 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); | 496 __ StoreP(r4, FieldMemOperand(r2, JSValue::kValueOffset), r0); |
497 | 497 |
498 __ bind(&drop_frame_and_ret); | 498 __ bind(&drop_frame_and_ret); |
499 { | 499 { |
500 __ Drop(r8); | 500 __ Drop(r8); |
501 __ Ret(1); | 501 __ Ret(1); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 __ SmiTag(r6, r2); | 577 __ SmiTag(r6, r2); |
578 __ LoadAndTestP(r6, r6); | 578 __ LoadAndTestP(r6, r6); |
579 __ Push(cp, r6); | 579 __ Push(cp, r6); |
580 __ PushRoot(Heap::kTheHoleValueRootIndex); | 580 __ PushRoot(Heap::kTheHoleValueRootIndex); |
581 } else { | 581 } else { |
582 __ SmiTag(r2); | 582 __ SmiTag(r2); |
583 __ Push(cp, r2); | 583 __ Push(cp, r2); |
584 | 584 |
585 // Allocate the new receiver object. | 585 // Allocate the new receiver object. |
586 __ Push(r3, r5); | 586 __ Push(r3, r5); |
587 FastNewObjectStub stub(masm->isolate()); | 587 __ Call(CodeFactory::FastNewObject(masm->isolate()).code(), |
588 __ CallStub(&stub); | 588 RelocInfo::CODE_TARGET); |
589 __ LoadRR(r6, r2); | 589 __ LoadRR(r6, r2); |
590 __ Pop(r3, r5); | 590 __ Pop(r3, r5); |
591 | 591 |
592 // ----------- S t a t e ------------- | 592 // ----------- S t a t e ------------- |
593 // -- r3: constructor function | 593 // -- r3: constructor function |
594 // -- r5: new target | 594 // -- r5: new target |
595 // -- r6: newly allocated object | 595 // -- r6: newly allocated object |
596 // ----------------------------------- | 596 // ----------------------------------- |
597 | 597 |
598 // Retrieve smi-tagged arguments count from the stack. | 598 // Retrieve smi-tagged arguments count from the stack. |
(...skipping 2385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2984 __ bkpt(0); | 2984 __ bkpt(0); |
2985 } | 2985 } |
2986 } | 2986 } |
2987 | 2987 |
2988 #undef __ | 2988 #undef __ |
2989 | 2989 |
2990 } // namespace internal | 2990 } // namespace internal |
2991 } // namespace v8 | 2991 } // namespace v8 |
2992 | 2992 |
2993 #endif // V8_TARGET_ARCH_S390 | 2993 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |