OLD | NEW |
1 // Copyright 2008-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2008-2009 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 inline void Push(Register source); | 180 inline void Push(Register source); |
181 | 181 |
182 // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) | 182 // Pushes a value on the backtrack stack. Decrements the stack pointer (ecx) |
183 // by a word size and stores the value there. | 183 // by a word size and stores the value there. |
184 inline void Push(Immediate value); | 184 inline void Push(Immediate value); |
185 | 185 |
186 // Pops a value from the backtrack stack. Reads the word at the stack pointer | 186 // Pops a value from the backtrack stack. Reads the word at the stack pointer |
187 // (ecx) and increments it by a word size. | 187 // (ecx) and increments it by a word size. |
188 inline void Pop(Register target); | 188 inline void Pop(Register target); |
189 | 189 |
190 // Before calling a C-function from generated code, align arguments on stack. | |
191 // After aligning the frame, arguments must be stored in esp[0], esp[4], | |
192 // etc., not pushed. The argument count assumes all arguments are word sized. | |
193 // Some compilers/platforms require the stack to be aligned when calling | |
194 // C++ code. | |
195 // Needs a scratch register to do some arithmetic. This register will be | |
196 // trashed. | |
197 inline void FrameAlign(int num_arguments, Register scratch); | |
198 | |
199 // Calls a C function and cleans up the space for arguments allocated | |
200 // by FrameAlign. The called function is not allowed to trigger a garbage | |
201 // collection, since that might move the code and invalidate the return | |
202 // address (unless this is somehow accounted for). | |
203 inline void CallCFunction(ExternalReference function, int num_arguments); | |
204 | |
205 MacroAssembler* masm_; | 190 MacroAssembler* masm_; |
206 | 191 |
207 // Which mode to generate code for (ASCII or UC16). | 192 // Which mode to generate code for (ASCII or UC16). |
208 Mode mode_; | 193 Mode mode_; |
209 | 194 |
210 // One greater than maximal register index actually used. | 195 // One greater than maximal register index actually used. |
211 int num_registers_; | 196 int num_registers_; |
212 | 197 |
213 // Number of registers to output at the end (the saved registers | 198 // Number of registers to output at the end (the saved registers |
214 // are always 0..num_saved_registers_-1) | 199 // are always 0..num_saved_registers_-1) |
215 int num_saved_registers_; | 200 int num_saved_registers_; |
216 | 201 |
217 // Labels used internally. | 202 // Labels used internally. |
218 Label entry_label_; | 203 Label entry_label_; |
219 Label start_label_; | 204 Label start_label_; |
220 Label success_label_; | 205 Label success_label_; |
221 Label backtrack_label_; | 206 Label backtrack_label_; |
222 Label exit_label_; | 207 Label exit_label_; |
223 Label check_preempt_label_; | 208 Label check_preempt_label_; |
224 Label stack_overflow_label_; | 209 Label stack_overflow_label_; |
225 }; | 210 }; |
226 #endif // V8_NATIVE_REGEXP | 211 #endif // V8_NATIVE_REGEXP |
227 | 212 |
228 }} // namespace v8::internal | 213 }} // namespace v8::internal |
229 | 214 |
230 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ | 215 #endif // V8_IA32_REGEXP_MACRO_ASSEMBLER_IA32_H_ |
OLD | NEW |