OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 void EmitClassOfTest(Label* if_true, | 206 void EmitClassOfTest(Label* if_true, |
207 Label* if_false, | 207 Label* if_false, |
208 Handle<String> class_name, | 208 Handle<String> class_name, |
209 Register input, | 209 Register input, |
210 Register temporary, | 210 Register temporary, |
211 Register temporary2); | 211 Register temporary2); |
212 | 212 |
213 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } | 213 int GetStackSlotCount() const { return chunk()->spill_slot_count(); } |
214 | 214 |
215 void Abort(const char* reason); | 215 void Abort(BailoutReason reason); |
216 void FPRINTF_CHECKING Comment(const char* format, ...); | 216 void FPRINTF_CHECKING Comment(const char* format, ...); |
217 | 217 |
218 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } | 218 void AddDeferredCode(LDeferredCode* code) { deferred_.Add(code, zone()); } |
219 | 219 |
220 // Code generation passes. Returns true if code generation should | 220 // Code generation passes. Returns true if code generation should |
221 // continue. | 221 // continue. |
222 bool GeneratePrologue(); | 222 bool GeneratePrologue(); |
223 bool GenerateBody(); | 223 bool GenerateBody(); |
224 bool GenerateDeferredCode(); | 224 bool GenerateDeferredCode(); |
225 bool GenerateJumpTable(); | 225 bool GenerateJumpTable(); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 void PopulateDeoptimizationData(Handle<Code> code); | 290 void PopulateDeoptimizationData(Handle<Code> code); |
291 int DefineDeoptimizationLiteral(Handle<Object> literal); | 291 int DefineDeoptimizationLiteral(Handle<Object> literal); |
292 | 292 |
293 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); | 293 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); |
294 | 294 |
295 Register ToRegister(int index) const; | 295 Register ToRegister(int index) const; |
296 XMMRegister ToDoubleRegister(int index) const; | 296 XMMRegister ToDoubleRegister(int index) const; |
297 X87Register ToX87Register(int index) const; | 297 X87Register ToX87Register(int index) const; |
298 int ToRepresentation(LConstantOperand* op, const Representation& r) const; | 298 int ToRepresentation(LConstantOperand* op, const Representation& r) const; |
299 int32_t ToInteger32(LConstantOperand* op) const; | 299 int32_t ToInteger32(LConstantOperand* op) const; |
| 300 ExternalReference ToExternalReference(LConstantOperand* op) const; |
300 | 301 |
301 Operand BuildFastArrayOperand(LOperand* elements_pointer, | 302 Operand BuildFastArrayOperand(LOperand* elements_pointer, |
302 LOperand* key, | 303 LOperand* key, |
303 Representation key_representation, | 304 Representation key_representation, |
304 ElementsKind elements_kind, | 305 ElementsKind elements_kind, |
305 uint32_t offset, | 306 uint32_t offset, |
306 uint32_t additional_index = 0); | 307 uint32_t additional_index = 0); |
307 | 308 |
308 void EmitIntegerMathAbs(LMathAbs* instr); | 309 void EmitIntegerMathAbs(LMathAbs* instr); |
309 | 310 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 void X87Fxch(X87Register reg, int other_slot = 0); | 401 void X87Fxch(X87Register reg, int other_slot = 0); |
401 void X87Fld(Operand src, X87OperandType opts); | 402 void X87Fld(Operand src, X87OperandType opts); |
402 void X87Free(X87Register reg); | 403 void X87Free(X87Register reg); |
403 | 404 |
404 void FlushX87StackIfNecessary(LInstruction* instr); | 405 void FlushX87StackIfNecessary(LInstruction* instr); |
405 void EmitFlushX87ForDeopt(); | 406 void EmitFlushX87ForDeopt(); |
406 bool X87StackContains(X87Register reg); | 407 bool X87StackContains(X87Register reg); |
407 int X87ArrayIndex(X87Register reg); | 408 int X87ArrayIndex(X87Register reg); |
408 int x87_st2idx(int pos); | 409 int x87_st2idx(int pos); |
409 | 410 |
| 411 #ifdef _MSC_VER |
| 412 // On windows, you may not access the stack more than one page below |
| 413 // the most recently mapped page. To make the allocated area randomly |
| 414 // accessible, we write an arbitrary value to each page in range |
| 415 // esp + offset - page_size .. esp in turn. |
| 416 void MakeSureStackPagesMapped(int offset); |
| 417 #endif |
| 418 |
410 Zone* zone_; | 419 Zone* zone_; |
411 LPlatformChunk* const chunk_; | 420 LPlatformChunk* const chunk_; |
412 MacroAssembler* const masm_; | 421 MacroAssembler* const masm_; |
413 CompilationInfo* const info_; | 422 CompilationInfo* const info_; |
414 | 423 |
415 int current_block_; | 424 int current_block_; |
416 int current_instruction_; | 425 int current_instruction_; |
417 const ZoneList<LInstruction*>* instructions_; | 426 const ZoneList<LInstruction*>* instructions_; |
418 ZoneList<LEnvironment*> deoptimizations_; | 427 ZoneList<LEnvironment*> deoptimizations_; |
419 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; | 428 ZoneList<Deoptimizer::JumpTableEntry> jump_table_; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 LCodeGen* codegen_; | 502 LCodeGen* codegen_; |
494 Label entry_; | 503 Label entry_; |
495 Label exit_; | 504 Label exit_; |
496 Label* external_exit_; | 505 Label* external_exit_; |
497 int instruction_index_; | 506 int instruction_index_; |
498 }; | 507 }; |
499 | 508 |
500 } } // namespace v8::internal | 509 } } // namespace v8::internal |
501 | 510 |
502 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 511 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |