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

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

Issue 1248303002: Unify runtime-style IC functions with Runtime intrinsics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make mips work Created 5 years, 5 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 3343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3354 dsrl32(scratch, scratch, 0); 3354 dsrl32(scratch, scratch, 0);
3355 pop(dst); 3355 pop(dst);
3356 dsrl32(dst, dst, 0); 3356 dsrl32(dst, dst, 0);
3357 dsll32(dst, dst, 0); 3357 dsll32(dst, dst, 0);
3358 or_(dst, dst, scratch); 3358 or_(dst, dst, scratch);
3359 } 3359 }
3360 3360
3361 3361
3362 void MacroAssembler::DebugBreak() { 3362 void MacroAssembler::DebugBreak() {
3363 PrepareCEntryArgs(0); 3363 PrepareCEntryArgs(0);
3364 PrepareCEntryFunction(ExternalReference(Runtime::kDebugBreak, isolate())); 3364 PrepareCEntryFunction(
3365 ExternalReference(Runtime::kHandleDebuggerStatement, isolate()));
3365 CEntryStub ces(isolate(), 1); 3366 CEntryStub ces(isolate(), 1);
3366 DCHECK(AllowThisStubCall(&ces)); 3367 DCHECK(AllowThisStubCall(&ces));
3367 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT); 3368 Call(ces.GetCode(), RelocInfo::DEBUGGER_STATEMENT);
3368 } 3369 }
3369 3370
3370 3371
3371 // --------------------------------------------------------------------------- 3372 // ---------------------------------------------------------------------------
3372 // Exception handling. 3373 // Exception handling.
3373 3374
3374 void MacroAssembler::PushStackHandler() { 3375 void MacroAssembler::PushStackHandler() {
(...skipping 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after
4689 xor_(scratch, left, scratch); // Original right. 4690 xor_(scratch, left, scratch); // Original right.
4690 and_(overflow_dst, scratch, overflow_dst); 4691 and_(overflow_dst, scratch, overflow_dst);
4691 } else { 4692 } else {
4692 dsubu(dst, left, right); 4693 dsubu(dst, left, right);
4693 xor_(overflow_dst, dst, left); 4694 xor_(overflow_dst, dst, left);
4694 xor_(scratch, left, right); 4695 xor_(scratch, left, right);
4695 and_(overflow_dst, scratch, overflow_dst); 4696 and_(overflow_dst, scratch, overflow_dst);
4696 } 4697 }
4697 } 4698 }
4698 4699
4699 void MacroAssembler::CallRuntime(const Runtime::Function* f, 4700 void MacroAssembler::CallRuntime(const Runtime::Function* f, int num_arguments,
4700 int num_arguments, 4701 SaveFPRegsMode save_doubles,
4701 SaveFPRegsMode save_doubles) { 4702 BranchDelaySlot bd) {
4702 // All parameters are on the stack. v0 has the return value after call. 4703 // All parameters are on the stack. v0 has the return value after call.
4703 4704
4704 // If the expected number of arguments of the runtime function is 4705 // If the expected number of arguments of the runtime function is
4705 // constant, we check that the actual number of arguments match the 4706 // constant, we check that the actual number of arguments match the
4706 // expectation. 4707 // expectation.
4707 CHECK(f->nargs < 0 || f->nargs == num_arguments); 4708 CHECK(f->nargs < 0 || f->nargs == num_arguments);
4708 4709
4709 // TODO(1236192): Most runtime routines don't need the number of 4710 // TODO(1236192): Most runtime routines don't need the number of
4710 // arguments passed in because it is constant. At some point we 4711 // arguments passed in because it is constant. At some point we
4711 // should remove this need and make the runtime routine entry code 4712 // should remove this need and make the runtime routine entry code
4712 // smarter. 4713 // smarter.
4713 PrepareCEntryArgs(num_arguments); 4714 PrepareCEntryArgs(num_arguments);
4714 PrepareCEntryFunction(ExternalReference(f, isolate())); 4715 PrepareCEntryFunction(ExternalReference(f, isolate()));
4715 CEntryStub stub(isolate(), 1, save_doubles); 4716 CEntryStub stub(isolate(), 1, save_doubles);
4716 CallStub(&stub); 4717 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd);
4717 } 4718 }
4718 4719
4719 4720
4720 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 4721 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
4721 int num_arguments, 4722 int num_arguments,
4722 BranchDelaySlot bd) { 4723 BranchDelaySlot bd) {
4723 PrepareCEntryArgs(num_arguments); 4724 PrepareCEntryArgs(num_arguments);
4724 PrepareCEntryFunction(ext); 4725 PrepareCEntryFunction(ext);
4725 4726
4726 CEntryStub stub(isolate(), 1); 4727 CEntryStub stub(isolate(), 1);
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after
6345 if (mag.shift > 0) sra(result, result, mag.shift); 6346 if (mag.shift > 0) sra(result, result, mag.shift);
6346 srl(at, dividend, 31); 6347 srl(at, dividend, 31);
6347 Addu(result, result, Operand(at)); 6348 Addu(result, result, Operand(at));
6348 } 6349 }
6349 6350
6350 6351
6351 } // namespace internal 6352 } // namespace internal
6352 } // namespace v8 6353 } // namespace v8
6353 6354
6354 #endif // V8_TARGET_ARCH_MIPS64 6355 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698