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

Side by Side Diff: src/macro-assembler-arm.h

Issue 1930: Adapt to new calling convention on ARM. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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/ic-ia32.cc ('k') | src/macro-assembler-arm.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // Sets the remembered set bit for [address+offset], where address is the 91 // Sets the remembered set bit for [address+offset], where address is the
92 // address of the heap object 'object'. The address must be in the first 8K 92 // address of the heap object 'object'. The address must be in the first 8K
93 // of an allocated page. The 'scratch' register is used in the 93 // of an allocated page. The 'scratch' register is used in the
94 // implementation and all 3 registers are clobbered by the operation, as 94 // implementation and all 3 registers are clobbered by the operation, as
95 // well as the ip register. 95 // well as the ip register.
96 void RecordWrite(Register object, Register offset, Register scratch); 96 void RecordWrite(Register object, Register offset, Register scratch);
97 97
98 // --------------------------------------------------------------------------- 98 // ---------------------------------------------------------------------------
99 // Activation frames 99 // Activation frames
100 100
101 void EnterJSFrame(int argc); 101 void EnterInternalFrame();
102 void ExitJSFrame(ExitJSFlag flag); 102 void ExitInternalFrame();
103 103
104 104
105 // --------------------------------------------------------------------------- 105 // ---------------------------------------------------------------------------
106 // JavaScript invokes 106 // JavaScript invokes
107 107
108 // Helper functions for generating invokes.
109 void InvokePrologue(const ParameterCount& expected,
110 const ParameterCount& actual,
111 Handle<Code> code_constant,
112 Register code_reg,
113 Label* done,
114 InvokeFlag flag);
115
116 // Invoke the JavaScript function code by either calling or jumping. 108 // Invoke the JavaScript function code by either calling or jumping.
117 void InvokeCode(Register code, 109 void InvokeCode(Register code,
118 const ParameterCount& expected, 110 const ParameterCount& expected,
119 const ParameterCount& actual, 111 const ParameterCount& actual,
120 InvokeFlag flag); 112 InvokeFlag flag);
121 113
122 void InvokeCode(Handle<Code> code, 114 void InvokeCode(Handle<Code> code,
123 const ParameterCount& expected, 115 const ParameterCount& expected,
124 const ParameterCount& actual, 116 const ParameterCount& actual,
125 RelocMode rmode, 117 RelocMode rmode,
126 InvokeFlag flag); 118 InvokeFlag flag);
127 119
128 // Invoke the JavaScript function in the given register. Changes the 120 // Invoke the JavaScript function in the given register. Changes the
129 // current context to the context in the function before invoking. 121 // current context to the context in the function before invoking.
130 void InvokeFunction(Register function, 122 void InvokeFunction(Register function,
131 const ParameterCount& actual, 123 const ParameterCount& actual,
132 InvokeFlag flag); 124 InvokeFlag flag);
133 125
126
134 // --------------------------------------------------------------------------- 127 // ---------------------------------------------------------------------------
135 // Debugger Support 128 // Debugger Support
136 129
137 void SaveRegistersToMemory(RegList regs); 130 void SaveRegistersToMemory(RegList regs);
138 void RestoreRegistersFromMemory(RegList regs); 131 void RestoreRegistersFromMemory(RegList regs);
139 void CopyRegistersFromMemoryToStack(Register base, RegList regs); 132 void CopyRegistersFromMemoryToStack(Register base, RegList regs);
140 void CopyRegistersFromStackToMemory(Register base, 133 void CopyRegistersFromStackToMemory(Register base,
141 Register scratch, 134 Register scratch,
142 RegList regs); 135 RegList regs);
143 136
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 // Tail call of a runtime routine (jump). 186 // Tail call of a runtime routine (jump).
194 // Like JumpToBuiltin, but also takes care of passing the number 187 // Like JumpToBuiltin, but also takes care of passing the number
195 // of parameters. 188 // of parameters.
196 void TailCallRuntime(const ExternalReference& ext, int num_arguments); 189 void TailCallRuntime(const ExternalReference& ext, int num_arguments);
197 190
198 // Jump to the builtin routine. 191 // Jump to the builtin routine.
199 void JumpToBuiltin(const ExternalReference& builtin); 192 void JumpToBuiltin(const ExternalReference& builtin);
200 193
201 // Invoke specified builtin JavaScript function. Adds an entry to 194 // Invoke specified builtin JavaScript function. Adds an entry to
202 // the unresolved list if the name does not resolve. 195 // the unresolved list if the name does not resolve.
203 void InvokeBuiltin(const char* name, int argc, InvokeJSFlags flags); 196 void InvokeBuiltin(Builtins::JavaScript id, InvokeJSFlags flags);
197
198 // Store the code object for the given builtin in the target register and
199 // setup the function in r1.
200 void GetBuiltinEntry(Register target, Builtins::JavaScript id);
204 201
205 struct Unresolved { 202 struct Unresolved {
206 int pc; 203 int pc;
207 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders. 204 uint32_t flags; // see Bootstrapper::FixupFlags decoders/encoders.
208 const char* name; 205 const char* name;
209 }; 206 };
210 List<Unresolved>* unresolved() { return &unresolved_; } 207 List<Unresolved>* unresolved() { return &unresolved_; }
211 208
212 209
213 // --------------------------------------------------------------------------- 210 // ---------------------------------------------------------------------------
(...skipping 12 matching lines...) Expand all
226 // Verify restrictions about code generated in stubs. 223 // Verify restrictions about code generated in stubs.
227 void set_generating_stub(bool value) { generating_stub_ = value; } 224 void set_generating_stub(bool value) { generating_stub_ = value; }
228 bool generating_stub() { return generating_stub_; } 225 bool generating_stub() { return generating_stub_; }
229 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; } 226 void set_allow_stub_calls(bool value) { allow_stub_calls_ = value; }
230 bool allow_stub_calls() { return allow_stub_calls_; } 227 bool allow_stub_calls() { return allow_stub_calls_; }
231 228
232 private: 229 private:
233 List<Unresolved> unresolved_; 230 List<Unresolved> unresolved_;
234 bool generating_stub_; 231 bool generating_stub_;
235 bool allow_stub_calls_; 232 bool allow_stub_calls_;
233
234 // Helper functions for generating invokes.
235 void InvokePrologue(const ParameterCount& expected,
236 const ParameterCount& actual,
237 Handle<Code> code_constant,
238 Register code_reg,
239 Label* done,
240 InvokeFlag flag);
241
242 // Get the code for the given builtin. Returns if able to resolve
243 // the function in the 'resolved' flag.
244 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved);
236 }; 245 };
237 246
238 247
239 // ----------------------------------------------------------------------------- 248 // -----------------------------------------------------------------------------
240 // Static helper functions. 249 // Static helper functions.
241 250
242 // Generate a MemOperand for loading a field from an object. 251 // Generate a MemOperand for loading a field from an object.
243 static inline MemOperand FieldMemOperand(Register object, int offset) { 252 static inline MemOperand FieldMemOperand(Register object, int offset) {
244 return MemOperand(object, offset - kHeapObjectTag); 253 return MemOperand(object, offset - kHeapObjectTag);
245 } 254 }
246 255
247 256
248 257
249 } } // namespace v8::internal 258 } } // namespace v8::internal
250 259
251 #endif // V8_MACRO_ASSEMBLER_ARM_H_ 260 #endif // V8_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/ic-ia32.cc ('k') | src/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698