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

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

Issue 150913002: MIPS: crankshaft support for api method calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 3856 matching lines...) Expand 10 before | Expand all | Expand 10 after
3867 3867
3868 3868
3869 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { 3869 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
3870 return ref0.address() - ref1.address(); 3870 return ref0.address() - ref1.address();
3871 } 3871 }
3872 3872
3873 3873
3874 void MacroAssembler::CallApiFunctionAndReturn( 3874 void MacroAssembler::CallApiFunctionAndReturn(
3875 Register function_address, 3875 Register function_address,
3876 ExternalReference thunk_ref, 3876 ExternalReference thunk_ref,
3877 Register thunk_last_arg,
3878 int stack_space, 3877 int stack_space,
3879 MemOperand return_value_operand, 3878 MemOperand return_value_operand,
3880 MemOperand* context_restore_operand) { 3879 MemOperand* context_restore_operand) {
3881 ExternalReference next_address = 3880 ExternalReference next_address =
3882 ExternalReference::handle_scope_next_address(isolate()); 3881 ExternalReference::handle_scope_next_address(isolate());
3883 const int kNextOffset = 0; 3882 const int kNextOffset = 0;
3884 const int kLimitOffset = AddressOffset( 3883 const int kLimitOffset = AddressOffset(
3885 ExternalReference::handle_scope_limit_address(isolate()), 3884 ExternalReference::handle_scope_limit_address(isolate()),
3886 next_address); 3885 next_address);
3887 const int kLevelOffset = AddressOffset( 3886 const int kLevelOffset = AddressOffset(
3888 ExternalReference::handle_scope_level_address(isolate()), 3887 ExternalReference::handle_scope_level_address(isolate()),
3889 next_address); 3888 next_address);
3890 3889
3891 ASSERT(function_address.is(a3)); 3890 ASSERT(function_address.is(a1) || function_address.is(a2));
3892 ASSERT(thunk_last_arg.is(a1) || thunk_last_arg.is(a2));
3893 3891
3894 Label profiler_disabled; 3892 Label profiler_disabled;
3895 Label end_profiler_check; 3893 Label end_profiler_check;
3896 bool* is_profiling_flag = 3894 bool* is_profiling_flag =
3897 isolate()->cpu_profiler()->is_profiling_address(); 3895 isolate()->cpu_profiler()->is_profiling_address();
3898 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1); 3896 STATIC_ASSERT(sizeof(*is_profiling_flag) == 1);
3899 li(t9, reinterpret_cast<int32_t>(is_profiling_flag)); 3897 li(t9, reinterpret_cast<int32_t>(is_profiling_flag));
3900 lb(t9, MemOperand(t9, 0)); 3898 lb(t9, MemOperand(t9, 0));
3901 Branch(&profiler_disabled, eq, t9, Operand(zero_reg)); 3899 Branch(&profiler_disabled, eq, t9, Operand(zero_reg));
3902 3900
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 opcode == BGTZL); 5743 opcode == BGTZL);
5746 opcode = (cond == eq) ? BEQ : BNE; 5744 opcode = (cond == eq) ? BEQ : BNE;
5747 instr = (instr & ~kOpcodeMask) | opcode; 5745 instr = (instr & ~kOpcodeMask) | opcode;
5748 masm_.emit(instr); 5746 masm_.emit(instr);
5749 } 5747 }
5750 5748
5751 5749
5752 } } // namespace v8::internal 5750 } } // namespace v8::internal
5753 5751
5754 #endif // V8_TARGET_ARCH_MIPS 5752 #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