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

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

Issue 149413010: A64: Synchronize with r16024. (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/arm/full-codegen-arm.cc ('k') | src/arm/lithium-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 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 V(CheckSmi) \ 72 V(CheckSmi) \
73 V(ClampDToUint8) \ 73 V(ClampDToUint8) \
74 V(ClampIToUint8) \ 74 V(ClampIToUint8) \
75 V(ClampTToUint8) \ 75 V(ClampTToUint8) \
76 V(ClassOfTestAndBranch) \ 76 V(ClassOfTestAndBranch) \
77 V(CompareNumericAndBranch) \ 77 V(CompareNumericAndBranch) \
78 V(CmpObjectEqAndBranch) \ 78 V(CmpObjectEqAndBranch) \
79 V(CmpMapAndBranch) \ 79 V(CmpMapAndBranch) \
80 V(CmpT) \ 80 V(CmpT) \
81 V(ConstantD) \ 81 V(ConstantD) \
82 V(ConstantE) \
82 V(ConstantI) \ 83 V(ConstantI) \
83 V(ConstantS) \ 84 V(ConstantS) \
84 V(ConstantT) \ 85 V(ConstantT) \
85 V(Context) \ 86 V(Context) \
86 V(DateField) \ 87 V(DateField) \
87 V(DebugBreak) \ 88 V(DebugBreak) \
88 V(DeclareGlobals) \ 89 V(DeclareGlobals) \
89 V(Deoptimize) \ 90 V(Deoptimize) \
90 V(DivI) \ 91 V(DivI) \
91 V(DoubleToI) \ 92 V(DoubleToI) \
(...skipping 19 matching lines...) Expand all
111 V(Integer32ToSmi) \ 112 V(Integer32ToSmi) \
112 V(InvokeFunction) \ 113 V(InvokeFunction) \
113 V(IsConstructCallAndBranch) \ 114 V(IsConstructCallAndBranch) \
114 V(IsObjectAndBranch) \ 115 V(IsObjectAndBranch) \
115 V(IsStringAndBranch) \ 116 V(IsStringAndBranch) \
116 V(IsNumberAndBranch) \ 117 V(IsNumberAndBranch) \
117 V(IsSmiAndBranch) \ 118 V(IsSmiAndBranch) \
118 V(IsUndetectableAndBranch) \ 119 V(IsUndetectableAndBranch) \
119 V(Label) \ 120 V(Label) \
120 V(LazyBailout) \ 121 V(LazyBailout) \
121 V(LinkObjectInList) \
122 V(LoadContextSlot) \ 122 V(LoadContextSlot) \
123 V(LoadExternalArrayPointer) \ 123 V(LoadExternalArrayPointer) \
124 V(LoadFieldByIndex) \ 124 V(LoadFieldByIndex) \
125 V(LoadFunctionPrototype) \ 125 V(LoadFunctionPrototype) \
126 V(LoadGlobalCell) \ 126 V(LoadGlobalCell) \
127 V(LoadGlobalGeneric) \ 127 V(LoadGlobalGeneric) \
128 V(LoadKeyed) \ 128 V(LoadKeyed) \
129 V(LoadKeyedGeneric) \ 129 V(LoadKeyedGeneric) \
130 V(LoadNamedField) \ 130 V(LoadNamedField) \
131 V(LoadNamedFieldPolymorphic) \ 131 V(LoadNamedFieldPolymorphic) \
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 V(StoreGlobalCell) \ 168 V(StoreGlobalCell) \
169 V(StoreGlobalGeneric) \ 169 V(StoreGlobalGeneric) \
170 V(StoreKeyed) \ 170 V(StoreKeyed) \
171 V(StoreKeyedGeneric) \ 171 V(StoreKeyedGeneric) \
172 V(StoreNamedField) \ 172 V(StoreNamedField) \
173 V(StoreNamedGeneric) \ 173 V(StoreNamedGeneric) \
174 V(StringAdd) \ 174 V(StringAdd) \
175 V(StringCharCodeAt) \ 175 V(StringCharCodeAt) \
176 V(StringCharFromCode) \ 176 V(StringCharFromCode) \
177 V(StringCompareAndBranch) \ 177 V(StringCompareAndBranch) \
178 V(StringLength) \
179 V(SubI) \ 178 V(SubI) \
180 V(RSubI) \ 179 V(RSubI) \
181 V(TaggedToI) \ 180 V(TaggedToI) \
182 V(ThisFunction) \ 181 V(ThisFunction) \
183 V(Throw) \ 182 V(Throw) \
184 V(ToFastProperties) \ 183 V(ToFastProperties) \
185 V(TransitionElementsKind) \ 184 V(TransitionElementsKind) \
186 V(TrapAllocationMemento) \ 185 V(TrapAllocationMemento) \
187 V(Typeof) \ 186 V(Typeof) \
188 V(TypeofIsAndBranch) \ 187 V(TypeofIsAndBranch) \
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 260
262 // Interface to the register allocator and iterators. 261 // Interface to the register allocator and iterators.
263 bool ClobbersTemps() const { return is_call_; } 262 bool ClobbersTemps() const { return is_call_; }
264 bool ClobbersRegisters() const { return is_call_; } 263 bool ClobbersRegisters() const { return is_call_; }
265 bool ClobbersDoubleRegisters() const { return is_call_; } 264 bool ClobbersDoubleRegisters() const { return is_call_; }
266 265
267 // Interface to the register allocator and iterators. 266 // Interface to the register allocator and iterators.
268 bool IsMarkedAsCall() const { return is_call_; } 267 bool IsMarkedAsCall() const { return is_call_; }
269 268
270 virtual bool HasResult() const = 0; 269 virtual bool HasResult() const = 0;
271 virtual LOperand* result() = 0; 270 virtual LOperand* result() const = 0;
272 271
273 LOperand* FirstInput() { return InputAt(0); } 272 LOperand* FirstInput() { return InputAt(0); }
274 LOperand* Output() { return HasResult() ? result() : NULL; } 273 LOperand* Output() { return HasResult() ? result() : NULL; }
275 274
276 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } 275 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; }
277 276
278 #ifdef DEBUG 277 #ifdef DEBUG
279 void VerifyCall(); 278 void VerifyCall();
280 #endif 279 #endif
281 280
(...skipping 15 matching lines...) Expand all
297 296
298 297
299 // R = number of result operands (0 or 1). 298 // R = number of result operands (0 or 1).
300 // I = number of input operands. 299 // I = number of input operands.
301 // T = number of temporary operands. 300 // T = number of temporary operands.
302 template<int R, int I, int T> 301 template<int R, int I, int T>
303 class LTemplateInstruction: public LInstruction { 302 class LTemplateInstruction: public LInstruction {
304 public: 303 public:
305 // Allow 0 or 1 output operands. 304 // Allow 0 or 1 output operands.
306 STATIC_ASSERT(R == 0 || R == 1); 305 STATIC_ASSERT(R == 0 || R == 1);
307 virtual bool HasResult() const { return R != 0; } 306 virtual bool HasResult() const { return R != 0 && result() != NULL; }
308 void set_result(LOperand* operand) { results_[0] = operand; } 307 void set_result(LOperand* operand) { results_[0] = operand; }
309 LOperand* result() { return results_[0]; } 308 LOperand* result() const { return results_[0]; }
310 309
311 protected: 310 protected:
312 EmbeddedContainer<LOperand*, R> results_; 311 EmbeddedContainer<LOperand*, R> results_;
313 EmbeddedContainer<LOperand*, I> inputs_; 312 EmbeddedContainer<LOperand*, I> inputs_;
314 EmbeddedContainer<LOperand*, T> temps_; 313 EmbeddedContainer<LOperand*, T> temps_;
315 314
316 private: 315 private:
317 virtual int InputCount() { return I; } 316 virtual int InputCount() { return I; }
318 virtual LOperand* InputAt(int i) { return inputs_[i]; } 317 virtual LOperand* InputAt(int i) { return inputs_[i]; }
319 318
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 1224
1226 class LConstantD: public LTemplateInstruction<1, 0, 0> { 1225 class LConstantD: public LTemplateInstruction<1, 0, 0> {
1227 public: 1226 public:
1228 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1227 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1229 DECLARE_HYDROGEN_ACCESSOR(Constant) 1228 DECLARE_HYDROGEN_ACCESSOR(Constant)
1230 1229
1231 double value() const { return hydrogen()->DoubleValue(); } 1230 double value() const { return hydrogen()->DoubleValue(); }
1232 }; 1231 };
1233 1232
1234 1233
1234 class LConstantE: public LTemplateInstruction<1, 0, 0> {
1235 public:
1236 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1237 DECLARE_HYDROGEN_ACCESSOR(Constant)
1238
1239 ExternalReference value() const {
1240 return hydrogen()->ExternalReferenceValue();
1241 }
1242 };
1243
1244
1235 class LConstantT: public LTemplateInstruction<1, 0, 0> { 1245 class LConstantT: public LTemplateInstruction<1, 0, 0> {
1236 public: 1246 public:
1237 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") 1247 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
1238 DECLARE_HYDROGEN_ACCESSOR(Constant) 1248 DECLARE_HYDROGEN_ACCESSOR(Constant)
1239 1249
1240 Handle<Object> value() const { return hydrogen()->handle(); } 1250 Handle<Object> value() const { return hydrogen()->handle(); }
1241 }; 1251 };
1242 1252
1243 1253
1244 class LBranch: public LControlInstruction<1, 0> { 1254 class LBranch: public LControlInstruction<1, 0> {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 LOperand* value() { return inputs_[1]; } 1667 LOperand* value() { return inputs_[1]; }
1658 1668
1659 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1669 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1660 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1670 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1661 1671
1662 Handle<Object> name() const { return hydrogen()->name(); } 1672 Handle<Object> name() const { return hydrogen()->name(); }
1663 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1673 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1664 }; 1674 };
1665 1675
1666 1676
1667 class LLinkObjectInList: public LTemplateInstruction<0, 1, 0> {
1668 public:
1669 explicit LLinkObjectInList(LOperand* object) {
1670 inputs_[0] = object;
1671 }
1672
1673 LOperand* object() { return inputs_[0]; }
1674
1675 ExternalReference GetReference(Isolate* isolate);
1676
1677 DECLARE_CONCRETE_INSTRUCTION(LinkObjectInList, "link-object-in-list")
1678 DECLARE_HYDROGEN_ACCESSOR(LinkObjectInList)
1679
1680 virtual void PrintDataTo(StringStream* stream);
1681 };
1682
1683
1684 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1677 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1685 public: 1678 public:
1686 explicit LLoadContextSlot(LOperand* context) { 1679 explicit LLoadContextSlot(LOperand* context) {
1687 inputs_[0] = context; 1680 inputs_[0] = context;
1688 } 1681 }
1689 1682
1690 LOperand* context() { return inputs_[0]; } 1683 LOperand* context() { return inputs_[0]; }
1691 1684
1692 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1685 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1693 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1686 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2313 inputs_[0] = char_code; 2306 inputs_[0] = char_code;
2314 } 2307 }
2315 2308
2316 LOperand* char_code() { return inputs_[0]; } 2309 LOperand* char_code() { return inputs_[0]; }
2317 2310
2318 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2311 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2319 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2312 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2320 }; 2313 };
2321 2314
2322 2315
2323 class LStringLength: public LTemplateInstruction<1, 1, 0> {
2324 public:
2325 explicit LStringLength(LOperand* string) {
2326 inputs_[0] = string;
2327 }
2328
2329 LOperand* string() { return inputs_[0]; }
2330
2331 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
2332 DECLARE_HYDROGEN_ACCESSOR(StringLength)
2333 };
2334
2335
2336 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { 2316 class LCheckFunction: public LTemplateInstruction<0, 1, 0> {
2337 public: 2317 public:
2338 explicit LCheckFunction(LOperand* value) { 2318 explicit LCheckFunction(LOperand* value) {
2339 inputs_[0] = value; 2319 inputs_[0] = value;
2340 } 2320 }
2341 2321
2342 LOperand* value() { return inputs_[0]; } 2322 LOperand* value() { return inputs_[0]; }
2343 2323
2344 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 2324 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
2345 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) 2325 DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 LPlatformChunk* chunk() const { return chunk_; } 2663 LPlatformChunk* chunk() const { return chunk_; }
2684 CompilationInfo* info() const { return info_; } 2664 CompilationInfo* info() const { return info_; }
2685 HGraph* graph() const { return graph_; } 2665 HGraph* graph() const { return graph_; }
2686 Zone* zone() const { return zone_; } 2666 Zone* zone() const { return zone_; }
2687 2667
2688 bool is_unused() const { return status_ == UNUSED; } 2668 bool is_unused() const { return status_ == UNUSED; }
2689 bool is_building() const { return status_ == BUILDING; } 2669 bool is_building() const { return status_ == BUILDING; }
2690 bool is_done() const { return status_ == DONE; } 2670 bool is_done() const { return status_ == DONE; }
2691 bool is_aborted() const { return status_ == ABORTED; } 2671 bool is_aborted() const { return status_ == ABORTED; }
2692 2672
2693 void Abort(const char* reason); 2673 void Abort(BailoutReason reason);
2694 2674
2695 // Methods for getting operands for Use / Define / Temp. 2675 // Methods for getting operands for Use / Define / Temp.
2696 LUnallocated* ToUnallocated(Register reg); 2676 LUnallocated* ToUnallocated(Register reg);
2697 LUnallocated* ToUnallocated(DoubleRegister reg); 2677 LUnallocated* ToUnallocated(DoubleRegister reg);
2698 2678
2699 // Methods for setting up define-use relationships. 2679 // Methods for setting up define-use relationships.
2700 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2680 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2701 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2681 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2702 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2682 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2703 DoubleRegister fixed_register); 2683 DoubleRegister fixed_register);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2799 2779
2800 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2780 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2801 }; 2781 };
2802 2782
2803 #undef DECLARE_HYDROGEN_ACCESSOR 2783 #undef DECLARE_HYDROGEN_ACCESSOR
2804 #undef DECLARE_CONCRETE_INSTRUCTION 2784 #undef DECLARE_CONCRETE_INSTRUCTION
2805 2785
2806 } } // namespace v8::internal 2786 } } // namespace v8::internal
2807 2787
2808 #endif // V8_ARM_LITHIUM_ARM_H_ 2788 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698