| 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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 | 1143 |
| 1144 // Invoke: Link this frame into the handler chain. | 1144 // Invoke: Link this frame into the handler chain. |
| 1145 __ bind(&invoke); | 1145 __ bind(&invoke); |
| 1146 // Must preserve r2-r6. | 1146 // Must preserve r2-r6. |
| 1147 __ PushStackHandler(); | 1147 __ PushStackHandler(); |
| 1148 // If an exception not caught by another handler occurs, this handler | 1148 // If an exception not caught by another handler occurs, this handler |
| 1149 // returns control to the code after the b(&invoke) above, which | 1149 // returns control to the code after the b(&invoke) above, which |
| 1150 // restores all kCalleeSaved registers (including cp and fp) to their | 1150 // restores all kCalleeSaved registers (including cp and fp) to their |
| 1151 // saved values before returning a failure to C. | 1151 // saved values before returning a failure to C. |
| 1152 | 1152 |
| 1153 // Clear any pending exceptions. | |
| 1154 __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress, | |
| 1155 isolate()))); | |
| 1156 __ mov(r7, Operand(isolate()->factory()->the_hole_value())); | |
| 1157 __ StoreP(r7, MemOperand(ip)); | |
| 1158 | |
| 1159 // Invoke the function by calling through JS entry trampoline builtin. | 1153 // Invoke the function by calling through JS entry trampoline builtin. |
| 1160 // Notice that we cannot store a reference to the trampoline code directly in | 1154 // Notice that we cannot store a reference to the trampoline code directly in |
| 1161 // this stub, because runtime stubs are not traversed when doing GC. | 1155 // this stub, because runtime stubs are not traversed when doing GC. |
| 1162 | 1156 |
| 1163 // Expected registers by Builtins::JSEntryTrampoline | 1157 // Expected registers by Builtins::JSEntryTrampoline |
| 1164 // r2: code entry | 1158 // r2: code entry |
| 1165 // r3: function | 1159 // r3: function |
| 1166 // r4: receiver | 1160 // r4: receiver |
| 1167 // r5: argc | 1161 // r5: argc |
| 1168 // r6: argv | 1162 // r6: argv |
| (...skipping 4224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5393 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5387 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 5394 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5388 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5395 } | 5389 } |
| 5396 | 5390 |
| 5397 #undef __ | 5391 #undef __ |
| 5398 | 5392 |
| 5399 } // namespace internal | 5393 } // namespace internal |
| 5400 } // namespace v8 | 5394 } // namespace v8 |
| 5401 | 5395 |
| 5402 #endif // V8_TARGET_ARCH_S390 | 5396 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |