OLD | NEW |
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 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 class LAddI: public LTemplateInstruction<1, 2, 0> { | 1338 class LAddI: public LTemplateInstruction<1, 2, 0> { |
1339 public: | 1339 public: |
1340 LAddI(LOperand* left, LOperand* right) { | 1340 LAddI(LOperand* left, LOperand* right) { |
1341 inputs_[0] = left; | 1341 inputs_[0] = left; |
1342 inputs_[1] = right; | 1342 inputs_[1] = right; |
1343 } | 1343 } |
1344 | 1344 |
1345 LOperand* left() { return inputs_[0]; } | 1345 LOperand* left() { return inputs_[0]; } |
1346 LOperand* right() { return inputs_[1]; } | 1346 LOperand* right() { return inputs_[1]; } |
1347 | 1347 |
1348 static bool UseLea(HAdd* add) { | |
1349 return !add->CheckFlag(HValue::kCanOverflow) && | |
1350 add->BetterLeftOperand()->UseCount() > 1; | |
1351 } | |
1352 | |
1353 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 1348 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
1354 DECLARE_HYDROGEN_ACCESSOR(Add) | 1349 DECLARE_HYDROGEN_ACCESSOR(Add) |
1355 }; | 1350 }; |
1356 | 1351 |
1357 | 1352 |
1358 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { | 1353 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { |
1359 public: | 1354 public: |
1360 LMathMinMax(LOperand* left, LOperand* right) { | 1355 LMathMinMax(LOperand* left, LOperand* right) { |
1361 inputs_[0] = left; | 1356 inputs_[0] = left; |
1362 inputs_[1] = right; | 1357 inputs_[1] = right; |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 | 2739 |
2745 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2740 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2746 }; | 2741 }; |
2747 | 2742 |
2748 #undef DECLARE_HYDROGEN_ACCESSOR | 2743 #undef DECLARE_HYDROGEN_ACCESSOR |
2749 #undef DECLARE_CONCRETE_INSTRUCTION | 2744 #undef DECLARE_CONCRETE_INSTRUCTION |
2750 | 2745 |
2751 } } // namespace v8::int | 2746 } } // namespace v8::int |
2752 | 2747 |
2753 #endif // V8_X64_LITHIUM_X64_H_ | 2748 #endif // V8_X64_LITHIUM_X64_H_ |
OLD | NEW |