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 3962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3973 | 3973 |
3974 if (FLAG_log_timer_events) { | 3974 if (FLAG_log_timer_events) { |
3975 FrameScope frame(this, StackFrame::MANUAL); | 3975 FrameScope frame(this, StackFrame::MANUAL); |
3976 PushSafepointRegisters(); | 3976 PushSafepointRegisters(); |
3977 PrepareCallCFunction(1, a0); | 3977 PrepareCallCFunction(1, a0); |
3978 li(a0, Operand(ExternalReference::isolate_address(isolate()))); | 3978 li(a0, Operand(ExternalReference::isolate_address(isolate()))); |
3979 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); | 3979 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); |
3980 PopSafepointRegisters(); | 3980 PopSafepointRegisters(); |
3981 } | 3981 } |
3982 | 3982 |
3983 // As mentioned above, on MIPS a pointer is returned - we need to dereference | |
3984 // it to get the actual return value (which is also a pointer). | |
3985 lw(v0, MemOperand(v0)); | |
3986 | |
3987 Label promote_scheduled_exception; | 3983 Label promote_scheduled_exception; |
3988 Label delete_allocated_handles; | 3984 Label delete_allocated_handles; |
3989 Label leave_exit_frame; | 3985 Label leave_exit_frame; |
3990 Label return_value_loaded; | 3986 Label return_value_loaded; |
3991 | 3987 |
3992 if (returns_handle) { | 3988 if (returns_handle) { |
3993 Label load_return_value; | 3989 Label load_return_value; |
| 3990 |
| 3991 // As mentioned above, on MIPS a pointer is returned - we need to |
| 3992 // dereference it to get the actual return value (which is also a pointer). |
| 3993 lw(v0, MemOperand(v0)); |
| 3994 |
3994 Branch(&load_return_value, eq, v0, Operand(zero_reg)); | 3995 Branch(&load_return_value, eq, v0, Operand(zero_reg)); |
3995 // Dereference returned value. | 3996 // Dereference returned value. |
3996 lw(v0, MemOperand(v0)); | 3997 lw(v0, MemOperand(v0)); |
3997 b(&return_value_loaded); | 3998 Branch(&return_value_loaded); |
3998 nop(); | |
3999 bind(&load_return_value); | 3999 bind(&load_return_value); |
4000 } | 4000 } |
4001 // Load value from ReturnValue. | 4001 // Load value from ReturnValue. |
4002 lw(v0, MemOperand(fp, return_value_offset_from_fp*kPointerSize)); | 4002 lw(v0, MemOperand(fp, return_value_offset_from_fp*kPointerSize)); |
4003 bind(&return_value_loaded); | 4003 bind(&return_value_loaded); |
4004 | 4004 |
4005 // No more valid handles (the result handle was the last one). Restore | 4005 // No more valid handles (the result handle was the last one). Restore |
4006 // previous handle scope. | 4006 // previous handle scope. |
4007 sw(s0, MemOperand(s3, kNextOffset)); | 4007 sw(s0, MemOperand(s3, kNextOffset)); |
4008 if (emit_debug_code()) { | 4008 if (emit_debug_code()) { |
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5544 opcode == BGTZL); | 5544 opcode == BGTZL); |
5545 opcode = (cond == eq) ? BEQ : BNE; | 5545 opcode = (cond == eq) ? BEQ : BNE; |
5546 instr = (instr & ~kOpcodeMask) | opcode; | 5546 instr = (instr & ~kOpcodeMask) | opcode; |
5547 masm_.emit(instr); | 5547 masm_.emit(instr); |
5548 } | 5548 } |
5549 | 5549 |
5550 | 5550 |
5551 } } // namespace v8::internal | 5551 } } // namespace v8::internal |
5552 | 5552 |
5553 #endif // V8_TARGET_ARCH_MIPS | 5553 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |