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

Side by Side Diff: src/a64/lithium-a64.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/a64/ic-a64.cc ('k') | src/a64/lithium-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 V(CheckSmi) \ 74 V(CheckSmi) \
75 V(ClampDToUint8) \ 75 V(ClampDToUint8) \
76 V(ClampIToUint8) \ 76 V(ClampIToUint8) \
77 V(ClampTToUint8) \ 77 V(ClampTToUint8) \
78 V(ClassOfTestAndBranch) \ 78 V(ClassOfTestAndBranch) \
79 V(CmpMapAndBranch) \ 79 V(CmpMapAndBranch) \
80 V(CmpObjectEqAndBranch) \ 80 V(CmpObjectEqAndBranch) \
81 V(CmpT) \ 81 V(CmpT) \
82 V(CompareNumericAndBranch) \ 82 V(CompareNumericAndBranch) \
83 V(ConstantD) \ 83 V(ConstantD) \
84 V(ConstantE) \
84 V(ConstantI) \ 85 V(ConstantI) \
85 V(ConstantS) \ 86 V(ConstantS) \
86 V(ConstantT) \ 87 V(ConstantT) \
87 V(Context) \ 88 V(Context) \
88 V(DateField) \ 89 V(DateField) \
89 V(DebugBreak) \ 90 V(DebugBreak) \
90 V(DeclareGlobals) \ 91 V(DeclareGlobals) \
91 V(Deoptimize) \ 92 V(Deoptimize) \
92 V(DivI) \ 93 V(DivI) \
93 V(DoubleToIntOrSmi) \ 94 V(DoubleToIntOrSmi) \
(...skipping 18 matching lines...) Expand all
112 V(Integer32ToSmi) \ 113 V(Integer32ToSmi) \
113 V(InvokeFunction) \ 114 V(InvokeFunction) \
114 V(IsConstructCallAndBranch) \ 115 V(IsConstructCallAndBranch) \
115 V(IsNumberAndBranch) \ 116 V(IsNumberAndBranch) \
116 V(IsObjectAndBranch) \ 117 V(IsObjectAndBranch) \
117 V(IsSmiAndBranch) \ 118 V(IsSmiAndBranch) \
118 V(IsStringAndBranch) \ 119 V(IsStringAndBranch) \
119 V(IsUndetectableAndBranch) \ 120 V(IsUndetectableAndBranch) \
120 V(Label) \ 121 V(Label) \
121 V(LazyBailout) \ 122 V(LazyBailout) \
122 V(LinkObjectInList) \
123 V(LoadContextSlot) \ 123 V(LoadContextSlot) \
124 V(LoadExternalArrayPointer) \ 124 V(LoadExternalArrayPointer) \
125 V(LoadFieldByIndex) \ 125 V(LoadFieldByIndex) \
126 V(LoadFunctionPrototype) \ 126 V(LoadFunctionPrototype) \
127 V(LoadGlobalCell) \ 127 V(LoadGlobalCell) \
128 V(LoadGlobalGeneric) \ 128 V(LoadGlobalGeneric) \
129 V(LoadKeyedExternal) \ 129 V(LoadKeyedExternal) \
130 V(LoadKeyedFixed) \ 130 V(LoadKeyedFixed) \
131 V(LoadKeyedFixedDouble) \ 131 V(LoadKeyedFixedDouble) \
132 V(LoadKeyedGeneric) \ 132 V(LoadKeyedGeneric) \
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 V(StoreKeyedExternal) \ 173 V(StoreKeyedExternal) \
174 V(StoreKeyedFixed) \ 174 V(StoreKeyedFixed) \
175 V(StoreKeyedFixedDouble) \ 175 V(StoreKeyedFixedDouble) \
176 V(StoreKeyedGeneric) \ 176 V(StoreKeyedGeneric) \
177 V(StoreNamedField) \ 177 V(StoreNamedField) \
178 V(StoreNamedGeneric) \ 178 V(StoreNamedGeneric) \
179 V(StringAdd) \ 179 V(StringAdd) \
180 V(StringCharCodeAt) \ 180 V(StringCharCodeAt) \
181 V(StringCharFromCode) \ 181 V(StringCharFromCode) \
182 V(StringCompareAndBranch) \ 182 V(StringCompareAndBranch) \
183 V(StringLength) \
184 V(SubI) \ 183 V(SubI) \
185 V(TaggedToI) \ 184 V(TaggedToI) \
186 V(ThisFunction) \ 185 V(ThisFunction) \
187 V(Throw) \ 186 V(Throw) \
188 V(ToFastProperties) \ 187 V(ToFastProperties) \
189 V(TransitionElementsKind) \ 188 V(TransitionElementsKind) \
190 V(TrapAllocationMemento) \ 189 V(TrapAllocationMemento) \
191 V(TruncateDoubleToIntOrSmi) \ 190 V(TruncateDoubleToIntOrSmi) \
192 V(Typeof) \ 191 V(Typeof) \
193 V(TypeofIsAndBranch) \ 192 V(TypeofIsAndBranch) \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 263
265 void MarkAsCall() { is_call_ = true; } 264 void MarkAsCall() { is_call_ = true; }
266 265
267 // Interface to the register allocator and iterators. 266 // Interface to the register allocator and iterators.
268 bool ClobbersTemps() const { return is_call_; } 267 bool ClobbersTemps() const { return is_call_; }
269 bool ClobbersRegisters() const { return is_call_; } 268 bool ClobbersRegisters() const { return is_call_; }
270 bool ClobbersDoubleRegisters() const { return is_call_; } 269 bool ClobbersDoubleRegisters() const { return is_call_; }
271 bool IsMarkedAsCall() const { return is_call_; } 270 bool IsMarkedAsCall() const { return is_call_; }
272 271
273 virtual bool HasResult() const = 0; 272 virtual bool HasResult() const = 0;
274 virtual LOperand* result() = 0; 273 virtual LOperand* result() const = 0;
275 274
276 virtual int InputCount() = 0; 275 virtual int InputCount() = 0;
277 virtual LOperand* InputAt(int i) = 0; 276 virtual LOperand* InputAt(int i) = 0;
278 virtual int TempCount() = 0; 277 virtual int TempCount() = 0;
279 virtual LOperand* TempAt(int i) = 0; 278 virtual LOperand* TempAt(int i) = 0;
280 279
281 LOperand* FirstInput() { return InputAt(0); } 280 LOperand* FirstInput() { return InputAt(0); }
282 LOperand* Output() { return HasResult() ? result() : NULL; } 281 LOperand* Output() { return HasResult() ? result() : NULL; }
283 282
284 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } 283 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; }
(...skipping 11 matching lines...) Expand all
296 295
297 296
298 // R = number of result operands (0 or 1). 297 // R = number of result operands (0 or 1).
299 // I = number of input operands. 298 // I = number of input operands.
300 // T = number of temporary operands. 299 // T = number of temporary operands.
301 template<int R, int I, int T> 300 template<int R, int I, int T>
302 class LTemplateInstruction: public LInstruction { 301 class LTemplateInstruction: public LInstruction {
303 public: 302 public:
304 // Allow 0 or 1 output operands. 303 // Allow 0 or 1 output operands.
305 STATIC_ASSERT(R == 0 || R == 1); 304 STATIC_ASSERT(R == 0 || R == 1);
306 virtual bool HasResult() const { return R != 0; } 305 virtual bool HasResult() const { return (R != 0) && (result() != NULL); }
307 void set_result(LOperand* operand) { results_[0] = operand; } 306 void set_result(LOperand* operand) { results_[0] = operand; }
308 LOperand* result() { return results_[0]; } 307 LOperand* result() const { return results_[0]; }
309 308
310 int InputCount() { return I; } 309 int InputCount() { return I; }
311 LOperand* InputAt(int i) { return inputs_[i]; } 310 LOperand* InputAt(int i) { return inputs_[i]; }
312 311
313 int TempCount() { return T; } 312 int TempCount() { return T; }
314 LOperand* TempAt(int i) { return temps_[i]; } 313 LOperand* TempAt(int i) { return temps_[i]; }
315 314
316 protected: 315 protected:
317 EmbeddedContainer<LOperand*, R> results_; 316 EmbeddedContainer<LOperand*, R> results_;
318 EmbeddedContainer<LOperand*, I> inputs_; 317 EmbeddedContainer<LOperand*, I> inputs_;
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1142
1144 class LConstantD: public LTemplateInstruction<1, 0, 0> { 1143 class LConstantD: public LTemplateInstruction<1, 0, 0> {
1145 public: 1144 public:
1146 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1145 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1147 DECLARE_HYDROGEN_ACCESSOR(Constant) 1146 DECLARE_HYDROGEN_ACCESSOR(Constant)
1148 1147
1149 double value() const { return hydrogen()->DoubleValue(); } 1148 double value() const { return hydrogen()->DoubleValue(); }
1150 }; 1149 };
1151 1150
1152 1151
1152 class LConstantE: public LTemplateInstruction<1, 0, 0> {
1153 public:
1154 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1155 DECLARE_HYDROGEN_ACCESSOR(Constant)
1156
1157 ExternalReference value() const {
1158 return hydrogen()->ExternalReferenceValue();
1159 }
1160 };
1161
1162
1153 class LConstantI: public LTemplateInstruction<1, 0, 0> { 1163 class LConstantI: public LTemplateInstruction<1, 0, 0> {
1154 public: 1164 public:
1155 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 1165 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
1156 DECLARE_HYDROGEN_ACCESSOR(Constant) 1166 DECLARE_HYDROGEN_ACCESSOR(Constant)
1157 1167
1158 int32_t value() const { return hydrogen()->Integer32Value(); } 1168 int32_t value() const { return hydrogen()->Integer32Value(); }
1159 }; 1169 };
1160 1170
1161 1171
1162 class LConstantS: public LTemplateInstruction<1, 0, 0> { 1172 class LConstantS: public LTemplateInstruction<1, 0, 0> {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 LOperand* temp() { return temps_[0]; } 1564 LOperand* temp() { return temps_[0]; }
1555 1565
1556 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch, 1566 DECLARE_CONCRETE_INSTRUCTION(IsUndetectableAndBranch,
1557 "is-undetectable-and-branch") 1567 "is-undetectable-and-branch")
1558 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch) 1568 DECLARE_HYDROGEN_ACCESSOR(IsUndetectableAndBranch)
1559 1569
1560 virtual void PrintDataTo(StringStream* stream); 1570 virtual void PrintDataTo(StringStream* stream);
1561 }; 1571 };
1562 1572
1563 1573
1564 class LLinkObjectInList: public LTemplateInstruction<0, 1, 1> {
1565 public:
1566 explicit LLinkObjectInList(LOperand* object, LOperand* temp) {
1567 inputs_[0] = object;
1568 temps_[0] = temp;
1569 }
1570
1571 LOperand* object() { return inputs_[0]; }
1572 LOperand* temp() { return temps_[0]; }
1573
1574 ExternalReference GetReference(Isolate* isolate);
1575
1576 DECLARE_CONCRETE_INSTRUCTION(LinkObjectInList, "link-object-in-list")
1577 DECLARE_HYDROGEN_ACCESSOR(LinkObjectInList)
1578
1579 virtual void PrintDataTo(StringStream* stream);
1580 };
1581
1582
1583 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1574 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1584 public: 1575 public:
1585 explicit LLoadContextSlot(LOperand* context) { 1576 explicit LLoadContextSlot(LOperand* context) {
1586 inputs_[0] = context; 1577 inputs_[0] = context;
1587 } 1578 }
1588 1579
1589 LOperand* context() { return inputs_[0]; } 1580 LOperand* context() { return inputs_[0]; }
1590 1581
1591 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1582 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1592 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1583 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
2424 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch, 2415 DECLARE_CONCRETE_INSTRUCTION(StringCompareAndBranch,
2425 "string-compare-and-branch") 2416 "string-compare-and-branch")
2426 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch) 2417 DECLARE_HYDROGEN_ACCESSOR(StringCompareAndBranch)
2427 2418
2428 Token::Value op() const { return hydrogen()->token(); } 2419 Token::Value op() const { return hydrogen()->token(); }
2429 2420
2430 virtual void PrintDataTo(StringStream* stream); 2421 virtual void PrintDataTo(StringStream* stream);
2431 }; 2422 };
2432 2423
2433 2424
2434 class LStringLength: public LTemplateInstruction<1, 1, 0> {
2435 public:
2436 explicit LStringLength(LOperand* string) {
2437 inputs_[0] = string;
2438 }
2439
2440 LOperand* string() { return inputs_[0]; }
2441
2442 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
2443 DECLARE_HYDROGEN_ACCESSOR(StringLength)
2444 };
2445
2446
2447 // Truncating conversion from a tagged value to an int32. 2425 // Truncating conversion from a tagged value to an int32.
2448 class LTaggedToI: public LTemplateInstruction<1, 1, 2> { 2426 class LTaggedToI: public LTemplateInstruction<1, 1, 2> {
2449 public: 2427 public:
2450 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) { 2428 explicit LTaggedToI(LOperand* value, LOperand* temp1, LOperand* temp2) {
2451 inputs_[0] = value; 2429 inputs_[0] = value;
2452 temps_[0] = temp1; 2430 temps_[0] = temp1;
2453 temps_[1] = temp2; 2431 temps_[1] = temp2;
2454 } 2432 }
2455 2433
2456 LOperand* value() { return inputs_[0]; } 2434 LOperand* value() { return inputs_[0]; }
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 bool is_unused() const { return status_ == UNUSED; } 2787 bool is_unused() const { return status_ == UNUSED; }
2810 bool is_building() const { return status_ == BUILDING; } 2788 bool is_building() const { return status_ == BUILDING; }
2811 bool is_done() const { return status_ == DONE; } 2789 bool is_done() const { return status_ == DONE; }
2812 bool is_aborted() const { return status_ == ABORTED; } 2790 bool is_aborted() const { return status_ == ABORTED; }
2813 2791
2814 Zone* zone() const { return zone_; } 2792 Zone* zone() const { return zone_; }
2815 int argument_count() const { return argument_count_; } 2793 int argument_count() const { return argument_count_; }
2816 CompilationInfo* info() const { return info_; } 2794 CompilationInfo* info() const { return info_; }
2817 Heap* heap() const { return isolate()->heap(); } 2795 Heap* heap() const { return isolate()->heap(); }
2818 2796
2819 void Abort(const char* reason); 2797 void Abort(BailoutReason reason);
2820 2798
2821 // Methods for getting operands for Use / Define / Temp. 2799 // Methods for getting operands for Use / Define / Temp.
2822 LUnallocated* ToUnallocated(Register reg); 2800 LUnallocated* ToUnallocated(Register reg);
2823 LUnallocated* ToUnallocated(DoubleRegister reg); 2801 LUnallocated* ToUnallocated(DoubleRegister reg);
2824 2802
2825 // Methods for setting up define-use relationships. 2803 // Methods for setting up define-use relationships.
2826 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2804 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2827 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2805 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2828 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2806 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2829 DoubleRegister fixed_register); 2807 DoubleRegister fixed_register);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
2927 2905
2928 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2906 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2929 }; 2907 };
2930 2908
2931 #undef DECLARE_HYDROGEN_ACCESSOR 2909 #undef DECLARE_HYDROGEN_ACCESSOR
2932 #undef DECLARE_CONCRETE_INSTRUCTION 2910 #undef DECLARE_CONCRETE_INSTRUCTION
2933 2911
2934 } } // namespace v8::internal 2912 } } // namespace v8::internal
2935 2913
2936 #endif // V8_A64_LITHIUM_A64_H_ 2914 #endif // V8_A64_LITHIUM_A64_H_
OLDNEW
« no previous file with comments | « src/a64/ic-a64.cc ('k') | src/a64/lithium-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698