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

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

Issue 1170923004: Reland "MIPS64: Fix lithium arithmetic operations for integers to sign-extend result." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Include fix of removed EmitLoadRegister unsafe usage. Created 5 years, 6 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
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_MIPS_LITHIUM_MIPS_H_ 5 #ifndef V8_MIPS_LITHIUM_MIPS_H_
6 #define V8_MIPS_LITHIUM_MIPS_H_ 6 #define V8_MIPS_LITHIUM_MIPS_H_
7 7
8 #include "src/hydrogen.h" 8 #include "src/hydrogen.h"
9 #include "src/lithium.h" 9 #include "src/lithium.h"
10 #include "src/lithium-allocator.h" 10 #include "src/lithium-allocator.h"
11 #include "src/safepoint-table.h" 11 #include "src/safepoint-table.h"
12 #include "src/utils.h" 12 #include "src/utils.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 // Forward declarations. 17 // Forward declarations.
18 class LCodeGen; 18 class LCodeGen;
19 19
20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 20 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
21 V(AccessArgumentsAt) \ 21 V(AccessArgumentsAt) \
22 V(AddE) \
22 V(AddI) \ 23 V(AddI) \
23 V(AddE) \ 24 V(AddS) \
24 V(Allocate) \ 25 V(Allocate) \
25 V(AllocateBlockContext) \ 26 V(AllocateBlockContext) \
26 V(ApplyArguments) \ 27 V(ApplyArguments) \
27 V(ArgumentsElements) \ 28 V(ArgumentsElements) \
28 V(ArgumentsLength) \ 29 V(ArgumentsLength) \
29 V(ArithmeticD) \ 30 V(ArithmeticD) \
30 V(ArithmeticT) \ 31 V(ArithmeticT) \
31 V(BitI) \ 32 V(BitI) \
32 V(BoundsCheck) \ 33 V(BoundsCheck) \
33 V(Branch) \ 34 V(Branch) \
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 V(MathLog) \ 117 V(MathLog) \
117 V(MathMinMax) \ 118 V(MathMinMax) \
118 V(MathPowHalf) \ 119 V(MathPowHalf) \
119 V(MathRound) \ 120 V(MathRound) \
120 V(MathSqrt) \ 121 V(MathSqrt) \
121 V(MaybeGrowElements) \ 122 V(MaybeGrowElements) \
122 V(ModByConstI) \ 123 V(ModByConstI) \
123 V(ModByPowerOf2I) \ 124 V(ModByPowerOf2I) \
124 V(ModI) \ 125 V(ModI) \
125 V(MulI) \ 126 V(MulI) \
127 V(MulS) \
126 V(MultiplyAddD) \ 128 V(MultiplyAddD) \
127 V(NumberTagD) \ 129 V(NumberTagD) \
128 V(NumberTagU) \ 130 V(NumberTagU) \
129 V(NumberUntagD) \ 131 V(NumberUntagD) \
130 V(OsrEntry) \ 132 V(OsrEntry) \
131 V(Parameter) \ 133 V(Parameter) \
132 V(Power) \ 134 V(Power) \
133 V(PushArgument) \ 135 V(PushArgument) \
134 V(RegExpLiteral) \ 136 V(RegExpLiteral) \
135 V(Return) \ 137 V(Return) \
136 V(SeqStringGetChar) \ 138 V(SeqStringGetChar) \
137 V(SeqStringSetChar) \ 139 V(SeqStringSetChar) \
138 V(ShiftI) \ 140 V(ShiftI) \
139 V(SmiTag) \ 141 V(SmiTag) \
140 V(SmiUntag) \ 142 V(SmiUntag) \
141 V(StackCheck) \ 143 V(StackCheck) \
142 V(StoreCodeEntry) \ 144 V(StoreCodeEntry) \
143 V(StoreContextSlot) \ 145 V(StoreContextSlot) \
144 V(StoreFrameContext) \ 146 V(StoreFrameContext) \
145 V(StoreKeyed) \ 147 V(StoreKeyed) \
146 V(StoreKeyedGeneric) \ 148 V(StoreKeyedGeneric) \
147 V(StoreNamedField) \ 149 V(StoreNamedField) \
148 V(StoreNamedGeneric) \ 150 V(StoreNamedGeneric) \
149 V(StringAdd) \ 151 V(StringAdd) \
150 V(StringCharCodeAt) \ 152 V(StringCharCodeAt) \
151 V(StringCharFromCode) \ 153 V(StringCharFromCode) \
152 V(StringCompareAndBranch) \ 154 V(StringCompareAndBranch) \
153 V(SubI) \ 155 V(SubI) \
156 V(SubS) \
154 V(TaggedToI) \ 157 V(TaggedToI) \
155 V(ThisFunction) \ 158 V(ThisFunction) \
156 V(ToFastProperties) \ 159 V(ToFastProperties) \
157 V(TransitionElementsKind) \ 160 V(TransitionElementsKind) \
158 V(TrapAllocationMemento) \ 161 V(TrapAllocationMemento) \
159 V(Typeof) \ 162 V(Typeof) \
160 V(TypeofIsAndBranch) \ 163 V(TypeofIsAndBranch) \
161 V(Uint32ToDouble) \ 164 V(Uint32ToDouble) \
162 V(UnknownOSRValue) \ 165 V(UnknownOSRValue) \
163 V(WrapReceiver) 166 V(WrapReceiver)
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 } 750 }
748 751
749 LOperand* dividend() { return inputs_[0]; } 752 LOperand* dividend() { return inputs_[0]; }
750 LOperand* divisor() { return inputs_[1]; } 753 LOperand* divisor() { return inputs_[1]; }
751 754
752 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i") 755 DECLARE_CONCRETE_INSTRUCTION(FlooringDivI, "flooring-div-i")
753 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 756 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
754 }; 757 };
755 758
756 759
760 class LMulS final : public LTemplateInstruction<1, 2, 0> {
761 public:
762 LMulS(LOperand* left, LOperand* right) {
763 inputs_[0] = left;
764 inputs_[1] = right;
765 }
766
767 LOperand* left() { return inputs_[0]; }
768 LOperand* right() { return inputs_[1]; }
769
770 DECLARE_CONCRETE_INSTRUCTION(MulS, "mul-s")
771 DECLARE_HYDROGEN_ACCESSOR(Mul)
772 };
773
774
757 class LMulI final : public LTemplateInstruction<1, 2, 0> { 775 class LMulI final : public LTemplateInstruction<1, 2, 0> {
758 public: 776 public:
759 LMulI(LOperand* left, LOperand* right) { 777 LMulI(LOperand* left, LOperand* right) {
760 inputs_[0] = left; 778 inputs_[0] = left;
761 inputs_[1] = right; 779 inputs_[1] = right;
762 } 780 }
763 781
764 LOperand* left() { return inputs_[0]; } 782 LOperand* left() { return inputs_[0]; }
765 LOperand* right() { return inputs_[1]; } 783 LOperand* right() { return inputs_[1]; }
766 784
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 } 1285 }
1268 1286
1269 LOperand* left() { return inputs_[0]; } 1287 LOperand* left() { return inputs_[0]; }
1270 LOperand* right() { return inputs_[1]; } 1288 LOperand* right() { return inputs_[1]; }
1271 1289
1272 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i") 1290 DECLARE_CONCRETE_INSTRUCTION(SubI, "sub-i")
1273 DECLARE_HYDROGEN_ACCESSOR(Sub) 1291 DECLARE_HYDROGEN_ACCESSOR(Sub)
1274 }; 1292 };
1275 1293
1276 1294
1295 class LSubS final : public LTemplateInstruction<1, 2, 0> {
1296 public:
1297 LSubS(LOperand* left, LOperand* right) {
1298 inputs_[0] = left;
1299 inputs_[1] = right;
1300 }
1301
1302 LOperand* left() { return inputs_[0]; }
1303 LOperand* right() { return inputs_[1]; }
1304
1305 DECLARE_CONCRETE_INSTRUCTION(SubS, "sub-s")
1306 DECLARE_HYDROGEN_ACCESSOR(Sub)
1307 };
1308
1309
1277 class LConstantI final : public LTemplateInstruction<1, 0, 0> { 1310 class LConstantI final : public LTemplateInstruction<1, 0, 0> {
1278 public: 1311 public:
1279 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i") 1312 DECLARE_CONCRETE_INSTRUCTION(ConstantI, "constant-i")
1280 DECLARE_HYDROGEN_ACCESSOR(Constant) 1313 DECLARE_HYDROGEN_ACCESSOR(Constant)
1281 1314
1282 int32_t value() const { return hydrogen()->Integer32Value(); } 1315 int32_t value() const { return hydrogen()->Integer32Value(); }
1283 }; 1316 };
1284 1317
1285 1318
1286 class LConstantS final : public LTemplateInstruction<1, 0, 0> { 1319 class LConstantS final : public LTemplateInstruction<1, 0, 0> {
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 } 1478 }
1446 1479
1447 LOperand* left() { return inputs_[0]; } 1480 LOperand* left() { return inputs_[0]; }
1448 LOperand* right() { return inputs_[1]; } 1481 LOperand* right() { return inputs_[1]; }
1449 1482
1450 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") 1483 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i")
1451 DECLARE_HYDROGEN_ACCESSOR(Add) 1484 DECLARE_HYDROGEN_ACCESSOR(Add)
1452 }; 1485 };
1453 1486
1454 1487
1488 class LAddS final : public LTemplateInstruction<1, 2, 0> {
1489 public:
1490 LAddS(LOperand* left, LOperand* right) {
1491 inputs_[0] = left;
1492 inputs_[1] = right;
1493 }
1494
1495 LOperand* left() { return inputs_[0]; }
1496 LOperand* right() { return inputs_[1]; }
1497
1498 DECLARE_CONCRETE_INSTRUCTION(AddS, "add-s")
1499 DECLARE_HYDROGEN_ACCESSOR(Add)
1500 };
1501
1502
1455 class LMathMinMax final : public LTemplateInstruction<1, 2, 0> { 1503 class LMathMinMax final : public LTemplateInstruction<1, 2, 0> {
1456 public: 1504 public:
1457 LMathMinMax(LOperand* left, LOperand* right) { 1505 LMathMinMax(LOperand* left, LOperand* right) {
1458 inputs_[0] = left; 1506 inputs_[0] = left;
1459 inputs_[1] = right; 1507 inputs_[1] = right;
1460 } 1508 }
1461 1509
1462 LOperand* left() { return inputs_[0]; } 1510 LOperand* left() { return inputs_[0]; }
1463 LOperand* right() { return inputs_[1]; } 1511 LOperand* right() { return inputs_[1]; }
1464 1512
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 2881
2834 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2882 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2835 }; 2883 };
2836 2884
2837 #undef DECLARE_HYDROGEN_ACCESSOR 2885 #undef DECLARE_HYDROGEN_ACCESSOR
2838 #undef DECLARE_CONCRETE_INSTRUCTION 2886 #undef DECLARE_CONCRETE_INSTRUCTION
2839 2887
2840 } } // namespace v8::internal 2888 } } // namespace v8::internal
2841 2889
2842 #endif // V8_MIPS_LITHIUM_MIPS_H_ 2890 #endif // V8_MIPS_LITHIUM_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698