Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 17162002: Version 3.19.17. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3891 matching lines...) Expand 10 before | Expand all | Expand 10 after
3902 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET); 3902 Jump(stub->GetCode(isolate()), RelocInfo::CODE_TARGET);
3903 } 3903 }
3904 3904
3905 3905
3906 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 3906 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
3907 return ref0.address() - ref1.address(); 3907 return ref0.address() - ref1.address();
3908 } 3908 }
3909 3909
3910 3910
3911 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function, 3911 void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
3912 Address function_address,
3913 ExternalReference thunk_ref,
3914 Register thunk_last_arg,
3915 int stack_space, 3912 int stack_space,
3916 bool returns_handle, 3913 bool returns_handle,
3917 int return_value_offset_from_fp) { 3914 int return_value_offset_from_fp) {
3918 ExternalReference next_address = 3915 ExternalReference next_address =
3919 ExternalReference::handle_scope_next_address(isolate()); 3916 ExternalReference::handle_scope_next_address(isolate());
3920 const int kNextOffset = 0; 3917 const int kNextOffset = 0;
3921 const int kLimitOffset = AddressOffset( 3918 const int kLimitOffset = AddressOffset(
3922 ExternalReference::handle_scope_limit_address(isolate()), 3919 ExternalReference::handle_scope_limit_address(isolate()),
3923 next_address); 3920 next_address);
3924 const int kLevelOffset = AddressOffset( 3921 const int kLevelOffset = AddressOffset(
(...skipping 18 matching lines...) Expand all
3943 } 3940 }
3944 3941
3945 // The O32 ABI requires us to pass a pointer in a0 where the returned struct 3942 // The O32 ABI requires us to pass a pointer in a0 where the returned struct
3946 // (4 bytes) will be placed. This is also built into the Simulator. 3943 // (4 bytes) will be placed. This is also built into the Simulator.
3947 // Set up the pointer to the returned value (a0). It was allocated in 3944 // Set up the pointer to the returned value (a0). It was allocated in
3948 // EnterExitFrame. 3945 // EnterExitFrame.
3949 if (returns_handle) { 3946 if (returns_handle) {
3950 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset); 3947 addiu(a0, fp, ExitFrameConstants::kStackSpaceOffset);
3951 } 3948 }
3952 3949
3953 Label profiler_disabled;
3954 Label end_profiler_check;
3955 bool* is_profiling_flag =
3956 isolate()->cpu_profiler()->is_profiling_address();
3957 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
3958 li(t9, reinterpret_cast<int32_t>(is_profiling_flag));
3959 lb(t9, MemOperand(t9, 0));
3960 beq(t9, zero_reg, &profiler_disabled);
3961
3962 // Third parameter is the address of the actual getter function.
3963 li(thunk_last_arg, reinterpret_cast<int32_t>(function_address));
3964 li(t9, Operand(thunk_ref));
3965 jmp(&end_profiler_check);
3966
3967 bind(&profiler_disabled);
3968 li(t9, Operand(function));
3969
3970 bind(&end_profiler_check);
3971
3972 // Native call returns to the DirectCEntry stub which redirects to the 3950 // Native call returns to the DirectCEntry stub which redirects to the
3973 // return address pushed on stack (could have moved after GC). 3951 // return address pushed on stack (could have moved after GC).
3974 // DirectCEntry stub itself is generated early and never moves. 3952 // DirectCEntry stub itself is generated early and never moves.
3975 DirectCEntryStub stub; 3953 DirectCEntryStub stub;
3976 stub.GenerateCall(this, t9); 3954 stub.GenerateCall(this, function);
3977 3955
3978 if (FLAG_log_timer_events) { 3956 if (FLAG_log_timer_events) {
3979 FrameScope frame(this, StackFrame::MANUAL); 3957 FrameScope frame(this, StackFrame::MANUAL);
3980 PushSafepointRegisters(); 3958 PushSafepointRegisters();
3981 PrepareCallCFunction(1, a0); 3959 PrepareCallCFunction(1, a0);
3982 li(a0, Operand(ExternalReference::isolate_address(isolate()))); 3960 li(a0, Operand(ExternalReference::isolate_address(isolate())));
3983 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1); 3961 CallCFunction(ExternalReference::log_leave_external_function(isolate()), 1);
3984 PopSafepointRegisters(); 3962 PopSafepointRegisters();
3985 } 3963 }
3986 3964
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
5548 opcode == BGTZL); 5526 opcode == BGTZL);
5549 opcode = (cond == eq) ? BEQ : BNE; 5527 opcode = (cond == eq) ? BEQ : BNE;
5550 instr = (instr & ~kOpcodeMask) | opcode; 5528 instr = (instr & ~kOpcodeMask) | opcode;
5551 masm_.emit(instr); 5529 masm_.emit(instr);
5552 } 5530 }
5553 5531
5554 5532
5555 } } // namespace v8::internal 5533 } } // namespace v8::internal
5556 5534
5557 #endif // V8_TARGET_ARCH_MIPS 5535 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698