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

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

Issue 130743006: Merged r16772, r18000, r18298, r18319 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Fix x64 Created 6 years, 11 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/version.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 4107 matching lines...) Expand 10 before | Expand all | Expand 10 after
4118 } else { 4118 } else {
4119 subu(dst, left, right); 4119 subu(dst, left, right);
4120 xor_(overflow_dst, dst, left); 4120 xor_(overflow_dst, dst, left);
4121 xor_(scratch, left, right); 4121 xor_(scratch, left, right);
4122 and_(overflow_dst, scratch, overflow_dst); 4122 and_(overflow_dst, scratch, overflow_dst);
4123 } 4123 }
4124 } 4124 }
4125 4125
4126 4126
4127 void MacroAssembler::CallRuntime(const Runtime::Function* f, 4127 void MacroAssembler::CallRuntime(const Runtime::Function* f,
4128 int num_arguments) { 4128 int num_arguments,
4129 SaveFPRegsMode save_doubles) {
4129 // All parameters are on the stack. v0 has the return value after call. 4130 // All parameters are on the stack. v0 has the return value after call.
4130 4131
4131 // If the expected number of arguments of the runtime function is 4132 // If the expected number of arguments of the runtime function is
4132 // constant, we check that the actual number of arguments match the 4133 // constant, we check that the actual number of arguments match the
4133 // expectation. 4134 // expectation.
4134 if (f->nargs >= 0 && f->nargs != num_arguments) { 4135 if (f->nargs >= 0 && f->nargs != num_arguments) {
4135 IllegalOperation(num_arguments); 4136 IllegalOperation(num_arguments);
4136 return; 4137 return;
4137 } 4138 }
4138 4139
4139 // TODO(1236192): Most runtime routines don't need the number of 4140 // TODO(1236192): Most runtime routines don't need the number of
4140 // arguments passed in because it is constant. At some point we 4141 // arguments passed in because it is constant. At some point we
4141 // should remove this need and make the runtime routine entry code 4142 // should remove this need and make the runtime routine entry code
4142 // smarter. 4143 // smarter.
4143 PrepareCEntryArgs(num_arguments); 4144 PrepareCEntryArgs(num_arguments);
4144 PrepareCEntryFunction(ExternalReference(f, isolate())); 4145 PrepareCEntryFunction(ExternalReference(f, isolate()));
4145 CEntryStub stub(1); 4146 CEntryStub stub(1, save_doubles);
4146 CallStub(&stub); 4147 CallStub(&stub);
4147 } 4148 }
4148 4149
4149 4150
4150 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) { 4151 void MacroAssembler::CallRuntimeSaveDoubles(Runtime::FunctionId id) {
4151 const Runtime::Function* function = Runtime::FunctionForId(id); 4152 const Runtime::Function* function = Runtime::FunctionForId(id);
4152 PrepareCEntryArgs(function->nargs); 4153 PrepareCEntryArgs(function->nargs);
4153 PrepareCEntryFunction(ExternalReference(function, isolate())); 4154 PrepareCEntryFunction(ExternalReference(function, isolate()));
4154 CEntryStub stub(1, kSaveFPRegs); 4155 CEntryStub stub(1, kSaveFPRegs);
4155 CallStub(&stub); 4156 CallStub(&stub);
4156 } 4157 }
4157 4158
4158 4159
4159 void MacroAssembler::CallRuntime(Runtime::FunctionId fid, int num_arguments) { 4160 void MacroAssembler::CallRuntime(Runtime::FunctionId fid,
4160 CallRuntime(Runtime::FunctionForId(fid), num_arguments); 4161 int num_arguments,
4162 SaveFPRegsMode save_doubles) {
4163 CallRuntime(Runtime::FunctionForId(fid), num_arguments, save_doubles);
4161 } 4164 }
4162 4165
4163 4166
4164 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 4167 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
4165 int num_arguments, 4168 int num_arguments,
4166 BranchDelaySlot bd) { 4169 BranchDelaySlot bd) {
4167 PrepareCEntryArgs(num_arguments); 4170 PrepareCEntryArgs(num_arguments);
4168 PrepareCEntryFunction(ext); 4171 PrepareCEntryFunction(ext);
4169 4172
4170 CEntryStub stub(1); 4173 CEntryStub stub(1);
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
5596 opcode == BGTZL); 5599 opcode == BGTZL);
5597 opcode = (cond == eq) ? BEQ : BNE; 5600 opcode = (cond == eq) ? BEQ : BNE;
5598 instr = (instr & ~kOpcodeMask) | opcode; 5601 instr = (instr & ~kOpcodeMask) | opcode;
5599 masm_.emit(instr); 5602 masm_.emit(instr);
5600 } 5603 }
5601 5604
5602 5605
5603 } } // namespace v8::internal 5606 } } // namespace v8::internal
5604 5607
5605 #endif // V8_TARGET_ARCH_MIPS 5608 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698