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 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 class LAddI: public LTemplateInstruction<1, 2, 0> { | 1363 class LAddI: public LTemplateInstruction<1, 2, 0> { |
1364 public: | 1364 public: |
1365 LAddI(LOperand* left, LOperand* right) { | 1365 LAddI(LOperand* left, LOperand* right) { |
1366 inputs_[0] = left; | 1366 inputs_[0] = left; |
1367 inputs_[1] = right; | 1367 inputs_[1] = right; |
1368 } | 1368 } |
1369 | 1369 |
1370 LOperand* left() { return inputs_[0]; } | 1370 LOperand* left() { return inputs_[0]; } |
1371 LOperand* right() { return inputs_[1]; } | 1371 LOperand* right() { return inputs_[1]; } |
1372 | 1372 |
| 1373 static bool UseLea(HAdd* add) { |
| 1374 return !add->CheckFlag(HValue::kCanOverflow) && |
| 1375 add->BetterCandidateForRegisterOperand()->UseCount() > 1; |
| 1376 } |
| 1377 |
1373 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") | 1378 DECLARE_CONCRETE_INSTRUCTION(AddI, "add-i") |
1374 DECLARE_HYDROGEN_ACCESSOR(Add) | 1379 DECLARE_HYDROGEN_ACCESSOR(Add) |
1375 }; | 1380 }; |
1376 | 1381 |
1377 | 1382 |
1378 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { | 1383 class LMathMinMax: public LTemplateInstruction<1, 2, 0> { |
1379 public: | 1384 public: |
1380 LMathMinMax(LOperand* left, LOperand* right) { | 1385 LMathMinMax(LOperand* left, LOperand* right) { |
1381 inputs_[0] = left; | 1386 inputs_[0] = left; |
1382 inputs_[1] = right; | 1387 inputs_[1] = right; |
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2992 | 2997 |
2993 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2998 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2994 }; | 2999 }; |
2995 | 3000 |
2996 #undef DECLARE_HYDROGEN_ACCESSOR | 3001 #undef DECLARE_HYDROGEN_ACCESSOR |
2997 #undef DECLARE_CONCRETE_INSTRUCTION | 3002 #undef DECLARE_CONCRETE_INSTRUCTION |
2998 | 3003 |
2999 } } // namespace v8::internal | 3004 } } // namespace v8::internal |
3000 | 3005 |
3001 #endif // V8_IA32_LITHIUM_IA32_H_ | 3006 #endif // V8_IA32_LITHIUM_IA32_H_ |
OLD | NEW |