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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 class LAddI: public LTemplateInstruction<1, 2, 0> { | 1362 class LAddI: public LTemplateInstruction<1, 2, 0> { |
1363 public: | 1363 public: |
1364 LAddI(LOperand* left, LOperand* right) { | 1364 LAddI(LOperand* left, LOperand* right) { |
1365 inputs_[0] = left; | 1365 inputs_[0] = left; |
1366 inputs_[1] = right; | 1366 inputs_[1] = right; |
1367 } | 1367 } |
1368 | 1368 |
1369 LOperand* left() { return inputs_[0]; } | 1369 LOperand* left() { return inputs_[0]; } |
1370 LOperand* right() { return inputs_[1]; } | 1370 LOperand* right() { return inputs_[1]; } |
1371 | 1371 |
| 1372 static bool UseLea(HAdd* add) { |
| 1373 return !add->CheckFlag(HValue::kCanOverflow) && |
| 1374 add->BetterLeftOperand()->UseCount() > 1; |
| 1375 } |
| 1376 |
1372 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 1377 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
1373 DECLARE_HYDROGEN_ACCESSOR(Add) | 1378 DECLARE_HYDROGEN_ACCESSOR(Add) |
1374 }; | 1379 }; |
1375 | 1380 |
1376 | 1381 |
1377 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { | 1382 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { |
1378 public: | 1383 public: |
1379 LMathMinMax(LOperand* left, LOperand* right) { | 1384 LMathMinMax(LOperand* left, LOperand* right) { |
1380 inputs_[0] = left; | 1385 inputs_[0] = left; |
1381 inputs_[1] = right; | 1386 inputs_[1] = right; |
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2979 | 2984 |
2980 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2985 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2981 }; | 2986 }; |
2982 | 2987 |
2983 #undef DECLARE_HYDROGEN_ACCESSOR | 2988 #undef DECLARE_HYDROGEN_ACCESSOR |
2984 #undef DECLARE_CONCRETE_INSTRUCTION | 2989 #undef DECLARE_CONCRETE_INSTRUCTION |
2985 | 2990 |
2986 } } // namespace v8::internal | 2991 } } // namespace v8::internal |
2987 | 2992 |
2988 #endif // V8_IA32_LITHIUM_IA32_H_ | 2993 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |