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

Side by Side Diff: src/x64/lithium-x64.h

Issue 145773008: A64: Synchronize with r17104. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.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 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 265
266 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } 266 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
267 HValue* hydrogen_value() const { return hydrogen_value_; } 267 HValue* hydrogen_value() const { return hydrogen_value_; }
268 268
269 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 269 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
270 bool IsCall() const { return IsCallBits::decode(bit_field_); } 270 bool IsCall() const { return IsCallBits::decode(bit_field_); }
271 271
272 // Interface to the register allocator and iterators. 272 // Interface to the register allocator and iterators.
273 bool ClobbersTemps() const { return IsCall(); } 273 bool ClobbersTemps() const { return IsCall(); }
274 bool ClobbersRegisters() const { return IsCall(); } 274 bool ClobbersRegisters() const { return IsCall(); }
275 bool ClobbersDoubleRegisters() const { return IsCall(); } 275 virtual bool ClobbersDoubleRegisters() const { return IsCall(); }
276 276
277 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 277 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
278 278
279 // Interface to the register allocator and iterators. 279 // Interface to the register allocator and iterators.
280 bool IsMarkedAsCall() const { return IsCall(); } 280 bool IsMarkedAsCall() const { return IsCall(); }
281 281
282 virtual bool HasResult() const = 0; 282 virtual bool HasResult() const = 0;
283 virtual LOperand* result() const = 0; 283 virtual LOperand* result() const = 0;
284 284
285 LOperand* FirstInput() { return InputAt(0); } 285 LOperand* FirstInput() { return InputAt(0); }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 396 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
397 return !IsRedundant(); 397 return !IsRedundant();
398 } 398 }
399 399
400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 400 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
401 }; 401 };
402 402
403 403
404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 404 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
405 public: 405 public:
406 explicit LGoto(int block_id) : block_id_(block_id) { } 406 explicit LGoto(HBasicBlock* block) : block_(block) { }
407 407
408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 408 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 409 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 410 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
411 virtual bool IsControl() const V8_OVERRIDE { return true; } 411 virtual bool IsControl() const V8_OVERRIDE { return true; }
412 412
413 int block_id() const { return block_id_; } 413 int block_id() const { return block_->block_id(); }
414 414
415 private: 415 private:
416 int block_id_; 416 HBasicBlock* block_;
417 }; 417 };
418 418
419 419
420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 420 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
421 public: 421 public:
422 LLazyBailout() : gap_instructions_size_(0) { } 422 LLazyBailout() : gap_instructions_size_(0) { }
423 423
424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout") 424 DECLARE_CONCRETE_INSTRUCTION(LazyBailout, "lazy-bailout")
425 425
426 void set_gap_instructions_size(int gap_instructions_size) { 426 void set_gap_instructions_size(int gap_instructions_size) {
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1912 1912
1913 int arity() const { return hydrogen()->argument_count() - 1; } 1913 int arity() const { return hydrogen()->argument_count() - 1; }
1914 }; 1914 };
1915 1915
1916 1916
1917 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> { 1917 class LCallRuntime V8_FINAL : public LTemplateInstruction<1, 0, 0> {
1918 public: 1918 public:
1919 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 1919 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
1920 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 1920 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
1921 1921
1922 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE {
1923 return save_doubles() == kDontSaveFPRegs;
1924 }
1925
1922 const Runtime::Function* function() const { return hydrogen()->function(); } 1926 const Runtime::Function* function() const { return hydrogen()->function(); }
1923 int arity() const { return hydrogen()->argument_count(); } 1927 int arity() const { return hydrogen()->argument_count(); }
1928 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
1924 }; 1929 };
1925 1930
1926 1931
1927 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1932 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
1928 public: 1933 public:
1929 explicit LInteger32ToDouble(LOperand* value) { 1934 explicit LInteger32ToDouble(LOperand* value) {
1930 inputs_[0] = value; 1935 inputs_[0] = value;
1931 } 1936 }
1932 1937
1933 LOperand* value() { return inputs_[0]; } 1938 LOperand* value() { return inputs_[0]; }
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index") 2540 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex, "load-field-by-index")
2536 }; 2541 };
2537 2542
2538 2543
2539 class LChunkBuilder; 2544 class LChunkBuilder;
2540 class LPlatformChunk V8_FINAL : public LChunk { 2545 class LPlatformChunk V8_FINAL : public LChunk {
2541 public: 2546 public:
2542 LPlatformChunk(CompilationInfo* info, HGraph* graph) 2547 LPlatformChunk(CompilationInfo* info, HGraph* graph)
2543 : LChunk(info, graph) { } 2548 : LChunk(info, graph) { }
2544 2549
2545 int GetNextSpillIndex(bool is_double); 2550 int GetNextSpillIndex(RegisterKind kind);
2546 LOperand* GetNextSpillSlot(bool is_double); 2551 LOperand* GetNextSpillSlot(RegisterKind kind);
2547 }; 2552 };
2548 2553
2549 2554
2550 class LChunkBuilder V8_FINAL BASE_EMBEDDED { 2555 class LChunkBuilder V8_FINAL BASE_EMBEDDED {
2551 public: 2556 public:
2552 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator) 2557 LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
2553 : chunk_(NULL), 2558 : chunk_(NULL),
2554 info_(info), 2559 info_(info),
2555 graph_(graph), 2560 graph_(graph),
2556 zone_(graph->zone()), 2561 zone_(graph->zone()),
2557 status_(UNUSED), 2562 status_(UNUSED),
2558 current_instruction_(NULL), 2563 current_instruction_(NULL),
2559 current_block_(NULL), 2564 current_block_(NULL),
2560 next_block_(NULL), 2565 next_block_(NULL),
2561 argument_count_(0), 2566 argument_count_(0),
2562 allocator_(allocator), 2567 allocator_(allocator),
2563 position_(RelocInfo::kNoPosition), 2568 position_(RelocInfo::kNoPosition),
2564 instruction_pending_deoptimization_environment_(NULL), 2569 instruction_pending_deoptimization_environment_(NULL),
2565 pending_deoptimization_ast_id_(BailoutId::None()) { } 2570 pending_deoptimization_ast_id_(BailoutId::None()) { }
2566 2571
2567 // Build the sequence for the graph. 2572 // Build the sequence for the graph.
2568 LPlatformChunk* Build(); 2573 LPlatformChunk* Build();
2569 2574
2575 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2576
2570 // Declare methods that deal with the individual node types. 2577 // Declare methods that deal with the individual node types.
2571 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2578 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2572 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2579 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2573 #undef DECLARE_DO 2580 #undef DECLARE_DO
2574 2581
2575 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val); 2582 static HValue* SimplifiedDivisorForMathFloorOfDiv(HValue* val);
2576 2583
2577 LInstruction* DoMathFloor(HUnaryMathOperation* instr); 2584 LInstruction* DoMathFloor(HUnaryMathOperation* instr);
2578 LInstruction* DoMathRound(HUnaryMathOperation* instr); 2585 LInstruction* DoMathRound(HUnaryMathOperation* instr);
2579 LInstruction* DoMathAbs(HUnaryMathOperation* instr); 2586 LInstruction* DoMathAbs(HUnaryMathOperation* instr);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2717 2724
2718 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2725 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2719 }; 2726 };
2720 2727
2721 #undef DECLARE_HYDROGEN_ACCESSOR 2728 #undef DECLARE_HYDROGEN_ACCESSOR
2722 #undef DECLARE_CONCRETE_INSTRUCTION 2729 #undef DECLARE_CONCRETE_INSTRUCTION
2723 2730
2724 } } // namespace v8::int 2731 } } // namespace v8::int
2725 2732
2726 #endif // V8_X64_LITHIUM_X64_H_ 2733 #endif // V8_X64_LITHIUM_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698