| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3918 li(s3, Operand(next_address)); | 3918 li(s3, Operand(next_address)); |
| 3919 lw(s0, MemOperand(s3, kNextOffset)); | 3919 lw(s0, MemOperand(s3, kNextOffset)); |
| 3920 lw(s1, MemOperand(s3, kLimitOffset)); | 3920 lw(s1, MemOperand(s3, kLimitOffset)); |
| 3921 lw(s2, MemOperand(s3, kLevelOffset)); | 3921 lw(s2, MemOperand(s3, kLevelOffset)); |
| 3922 Addu(s2, s2, Operand(1)); | 3922 Addu(s2, s2, Operand(1)); |
| 3923 sw(s2, MemOperand(s3, kLevelOffset)); | 3923 sw(s2, MemOperand(s3, kLevelOffset)); |
| 3924 | 3924 |
| 3925 if (FLAG_log_timer_events) { | 3925 if (FLAG_log_timer_events) { |
| 3926 FrameScope frame(this, StackFrame::MANUAL); | 3926 FrameScope frame(this, StackFrame::MANUAL); |
| 3927 PushSafepointRegisters(); | 3927 PushSafepointRegisters(); |
| 3928 PrepareCallCFunction(0, a0); | 3928 PrepareCallCFunction(1, a0); |
| 3929 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 0); | 3929 li(a0, Operand(ExternalReference::isolate_address(isolate()))); |
| 3930 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 1); |
| 3930 PopSafepointRegisters(); | 3931 PopSafepointRegisters(); |
| 3931 } | 3932 } |
| 3932 | 3933 |
| 3933 // The O32 ABI requires us to pass a pointer in a0 where the returned struct | 3934 // The O32 ABI requires us to pass a pointer in a0 where the returned struct |
| 3934 // (4 bytes) will be placed. This is also built into the Simulator. | 3935 // (4 bytes) will be placed. This is also built into the Simulator. |
| 3935 // Set up the pointer to the returned value (a0). It was allocated in | 3936 // Set up the pointer to the returned value (a0). It was allocated in |
| 3936 // EnterExitFrame. | 3937 // EnterExitFrame. |
| 3937 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset); | 3938 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset); |
| 3938 | 3939 |
| 3939 // Native call returns to the DirectCEntry stub which redirects to the | 3940 // Native call returns to the DirectCEntry stub which redirects to the |
| 3940 // return address pushed on stack (could have moved after GC). | 3941 // return address pushed on stack (could have moved after GC). |
| 3941 // DirectCEntry stub itself is generated early and never moves. | 3942 // DirectCEntry stub itself is generated early and never moves. |
| 3942 DirectCEntryStub stub; | 3943 DirectCEntryStub stub; |
| 3943 stub.GenerateCall(this, function); | 3944 stub.GenerateCall(this, function); |
| 3944 | 3945 |
| 3945 if (FLAG_log_timer_events) { | 3946 if (FLAG_log_timer_events) { |
| 3946 FrameScope frame(this, StackFrame::MANUAL); | 3947 FrameScope frame(this, StackFrame::MANUAL); |
| 3947 PushSafepointRegisters(); | 3948 PushSafepointRegisters(); |
| 3948 PrepareCallCFunction(0, a0); | 3949 PrepareCallCFunction(1, a0); |
| 3949 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 0); | 3950 li(a0, Operand(ExternalReference::isolate_address(isolate()))); |
| 3951 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); |
| 3950 PopSafepointRegisters(); | 3952 PopSafepointRegisters(); |
| 3951 } | 3953 } |
| 3952 | 3954 |
| 3953 // As mentioned above, on MIPS a pointer is returned - we need to dereference | 3955 // As mentioned above, on MIPS a pointer is returned - we need to dereference |
| 3954 // it to get the actual return value (which is also a pointer). | 3956 // it to get the actual return value (which is also a pointer). |
| 3955 lw(v0, MemOperand(v0)); | 3957 lw(v0, MemOperand(v0)); |
| 3956 | 3958 |
| 3957 Label promote_scheduled_exception; | 3959 Label promote_scheduled_exception; |
| 3958 Label delete_allocated_handles; | 3960 Label delete_allocated_handles; |
| 3959 Label leave_exit_frame; | 3961 Label leave_exit_frame; |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5497 opcode == BGTZL); | 5499 opcode == BGTZL); |
| 5498 opcode = (cond == eq) ? BEQ : BNE; | 5500 opcode = (cond == eq) ? BEQ : BNE; |
| 5499 instr = (instr & ~kOpcodeMask) | opcode; | 5501 instr = (instr & ~kOpcodeMask) | opcode; |
| 5500 masm_.emit(instr); | 5502 masm_.emit(instr); |
| 5501 } | 5503 } |
| 5502 | 5504 |
| 5503 | 5505 |
| 5504 } } // namespace v8::internal | 5506 } } // namespace v8::internal |
| 5505 | 5507 |
| 5506 #endif // V8_TARGET_ARCH_MIPS | 5508 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |