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 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3944 next_address); | 3944 next_address); |
3945 | 3945 |
3946 // Allocate HandleScope in callee-save registers. | 3946 // Allocate HandleScope in callee-save registers. |
3947 li(s3, Operand(next_address)); | 3947 li(s3, Operand(next_address)); |
3948 lw(s0, MemOperand(s3, kNextOffset)); | 3948 lw(s0, MemOperand(s3, kNextOffset)); |
3949 lw(s1, MemOperand(s3, kLimitOffset)); | 3949 lw(s1, MemOperand(s3, kLimitOffset)); |
3950 lw(s2, MemOperand(s3, kLevelOffset)); | 3950 lw(s2, MemOperand(s3, kLevelOffset)); |
3951 Addu(s2, s2, Operand(1)); | 3951 Addu(s2, s2, Operand(1)); |
3952 sw(s2, MemOperand(s3, kLevelOffset)); | 3952 sw(s2, MemOperand(s3, kLevelOffset)); |
3953 | 3953 |
| 3954 if (FLAG_log_timer_events) { |
| 3955 FrameScope frame(this, StackFrame::MANUAL); |
| 3956 PushSafepointRegisters(); |
| 3957 PrepareCallCFunction(0, a0); |
| 3958 CallCFunction(ExternalReference::log_enter_external_function(isolate()), 0); |
| 3959 PopSafepointRegisters(); |
| 3960 } |
| 3961 |
3954 // The O32 ABI requires us to pass a pointer in a0 where the returned struct | 3962 // The O32 ABI requires us to pass a pointer in a0 where the returned struct |
3955 // (4 bytes) will be placed. This is also built into the Simulator. | 3963 // (4 bytes) will be placed. This is also built into the Simulator. |
3956 // Set up the pointer to the returned value (a0). It was allocated in | 3964 // Set up the pointer to the returned value (a0). It was allocated in |
3957 // EnterExitFrame. | 3965 // EnterExitFrame. |
3958 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset); | 3966 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset); |
3959 | 3967 |
3960 // Native call returns to the DirectCEntry stub which redirects to the | 3968 // Native call returns to the DirectCEntry stub which redirects to the |
3961 // return address pushed on stack (could have moved after GC). | 3969 // return address pushed on stack (could have moved after GC). |
3962 // DirectCEntry stub itself is generated early and never moves. | 3970 // DirectCEntry stub itself is generated early and never moves. |
3963 DirectCEntryStub stub; | 3971 DirectCEntryStub stub; |
3964 stub.GenerateCall(this, function); | 3972 stub.GenerateCall(this, function); |
3965 | 3973 |
| 3974 if (FLAG_log_timer_events) { |
| 3975 FrameScope frame(this, StackFrame::MANUAL); |
| 3976 PushSafepointRegisters(); |
| 3977 PrepareCallCFunction(0, a0); |
| 3978 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 0); |
| 3979 PopSafepointRegisters(); |
| 3980 } |
| 3981 |
3966 // As mentioned above, on MIPS a pointer is returned - we need to dereference | 3982 // As mentioned above, on MIPS a pointer is returned - we need to dereference |
3967 // it to get the actual return value (which is also a pointer). | 3983 // it to get the actual return value (which is also a pointer). |
3968 lw(v0, MemOperand(v0)); | 3984 lw(v0, MemOperand(v0)); |
3969 | 3985 |
3970 Label promote_scheduled_exception; | 3986 Label promote_scheduled_exception; |
3971 Label delete_allocated_handles; | 3987 Label delete_allocated_handles; |
3972 Label leave_exit_frame; | 3988 Label leave_exit_frame; |
3973 | 3989 |
3974 // If result is non-zero, dereference to get the result value | 3990 // If result is non-zero, dereference to get the result value |
3975 // otherwise set it to undefined. | 3991 // otherwise set it to undefined. |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5465 opcode == BGTZL); | 5481 opcode == BGTZL); |
5466 opcode = (cond == eq) ? BEQ : BNE; | 5482 opcode = (cond == eq) ? BEQ : BNE; |
5467 instr = (instr & ~kOpcodeMask) | opcode; | 5483 instr = (instr & ~kOpcodeMask) | opcode; |
5468 masm_.emit(instr); | 5484 masm_.emit(instr); |
5469 } | 5485 } |
5470 | 5486 |
5471 | 5487 |
5472 } } // namespace v8::internal | 5488 } } // namespace v8::internal |
5473 | 5489 |
5474 #endif // V8_TARGET_ARCH_MIPS | 5490 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |