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

Side by Side Diff: src/mips/lithium-mips.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/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 V(StoreGlobalCell) \ 167 V(StoreGlobalCell) \
168 V(StoreGlobalGeneric) \ 168 V(StoreGlobalGeneric) \
169 V(StoreKeyed) \ 169 V(StoreKeyed) \
170 V(StoreKeyedGeneric) \ 170 V(StoreKeyedGeneric) \
171 V(StoreNamedField) \ 171 V(StoreNamedField) \
172 V(StoreNamedGeneric) \ 172 V(StoreNamedGeneric) \
173 V(StringAdd) \ 173 V(StringAdd) \
174 V(StringCharCodeAt) \ 174 V(StringCharCodeAt) \
175 V(StringCharFromCode) \ 175 V(StringCharFromCode) \
176 V(StringCompareAndBranch) \ 176 V(StringCompareAndBranch) \
177 V(StringLength) \
178 V(SubI) \ 177 V(SubI) \
179 V(TaggedToI) \ 178 V(TaggedToI) \
180 V(ThisFunction) \ 179 V(ThisFunction) \
181 V(Throw) \ 180 V(Throw) \
182 V(ToFastProperties) \ 181 V(ToFastProperties) \
183 V(TransitionElementsKind) \ 182 V(TransitionElementsKind) \
184 V(TrapAllocationMemento) \ 183 V(TrapAllocationMemento) \
185 V(Typeof) \ 184 V(Typeof) \
186 V(TypeofIsAndBranch) \ 185 V(TypeofIsAndBranch) \
187 V(Uint32ToDouble) \ 186 V(Uint32ToDouble) \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 257
259 // Interface to the register allocator and iterators. 258 // Interface to the register allocator and iterators.
260 bool ClobbersTemps() const { return is_call_; } 259 bool ClobbersTemps() const { return is_call_; }
261 bool ClobbersRegisters() const { return is_call_; } 260 bool ClobbersRegisters() const { return is_call_; }
262 bool ClobbersDoubleRegisters() const { return is_call_; } 261 bool ClobbersDoubleRegisters() const { return is_call_; }
263 262
264 // Interface to the register allocator and iterators. 263 // Interface to the register allocator and iterators.
265 bool IsMarkedAsCall() const { return is_call_; } 264 bool IsMarkedAsCall() const { return is_call_; }
266 265
267 virtual bool HasResult() const = 0; 266 virtual bool HasResult() const = 0;
268 virtual LOperand* result() = 0; 267 virtual LOperand* result() const = 0;
269 268
270 LOperand* FirstInput() { return InputAt(0); } 269 LOperand* FirstInput() { return InputAt(0); }
271 LOperand* Output() { return HasResult() ? result() : NULL; } 270 LOperand* Output() { return HasResult() ? result() : NULL; }
272 271
273 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; } 272 virtual bool HasInterestingComment(LCodeGen* gen) const { return true; }
274 273
275 #ifdef DEBUG 274 #ifdef DEBUG
276 void VerifyCall(); 275 void VerifyCall();
277 #endif 276 #endif
278 277
(...skipping 15 matching lines...) Expand all
294 293
295 294
296 // R = number of result operands (0 or 1). 295 // R = number of result operands (0 or 1).
297 // I = number of input operands. 296 // I = number of input operands.
298 // T = number of temporary operands. 297 // T = number of temporary operands.
299 template<int R, int I, int T> 298 template<int R, int I, int T>
300 class LTemplateInstruction: public LInstruction { 299 class LTemplateInstruction: public LInstruction {
301 public: 300 public:
302 // Allow 0 or 1 output operands. 301 // Allow 0 or 1 output operands.
303 STATIC_ASSERT(R == 0 || R == 1); 302 STATIC_ASSERT(R == 0 || R == 1);
304 virtual bool HasResult() const { return R != 0; } 303 virtual bool HasResult() const { return R != 0 && result() != NULL; }
305 void set_result(LOperand* operand) { results_[0] = operand; } 304 void set_result(LOperand* operand) { results_[0] = operand; }
306 LOperand* result() { return results_[0]; } 305 LOperand* result() const { return results_[0]; }
307 306
308 protected: 307 protected:
309 EmbeddedContainer<LOperand*, R> results_; 308 EmbeddedContainer<LOperand*, R> results_;
310 EmbeddedContainer<LOperand*, I> inputs_; 309 EmbeddedContainer<LOperand*, I> inputs_;
311 EmbeddedContainer<LOperand*, T> temps_; 310 EmbeddedContainer<LOperand*, T> temps_;
312 311
313 private: 312 private:
314 virtual int InputCount() { return I; } 313 virtual int InputCount() { return I; }
315 virtual LOperand* InputAt(int i) { return inputs_[i]; } 314 virtual LOperand* InputAt(int i) { return inputs_[i]; }
316 315
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 1202
1204 class LConstantD: public LTemplateInstruction<1, 0, 0> { 1203 class LConstantD: public LTemplateInstruction<1, 0, 0> {
1205 public: 1204 public:
1206 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d") 1205 DECLARE_CONCRETE_INSTRUCTION(ConstantD, "constant-d")
1207 DECLARE_HYDROGEN_ACCESSOR(Constant) 1206 DECLARE_HYDROGEN_ACCESSOR(Constant)
1208 1207
1209 double value() const { return hydrogen()->DoubleValue(); } 1208 double value() const { return hydrogen()->DoubleValue(); }
1210 }; 1209 };
1211 1210
1212 1211
1212 class LConstantE: public LTemplateInstruction<1, 0, 0> {
1213 public:
1214 DECLARE_CONCRETE_INSTRUCTION(ConstantE, "constant-e")
1215 DECLARE_HYDROGEN_ACCESSOR(Constant)
1216
1217 ExternalReference value() const {
1218 return hydrogen()->ExternalReferenceValue();
1219 }
1220 };
1221
1222
1213 class LConstantT: public LTemplateInstruction<1, 0, 0> { 1223 class LConstantT: public LTemplateInstruction<1, 0, 0> {
1214 public: 1224 public:
1215 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t") 1225 DECLARE_CONCRETE_INSTRUCTION(ConstantT, "constant-t")
1216 DECLARE_HYDROGEN_ACCESSOR(Constant) 1226 DECLARE_HYDROGEN_ACCESSOR(Constant)
1217 1227
1218 Handle<Object> value() const { return hydrogen()->handle(); } 1228 Handle<Object> value() const { return hydrogen()->handle(); }
1219 }; 1229 };
1220 1230
1221 1231
1222 class LBranch: public LControlInstruction<1, 0> { 1232 class LBranch: public LControlInstruction<1, 0> {
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 LOperand* value() { return inputs_[1]; } 1645 LOperand* value() { return inputs_[1]; }
1636 1646
1637 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic") 1647 DECLARE_CONCRETE_INSTRUCTION(StoreGlobalGeneric, "store-global-generic")
1638 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric) 1648 DECLARE_HYDROGEN_ACCESSOR(StoreGlobalGeneric)
1639 1649
1640 Handle<Object> name() const { return hydrogen()->name(); } 1650 Handle<Object> name() const { return hydrogen()->name(); }
1641 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); } 1651 StrictModeFlag strict_mode_flag() { return hydrogen()->strict_mode_flag(); }
1642 }; 1652 };
1643 1653
1644 1654
1645 class LLinkObjectInList: public LTemplateInstruction<0, 1, 0> {
1646 public:
1647 explicit LLinkObjectInList(LOperand* object) {
1648 inputs_[0] = object;
1649 }
1650
1651 LOperand* object() { return inputs_[0]; }
1652
1653 ExternalReference GetReference(Isolate* isolate);
1654
1655 DECLARE_CONCRETE_INSTRUCTION(LinkObjectInList, "link-object-in-list")
1656 DECLARE_HYDROGEN_ACCESSOR(LinkObjectInList)
1657
1658 virtual void PrintDataTo(StringStream* stream);
1659 };
1660
1661
1662 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> { 1655 class LLoadContextSlot: public LTemplateInstruction<1, 1, 0> {
1663 public: 1656 public:
1664 explicit LLoadContextSlot(LOperand* context) { 1657 explicit LLoadContextSlot(LOperand* context) {
1665 inputs_[0] = context; 1658 inputs_[0] = context;
1666 } 1659 }
1667 1660
1668 LOperand* context() { return inputs_[0]; } 1661 LOperand* context() { return inputs_[0]; }
1669 1662
1670 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot") 1663 DECLARE_CONCRETE_INSTRUCTION(LoadContextSlot, "load-context-slot")
1671 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot) 1664 DECLARE_HYDROGEN_ACCESSOR(LoadContextSlot)
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 inputs_[0] = char_code; 2278 inputs_[0] = char_code;
2286 } 2279 }
2287 2280
2288 LOperand* char_code() { return inputs_[0]; } 2281 LOperand* char_code() { return inputs_[0]; }
2289 2282
2290 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code") 2283 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode, "string-char-from-code")
2291 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode) 2284 DECLARE_HYDROGEN_ACCESSOR(StringCharFromCode)
2292 }; 2285 };
2293 2286
2294 2287
2295 class LStringLength: public LTemplateInstruction<1, 1, 0> {
2296 public:
2297 explicit LStringLength(LOperand* string) {
2298 inputs_[0] = string;
2299 }
2300
2301 LOperand* string() { return inputs_[0]; }
2302
2303 DECLARE_CONCRETE_INSTRUCTION(StringLength, "string-length")
2304 DECLARE_HYDROGEN_ACCESSOR(StringLength)
2305 };
2306
2307
2308 class LCheckFunction: public LTemplateInstruction<0, 1, 0> { 2288 class LCheckFunction: public LTemplateInstruction<0, 1, 0> {
2309 public: 2289 public:
2310 explicit LCheckFunction(LOperand* value) { 2290 explicit LCheckFunction(LOperand* value) {
2311 inputs_[0] = value; 2291 inputs_[0] = value;
2312 } 2292 }
2313 2293
2314 LOperand* value() { return inputs_[0]; } 2294 LOperand* value() { return inputs_[0]; }
2315 2295
2316 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function") 2296 DECLARE_CONCRETE_INSTRUCTION(CheckFunction, "check-function")
2317 DECLARE_HYDROGEN_ACCESSOR(CheckFunction) 2297 DECLARE_HYDROGEN_ACCESSOR(CheckFunction)
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
2655 LPlatformChunk* chunk() const { return chunk_; } 2635 LPlatformChunk* chunk() const { return chunk_; }
2656 CompilationInfo* info() const { return info_; } 2636 CompilationInfo* info() const { return info_; }
2657 HGraph* graph() const { return graph_; } 2637 HGraph* graph() const { return graph_; }
2658 Zone* zone() const { return zone_; } 2638 Zone* zone() const { return zone_; }
2659 2639
2660 bool is_unused() const { return status_ == UNUSED; } 2640 bool is_unused() const { return status_ == UNUSED; }
2661 bool is_building() const { return status_ == BUILDING; } 2641 bool is_building() const { return status_ == BUILDING; }
2662 bool is_done() const { return status_ == DONE; } 2642 bool is_done() const { return status_ == DONE; }
2663 bool is_aborted() const { return status_ == ABORTED; } 2643 bool is_aborted() const { return status_ == ABORTED; }
2664 2644
2665 void Abort(const char* reason); 2645 void Abort(BailoutReason reason);
2666 2646
2667 // Methods for getting operands for Use / Define / Temp. 2647 // Methods for getting operands for Use / Define / Temp.
2668 LUnallocated* ToUnallocated(Register reg); 2648 LUnallocated* ToUnallocated(Register reg);
2669 LUnallocated* ToUnallocated(DoubleRegister reg); 2649 LUnallocated* ToUnallocated(DoubleRegister reg);
2670 2650
2671 // Methods for setting up define-use relationships. 2651 // Methods for setting up define-use relationships.
2672 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand); 2652 MUST_USE_RESULT LOperand* Use(HValue* value, LUnallocated* operand);
2673 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register); 2653 MUST_USE_RESULT LOperand* UseFixed(HValue* value, Register fixed_register);
2674 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value, 2654 MUST_USE_RESULT LOperand* UseFixedDouble(HValue* value,
2675 DoubleRegister fixed_register); 2655 DoubleRegister fixed_register);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 2752
2773 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2753 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2774 }; 2754 };
2775 2755
2776 #undef DECLARE_HYDROGEN_ACCESSOR 2756 #undef DECLARE_HYDROGEN_ACCESSOR
2777 #undef DECLARE_CONCRETE_INSTRUCTION 2757 #undef DECLARE_CONCRETE_INSTRUCTION
2778 2758
2779 } } // namespace v8::internal 2759 } } // namespace v8::internal
2780 2760
2781 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2761 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698