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

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

Issue 11801003: MIPS: Enable type feedback for branch statement and function call (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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') | no next file » | 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 3917 matching lines...) Expand 10 before | Expand all | Expand 10 after
3928 Register type_reg) { 3928 Register type_reg) {
3929 lw(map, FieldMemOperand(object, HeapObject::kMapOffset)); 3929 lw(map, FieldMemOperand(object, HeapObject::kMapOffset));
3930 lbu(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); 3930 lbu(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3931 } 3931 }
3932 3932
3933 3933
3934 // ----------------------------------------------------------------------------- 3934 // -----------------------------------------------------------------------------
3935 // Runtime calls. 3935 // Runtime calls.
3936 3936
3937 void MacroAssembler::CallStub(CodeStub* stub, 3937 void MacroAssembler::CallStub(CodeStub* stub,
3938 TypeFeedbackId ast_id,
3938 Condition cond, 3939 Condition cond,
3939 Register r1, 3940 Register r1,
3940 const Operand& r2, 3941 const Operand& r2,
3941 BranchDelaySlot bd) { 3942 BranchDelaySlot bd) {
3942 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs. 3943 ASSERT(AllowThisStubCall(stub)); // Stub calls are not allowed in some stubs.
3943 Call(stub->GetCode(), RelocInfo::CODE_TARGET, TypeFeedbackId::None(), 3944 Call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id,
3944 cond, r1, r2, bd); 3945 cond, r1, r2, bd);
3945 } 3946 }
3946 3947
3947 3948
3948 void MacroAssembler::TailCallStub(CodeStub* stub) { 3949 void MacroAssembler::TailCallStub(CodeStub* stub) {
3949 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe()); 3950 ASSERT(allow_stub_calls_ || stub->CompilingCallsToThisStubIsGCSafe());
3950 Jump(stub->GetCode(), RelocInfo::CODE_TARGET); 3951 Jump(stub->GetCode(), RelocInfo::CODE_TARGET);
3951 } 3952 }
3952 3953
3953 3954
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
4259 } 4260 }
4260 4261
4261 4262
4262 void MacroAssembler::CallExternalReference(const ExternalReference& ext, 4263 void MacroAssembler::CallExternalReference(const ExternalReference& ext,
4263 int num_arguments, 4264 int num_arguments,
4264 BranchDelaySlot bd) { 4265 BranchDelaySlot bd) {
4265 PrepareCEntryArgs(num_arguments); 4266 PrepareCEntryArgs(num_arguments);
4266 PrepareCEntryFunction(ext); 4267 PrepareCEntryFunction(ext);
4267 4268
4268 CEntryStub stub(1); 4269 CEntryStub stub(1);
4269 CallStub(&stub, al, zero_reg, Operand(zero_reg), bd); 4270 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd);
4270 } 4271 }
4271 4272
4272 4273
4273 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, 4274 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext,
4274 int num_arguments, 4275 int num_arguments,
4275 int result_size) { 4276 int result_size) {
4276 // TODO(1236192): Most runtime routines don't need the number of 4277 // TODO(1236192): Most runtime routines don't need the number of
4277 // arguments passed in because it is constant. At some point we 4278 // arguments passed in because it is constant. At some point we
4278 // should remove this need and make the runtime routine entry code 4279 // should remove this need and make the runtime routine entry code
4279 // smarter. 4280 // smarter.
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
5506 opcode == BGTZL); 5507 opcode == BGTZL);
5507 opcode = (cond == eq) ? BEQ : BNE; 5508 opcode = (cond == eq) ? BEQ : BNE;
5508 instr = (instr & ~kOpcodeMask) | opcode; 5509 instr = (instr & ~kOpcodeMask) | opcode;
5509 masm_.emit(instr); 5510 masm_.emit(instr);
5510 } 5511 }
5511 5512
5512 5513
5513 } } // namespace v8::internal 5514 } } // namespace v8::internal
5514 5515
5515 #endif // V8_TARGET_ARCH_MIPS 5516 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698