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 #include <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #if V8_TARGET_ARCH_PPC | 9 #if V8_TARGET_ARCH_PPC |
10 | 10 |
(...skipping 3843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3854 | 3854 |
3855 // Prepare to execute the code at entry | 3855 // Prepare to execute the code at entry |
3856 #if ABI_USES_FUNCTION_DESCRIPTORS | 3856 #if ABI_USES_FUNCTION_DESCRIPTORS |
3857 // entry is the function descriptor | 3857 // entry is the function descriptor |
3858 set_pc(*(reinterpret_cast<intptr_t*>(entry))); | 3858 set_pc(*(reinterpret_cast<intptr_t*>(entry))); |
3859 #else | 3859 #else |
3860 // entry is the instruction address | 3860 // entry is the instruction address |
3861 set_pc(reinterpret_cast<intptr_t>(entry)); | 3861 set_pc(reinterpret_cast<intptr_t>(entry)); |
3862 #endif | 3862 #endif |
3863 | 3863 |
| 3864 // Put target address in ip (for JS prologue). |
| 3865 set_register(r12, get_pc()); |
| 3866 |
3864 // Put down marker for end of simulation. The simulator will stop simulation | 3867 // Put down marker for end of simulation. The simulator will stop simulation |
3865 // when the PC reaches this value. By saving the "end simulation" value into | 3868 // when the PC reaches this value. By saving the "end simulation" value into |
3866 // the LR the simulation stops when returning to this call point. | 3869 // the LR the simulation stops when returning to this call point. |
3867 special_reg_lr_ = end_sim_pc; | 3870 special_reg_lr_ = end_sim_pc; |
3868 | 3871 |
3869 // Remember the values of non-volatile registers. | 3872 // Remember the values of non-volatile registers. |
3870 intptr_t r2_val = get_register(r2); | 3873 intptr_t r2_val = get_register(r2); |
3871 intptr_t r13_val = get_register(r13); | 3874 intptr_t r13_val = get_register(r13); |
3872 intptr_t r14_val = get_register(r14); | 3875 intptr_t r14_val = get_register(r14); |
3873 intptr_t r15_val = get_register(r15); | 3876 intptr_t r15_val = get_register(r15); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4037 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 4040 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
4038 uintptr_t address = *stack_slot; | 4041 uintptr_t address = *stack_slot; |
4039 set_register(sp, current_sp + sizeof(uintptr_t)); | 4042 set_register(sp, current_sp + sizeof(uintptr_t)); |
4040 return address; | 4043 return address; |
4041 } | 4044 } |
4042 } // namespace internal | 4045 } // namespace internal |
4043 } // namespace v8 | 4046 } // namespace v8 |
4044 | 4047 |
4045 #endif // USE_SIMULATOR | 4048 #endif // USE_SIMULATOR |
4046 #endif // V8_TARGET_ARCH_PPC | 4049 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |