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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 5451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5462 // ----------------------------------- | 5462 // ----------------------------------- |
5463 | 5463 |
5464 Register callee = r3; | 5464 Register callee = r3; |
5465 Register call_data = r7; | 5465 Register call_data = r7; |
5466 Register holder = r5; | 5466 Register holder = r5; |
5467 Register api_function_address = r4; | 5467 Register api_function_address = r4; |
5468 Register context = cp; | 5468 Register context = cp; |
5469 | 5469 |
5470 typedef FunctionCallbackArguments FCA; | 5470 typedef FunctionCallbackArguments FCA; |
5471 | 5471 |
5472 STATIC_ASSERT(FCA::kContextSaveIndex == 5); | 5472 STATIC_ASSERT(FCA::kContextSaveIndex == 6); |
| 5473 STATIC_ASSERT(FCA::kCalleeIndex == 5); |
5473 STATIC_ASSERT(FCA::kDataIndex == 4); | 5474 STATIC_ASSERT(FCA::kDataIndex == 4); |
5474 STATIC_ASSERT(FCA::kReturnValueOffset == 3); | 5475 STATIC_ASSERT(FCA::kReturnValueOffset == 3); |
5475 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); | 5476 STATIC_ASSERT(FCA::kReturnValueDefaultValueIndex == 2); |
5476 STATIC_ASSERT(FCA::kIsolateIndex == 1); | 5477 STATIC_ASSERT(FCA::kIsolateIndex == 1); |
5477 STATIC_ASSERT(FCA::kHolderIndex == 0); | 5478 STATIC_ASSERT(FCA::kHolderIndex == 0); |
5478 STATIC_ASSERT(FCA::kArgsLength == 6); | 5479 STATIC_ASSERT(FCA::kArgsLength == 7); |
5479 | 5480 |
5480 DCHECK(argc.is_immediate() || r3.is(argc.reg())); | 5481 DCHECK(argc.is_immediate() || r3.is(argc.reg())); |
5481 | 5482 |
5482 // context save | 5483 // context save |
5483 __ push(context); | 5484 __ push(context); |
5484 // load context from callee | 5485 // load context from callee |
5485 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset)); | 5486 __ LoadP(context, FieldMemOperand(callee, JSFunction::kContextOffset)); |
5486 | 5487 |
| 5488 // callee |
| 5489 __ push(callee); |
| 5490 |
5487 // call data | 5491 // call data |
5488 __ push(call_data); | 5492 __ push(call_data); |
5489 | 5493 |
5490 Register scratch = call_data; | 5494 Register scratch = call_data; |
5491 if (!call_data_undefined) { | 5495 if (!call_data_undefined) { |
5492 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); | 5496 __ LoadRoot(scratch, Heap::kUndefinedValueRootIndex); |
5493 } | 5497 } |
5494 // return value | 5498 // return value |
5495 __ push(scratch); | 5499 __ push(scratch); |
5496 // return value default | 5500 // return value default |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5649 kStackUnwindSpace, NULL, | 5653 kStackUnwindSpace, NULL, |
5650 MemOperand(fp, 6 * kPointerSize), NULL); | 5654 MemOperand(fp, 6 * kPointerSize), NULL); |
5651 } | 5655 } |
5652 | 5656 |
5653 | 5657 |
5654 #undef __ | 5658 #undef __ |
5655 } // namespace internal | 5659 } // namespace internal |
5656 } // namespace v8 | 5660 } // namespace v8 |
5657 | 5661 |
5658 #endif // V8_TARGET_ARCH_PPC | 5662 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |