OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 int original_stack = get_register(sp); | 2709 int original_stack = get_register(sp); |
2710 // Compute position of stack on entry to generated code. | 2710 // Compute position of stack on entry to generated code. |
2711 int entry_stack = (original_stack - (argument_count - 4) * sizeof(int32_t) | 2711 int entry_stack = (original_stack - (argument_count - 4) * sizeof(int32_t) |
2712 - kCArgsSlotsSize); | 2712 - kCArgsSlotsSize); |
2713 if (OS::ActivationFrameAlignment() != 0) { | 2713 if (OS::ActivationFrameAlignment() != 0) { |
2714 entry_stack &= -OS::ActivationFrameAlignment(); | 2714 entry_stack &= -OS::ActivationFrameAlignment(); |
2715 } | 2715 } |
2716 // Store remaining arguments on stack, from low to high memory. | 2716 // Store remaining arguments on stack, from low to high memory. |
2717 intptr_t* stack_argument = reinterpret_cast<intptr_t*>(entry_stack); | 2717 intptr_t* stack_argument = reinterpret_cast<intptr_t*>(entry_stack); |
2718 for (int i = 4; i < argument_count; i++) { | 2718 for (int i = 4; i < argument_count; i++) { |
2719 stack_argument[i - 4 + kArgsSlotsNum] = va_arg(parameters, int32_t); | 2719 stack_argument[i - 4 + kCArgSlotCount] = va_arg(parameters, int32_t); |
2720 } | 2720 } |
2721 va_end(parameters); | 2721 va_end(parameters); |
2722 set_register(sp, entry_stack); | 2722 set_register(sp, entry_stack); |
2723 | 2723 |
2724 // Prepare to execute the code at entry. | 2724 // Prepare to execute the code at entry. |
2725 set_register(pc, reinterpret_cast<int32_t>(entry)); | 2725 set_register(pc, reinterpret_cast<int32_t>(entry)); |
2726 // Put down marker for end of simulation. The simulator will stop simulation | 2726 // Put down marker for end of simulation. The simulator will stop simulation |
2727 // when the PC reaches this value. By saving the "end simulation" value into | 2727 // when the PC reaches this value. By saving the "end simulation" value into |
2728 // the LR the simulation stops when returning to this call point. | 2728 // the LR the simulation stops when returning to this call point. |
2729 set_register(ra, end_sim_pc); | 2729 set_register(ra, end_sim_pc); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2812 } | 2812 } |
2813 | 2813 |
2814 | 2814 |
2815 #undef UNSUPPORTED | 2815 #undef UNSUPPORTED |
2816 | 2816 |
2817 } } // namespace v8::internal | 2817 } } // namespace v8::internal |
2818 | 2818 |
2819 #endif // USE_SIMULATOR | 2819 #endif // USE_SIMULATOR |
2820 | 2820 |
2821 #endif // V8_TARGET_ARCH_MIPS | 2821 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |