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

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

Issue 131363008: A64: Synchronize with r15922. (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 22 matching lines...) Expand all
33 #include "lithium.h" 33 #include "lithium.h"
34 #include "safepoint-table.h" 34 #include "safepoint-table.h"
35 #include "utils.h" 35 #include "utils.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 // Forward declarations. 40 // Forward declarations.
41 class LCodeGen; 41 class LCodeGen;
42 42
43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
44 V(ControlInstruction) \
45 V(Call) \
46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
47
48
49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 43 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
50 V(AccessArgumentsAt) \ 44 V(AccessArgumentsAt) \
51 V(AddI) \ 45 V(AddI) \
52 V(Allocate) \ 46 V(Allocate) \
53 V(ApplyArguments) \ 47 V(ApplyArguments) \
54 V(ArgumentsElements) \ 48 V(ArgumentsElements) \
55 V(ArgumentsLength) \ 49 V(ArgumentsLength) \
56 V(ArithmeticD) \ 50 V(ArithmeticD) \
57 V(ArithmeticT) \ 51 V(ArithmeticT) \
58 V(BitI) \ 52 V(BitI) \
59 V(BitNotI) \ 53 V(BitNotI) \
60 V(BoundsCheck) \ 54 V(BoundsCheck) \
61 V(Branch) \ 55 V(Branch) \
62 V(CallConstantFunction) \ 56 V(CallConstantFunction) \
63 V(CallFunction) \ 57 V(CallFunction) \
64 V(CallGlobal) \ 58 V(CallGlobal) \
65 V(CallKeyed) \ 59 V(CallKeyed) \
66 V(CallKnownGlobal) \ 60 V(CallKnownGlobal) \
67 V(CallNamed) \ 61 V(CallNamed) \
68 V(CallNew) \ 62 V(CallNew) \
69 V(CallNewArray) \ 63 V(CallNewArray) \
70 V(CallRuntime) \ 64 V(CallRuntime) \
71 V(CallStub) \ 65 V(CallStub) \
72 V(CheckFunction) \ 66 V(CheckFunction) \
73 V(CheckInstanceType) \ 67 V(CheckInstanceType) \
74 V(CheckMaps) \ 68 V(CheckMaps) \
69 V(CheckMapValue) \
75 V(CheckNonSmi) \ 70 V(CheckNonSmi) \
76 V(CheckPrototypeMaps) \ 71 V(CheckPrototypeMaps) \
77 V(CheckSmi) \ 72 V(CheckSmi) \
78 V(ClampDToUint8) \ 73 V(ClampDToUint8) \
79 V(ClampIToUint8) \ 74 V(ClampIToUint8) \
80 V(ClampTToUint8) \ 75 V(ClampTToUint8) \
81 V(ClassOfTestAndBranch) \ 76 V(ClassOfTestAndBranch) \
82 V(CmpConstantEqAndBranch) \
83 V(CompareNumericAndBranch) \ 77 V(CompareNumericAndBranch) \
84 V(CmpObjectEqAndBranch) \ 78 V(CmpObjectEqAndBranch) \
85 V(CmpMapAndBranch) \ 79 V(CmpMapAndBranch) \
86 V(CmpT) \ 80 V(CmpT) \
87 V(ConstantD) \ 81 V(ConstantD) \
88 V(ConstantI) \ 82 V(ConstantI) \
89 V(ConstantS) \ 83 V(ConstantS) \
90 V(ConstantT) \ 84 V(ConstantT) \
91 V(Context) \ 85 V(Context) \
86 V(DateField) \
92 V(DebugBreak) \ 87 V(DebugBreak) \
93 V(DeclareGlobals) \ 88 V(DeclareGlobals) \
94 V(Deoptimize) \ 89 V(Deoptimize) \
95 V(DivI) \ 90 V(DivI) \
96 V(DoubleToI) \ 91 V(DoubleToI) \
97 V(DoubleToSmi) \ 92 V(DoubleToSmi) \
93 V(Drop) \
98 V(DummyUse) \ 94 V(DummyUse) \
99 V(ElementsKind) \ 95 V(ElementsKind) \
100 V(MapEnumLength) \ 96 V(ForInCacheArray) \
97 V(ForInPrepareMap) \
101 V(FunctionLiteral) \ 98 V(FunctionLiteral) \
102 V(GetCachedArrayIndex) \ 99 V(GetCachedArrayIndex) \
103 V(GlobalObject) \ 100 V(GlobalObject) \
104 V(GlobalReceiver) \ 101 V(GlobalReceiver) \
105 V(Goto) \ 102 V(Goto) \
106 V(HasCachedArrayIndexAndBranch) \ 103 V(HasCachedArrayIndexAndBranch) \
107 V(HasInstanceTypeAndBranch) \ 104 V(HasInstanceTypeAndBranch) \
105 V(InnerAllocatedObject) \
108 V(InstanceOf) \ 106 V(InstanceOf) \
109 V(InstanceOfKnownGlobal) \ 107 V(InstanceOfKnownGlobal) \
110 V(InstanceSize) \ 108 V(InstanceSize) \
111 V(InstructionGap) \ 109 V(InstructionGap) \
112 V(Integer32ToDouble) \ 110 V(Integer32ToDouble) \
113 V(Integer32ToSmi) \ 111 V(Integer32ToSmi) \
114 V(Uint32ToDouble) \
115 V(InvokeFunction) \ 112 V(InvokeFunction) \
116 V(IsConstructCallAndBranch) \ 113 V(IsConstructCallAndBranch) \
117 V(IsObjectAndBranch) \ 114 V(IsObjectAndBranch) \
118 V(IsStringAndBranch) \ 115 V(IsStringAndBranch) \
119 V(IsSmiAndBranch) \ 116 V(IsSmiAndBranch) \
120 V(IsNumberAndBranch) \ 117 V(IsNumberAndBranch) \
121 V(IsUndetectableAndBranch) \ 118 V(IsUndetectableAndBranch) \
122 V(Label) \ 119 V(Label) \
123 V(LazyBailout) \ 120 V(LazyBailout) \
124 V(LinkObjectInList) \ 121 V(LinkObjectInList) \
125 V(LoadContextSlot) \ 122 V(LoadContextSlot) \
126 V(LoadExternalArrayPointer) \ 123 V(LoadExternalArrayPointer) \
124 V(LoadFieldByIndex) \
127 V(LoadFunctionPrototype) \ 125 V(LoadFunctionPrototype) \
128 V(LoadGlobalCell) \ 126 V(LoadGlobalCell) \
129 V(LoadGlobalGeneric) \ 127 V(LoadGlobalGeneric) \
130 V(LoadKeyed) \ 128 V(LoadKeyed) \
131 V(LoadKeyedGeneric) \ 129 V(LoadKeyedGeneric) \
132 V(LoadNamedField) \ 130 V(LoadNamedField) \
133 V(LoadNamedFieldPolymorphic) \ 131 V(LoadNamedFieldPolymorphic) \
134 V(LoadNamedGeneric) \ 132 V(LoadNamedGeneric) \
133 V(MapEnumLength) \
135 V(MathAbs) \ 134 V(MathAbs) \
136 V(MathCos) \ 135 V(MathCos) \
137 V(MathExp) \ 136 V(MathExp) \
138 V(MathFloor) \ 137 V(MathFloor) \
139 V(MathFloorOfDiv) \ 138 V(MathFloorOfDiv) \
140 V(MathLog) \ 139 V(MathLog) \
141 V(MathMinMax) \ 140 V(MathMinMax) \
142 V(MathPowHalf) \ 141 V(MathPowHalf) \
143 V(MathRound) \ 142 V(MathRound) \
144 V(MathSin) \ 143 V(MathSin) \
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 V(StringLength) \ 176 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) \
186 V(Uint32ToDouble) \
187 V(UnknownOSRValue) \ 187 V(UnknownOSRValue) \
188 V(ValueOf) \ 188 V(ValueOf) \
189 V(ForInPrepareMap) \ 189 V(WrapReceiver)
190 V(ForInCacheArray) \
191 V(CheckMapValue) \
192 V(LoadFieldByIndex) \
193 V(DateField) \
194 V(WrapReceiver) \
195 V(Drop) \
196 V(InnerAllocatedObject)
197 190
198 191
199 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \ 192 #define DECLARE_CONCRETE_INSTRUCTION(type, mnemonic) \
200 virtual Opcode opcode() const { return LInstruction::k##type; } \ 193 virtual Opcode opcode() const { return LInstruction::k##type; } \
201 virtual void CompileToNative(LCodeGen* generator); \ 194 virtual void CompileToNative(LCodeGen* generator); \
202 virtual const char* Mnemonic() const { return mnemonic; } \ 195 virtual const char* Mnemonic() const { return mnemonic; } \
203 static L##type* cast(LInstruction* instr) { \ 196 static L##type* cast(LInstruction* instr) { \
204 ASSERT(instr->Is##type()); \ 197 ASSERT(instr->Is##type()); \
205 return reinterpret_cast<L##type*>(instr); \ 198 return reinterpret_cast<L##type*>(instr); \
206 } 199 }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 explicit LDummyUse(LOperand* value) { 419 explicit LDummyUse(LOperand* value) {
427 inputs_[0] = value; 420 inputs_[0] = value;
428 } 421 }
429 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use") 422 DECLARE_CONCRETE_INSTRUCTION(DummyUse, "dummy-use")
430 }; 423 };
431 424
432 425
433 class LDeoptimize: public LTemplateInstruction<0, 0, 0> { 426 class LDeoptimize: public LTemplateInstruction<0, 0, 0> {
434 public: 427 public:
435 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize") 428 DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
429 DECLARE_HYDROGEN_ACCESSOR(Deoptimize)
436 }; 430 };
437 431
438 432
439 class LLabel: public LGap { 433 class LLabel: public LGap {
440 public: 434 public:
441 explicit LLabel(HBasicBlock* block) 435 explicit LLabel(HBasicBlock* block)
442 : LGap(block), replacement_(NULL) { } 436 : LGap(block), replacement_(NULL) { }
443 437
444 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 438 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
445 DECLARE_CONCRETE_INSTRUCTION(Label, "label") 439 DECLARE_CONCRETE_INSTRUCTION(Label, "label")
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 } 824 }
831 825
832 LOperand* left() { return inputs_[0]; } 826 LOperand* left() { return inputs_[0]; }
833 LOperand* right() { return inputs_[1]; } 827 LOperand* right() { return inputs_[1]; }
834 828
835 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, 829 DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
836 "cmp-object-eq-and-branch") 830 "cmp-object-eq-and-branch")
837 }; 831 };
838 832
839 833
840 class LCmpConstantEqAndBranch: public LControlInstruction<1, 0> {
841 public:
842 explicit LCmpConstantEqAndBranch(LOperand* left) {
843 inputs_[0] = left;
844 }
845
846 LOperand* left() { return inputs_[0]; }
847
848 DECLARE_CONCRETE_INSTRUCTION(CmpConstantEqAndBranch,
849 "cmp-constant-eq-and-branch")
850 DECLARE_HYDROGEN_ACCESSOR(CompareConstantEqAndBranch)
851 };
852
853
854 class LIsObjectAndBranch: public LControlInstruction<1, 0> { 834 class LIsObjectAndBranch: public LControlInstruction<1, 0> {
855 public: 835 public:
856 explicit LIsObjectAndBranch(LOperand* value) { 836 explicit LIsObjectAndBranch(LOperand* value) {
857 inputs_[0] = value; 837 inputs_[0] = value;
858 } 838 }
859 839
860 LOperand* value() { return inputs_[0]; } 840 LOperand* value() { return inputs_[0]; }
861 841
862 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch") 842 DECLARE_CONCRETE_INSTRUCTION(IsObjectAndBranch, "is-object-and-branch")
863 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch) 843 DECLARE_HYDROGEN_ACCESSOR(IsObjectAndBranch)
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2726 2706
2727 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2707 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2728 }; 2708 };
2729 2709
2730 #undef DECLARE_HYDROGEN_ACCESSOR 2710 #undef DECLARE_HYDROGEN_ACCESSOR
2731 #undef DECLARE_CONCRETE_INSTRUCTION 2711 #undef DECLARE_CONCRETE_INSTRUCTION
2732 2712
2733 } } // namespace v8::int 2713 } } // namespace v8::int
2734 2714
2735 #endif // V8_X64_LITHIUM_X64_H_ 2715 #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