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

Side by Side Diff: src/mips/ic-mips.cc

Issue 1140004: MIPS simple function calls... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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/frames-mips.cc ('k') | src/mips/jump-target-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 UNIMPLEMENTED_MIPS(); 67 UNIMPLEMENTED_MIPS();
68 } 68 }
69 69
70 70
71 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) { 71 void CallIC::GenerateNormal(MacroAssembler* masm, int argc) {
72 UNIMPLEMENTED_MIPS(); 72 UNIMPLEMENTED_MIPS();
73 } 73 }
74 74
75 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) { 75 void CallIC::GenerateMiss(MacroAssembler* masm, int argc) {
76 UNIMPLEMENTED_MIPS(); 76 UNIMPLEMENTED_MIPS();
77 // Registers:
78 // a2: name
79 // ra: return address
80
81 // Get the receiver of the function from the stack.
82 __ lw(a3, MemOperand(sp, argc*kPointerSize));
83
84 __ EnterInternalFrame();
85
86 // Push the receiver and the name of the function.
87 __ MultiPush(a2.bit() | a3.bit());
88
89 // Call the entry.
90 __ li(a0, Operand(2));
91 __ li(a1, Operand(ExternalReference(IC_Utility(kCallIC_Miss))));
92
93 CEntryStub stub(1);
94 __ CallStub(&stub);
95
96 // Move result to r1 and leave the internal frame.
97 __ mov(a1, v0);
98 __ LeaveInternalFrame();
99
100 // Check if the receiver is a global object of some sort.
101 Label invoke, global;
102 __ lw(a2, MemOperand(sp, argc * kPointerSize));
103 __ andi(t0, a2, kSmiTagMask);
104 __ Branch(eq, &invoke, t0, Operand(zero_reg));
105 __ GetObjectType(a2, a3, a3);
106 __ Branch(eq, &global, a3, Operand(JS_GLOBAL_OBJECT_TYPE));
107 __ Branch(ne, &invoke, a3, Operand(JS_BUILTINS_OBJECT_TYPE));
108
109 // Patch the receiver on the stack.
110 __ bind(&global);
111 __ lw(a2, FieldMemOperand(a2, GlobalObject::kGlobalReceiverOffset));
112 __ sw(a2, MemOperand(sp, argc * kPointerSize));
113
114 // Invoke the function.
115 ParameterCount actual(argc);
116 __ bind(&invoke);
117 __ InvokeFunction(a1, actual, JUMP_FUNCTION);
77 } 118 }
78 119
79 // Defined in ic.cc. 120 // Defined in ic.cc.
80 Object* LoadIC_Miss(Arguments args); 121 Object* LoadIC_Miss(Arguments args);
81 122
82 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { 123 void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
83 UNIMPLEMENTED_MIPS(); 124 UNIMPLEMENTED_MIPS();
84 } 125 }
85 126
86 127
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 208
168 209
169 void StoreIC::GenerateArrayLength(MacroAssembler* masm) { 210 void StoreIC::GenerateArrayLength(MacroAssembler* masm) {
170 UNIMPLEMENTED_MIPS(); 211 UNIMPLEMENTED_MIPS();
171 } 212 }
172 213
173 #undef __ 214 #undef __
174 215
175 } } // namespace v8::internal 216 } } // namespace v8::internal
176 217
OLDNEW
« no previous file with comments | « src/mips/frames-mips.cc ('k') | src/mips/jump-target-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698