OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 { | 1048 { |
1049 // Prevent literal pool emission before return address. | 1049 // Prevent literal pool emission before return address. |
1050 Assembler::BlockConstPoolScope block_const_pool(masm); | 1050 Assembler::BlockConstPoolScope block_const_pool(masm); |
1051 __ add(lr, pc, Operand(4)); | 1051 __ add(lr, pc, Operand(4)); |
1052 __ str(lr, MemOperand(sp, result_stack_size)); | 1052 __ str(lr, MemOperand(sp, result_stack_size)); |
1053 __ Call(r5); | 1053 __ Call(r5); |
1054 } | 1054 } |
1055 if (result_size() > 2) { | 1055 if (result_size() > 2) { |
1056 DCHECK_EQ(3, result_size()); | 1056 DCHECK_EQ(3, result_size()); |
1057 // Read result values stored on stack. | 1057 // Read result values stored on stack. |
1058 __ ldr(r2, MemOperand(r0, 2 * kPointerSize)); | 1058 __ ldr(r2, MemOperand(sp, 2 * kPointerSize)); |
1059 __ ldr(r1, MemOperand(r0, 1 * kPointerSize)); | 1059 __ ldr(r1, MemOperand(sp, 1 * kPointerSize)); |
1060 __ ldr(r0, MemOperand(r0, 0 * kPointerSize)); | 1060 __ ldr(r0, MemOperand(sp, 0 * kPointerSize)); |
1061 } | 1061 } |
1062 // Result returned in r0, r1:r0 or r2:r1:r0 - do not destroy these registers! | 1062 // Result returned in r0, r1:r0 or r2:r1:r0 - do not destroy these registers! |
1063 | 1063 |
1064 // Check result for exception sentinel. | 1064 // Check result for exception sentinel. |
1065 Label exception_returned; | 1065 Label exception_returned; |
1066 __ CompareRoot(r0, Heap::kExceptionRootIndex); | 1066 __ CompareRoot(r0, Heap::kExceptionRootIndex); |
1067 __ b(eq, &exception_returned); | 1067 __ b(eq, &exception_returned); |
1068 | 1068 |
1069 // Check that there is no pending exception, otherwise we | 1069 // Check that there is no pending exception, otherwise we |
1070 // should have returned the exception sentinel. | 1070 // should have returned the exception sentinel. |
(...skipping 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5439 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5439 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5440 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5440 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5441 } | 5441 } |
5442 | 5442 |
5443 #undef __ | 5443 #undef __ |
5444 | 5444 |
5445 } // namespace internal | 5445 } // namespace internal |
5446 } // namespace v8 | 5446 } // namespace v8 |
5447 | 5447 |
5448 #endif // V8_TARGET_ARCH_ARM | 5448 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |