OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 __ subl(ToRegister(left), ToOperand(right)); | 1553 __ subl(ToRegister(left), ToOperand(right)); |
1554 } | 1554 } |
1555 | 1555 |
1556 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { | 1556 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
1557 DeoptimizeIf(overflow, instr->environment()); | 1557 DeoptimizeIf(overflow, instr->environment()); |
1558 } | 1558 } |
1559 } | 1559 } |
1560 | 1560 |
1561 | 1561 |
1562 void LCodeGen::DoConstantI(LConstantI* instr) { | 1562 void LCodeGen::DoConstantI(LConstantI* instr) { |
1563 ASSERT(instr->result()->IsRegister()); | |
1564 __ Set(ToRegister(instr->result()), instr->value()); | 1563 __ Set(ToRegister(instr->result()), instr->value()); |
1565 } | 1564 } |
1566 | 1565 |
1567 | 1566 |
| 1567 void LCodeGen::DoConstantS(LConstantS* instr) { |
| 1568 __ Move(ToRegister(instr->result()), instr->value()); |
| 1569 } |
| 1570 |
| 1571 |
1568 void LCodeGen::DoConstantD(LConstantD* instr) { | 1572 void LCodeGen::DoConstantD(LConstantD* instr) { |
1569 ASSERT(instr->result()->IsDoubleRegister()); | 1573 ASSERT(instr->result()->IsDoubleRegister()); |
1570 XMMRegister res = ToDoubleRegister(instr->result()); | 1574 XMMRegister res = ToDoubleRegister(instr->result()); |
1571 double v = instr->value(); | 1575 double v = instr->value(); |
1572 uint64_t int_val = BitCast<uint64_t, double>(v); | 1576 uint64_t int_val = BitCast<uint64_t, double>(v); |
1573 // Use xor to produce +0.0 in a fast and compact way, but avoid to | 1577 // Use xor to produce +0.0 in a fast and compact way, but avoid to |
1574 // do so if the constant is -0.0. | 1578 // do so if the constant is -0.0. |
1575 if (int_val == 0) { | 1579 if (int_val == 0) { |
1576 __ xorps(res, res); | 1580 __ xorps(res, res); |
1577 } else { | 1581 } else { |
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5689 FixedArray::kHeaderSize - kPointerSize)); | 5693 FixedArray::kHeaderSize - kPointerSize)); |
5690 __ bind(&done); | 5694 __ bind(&done); |
5691 } | 5695 } |
5692 | 5696 |
5693 | 5697 |
5694 #undef __ | 5698 #undef __ |
5695 | 5699 |
5696 } } // namespace v8::internal | 5700 } } // namespace v8::internal |
5697 | 5701 |
5698 #endif // V8_TARGET_ARCH_X64 | 5702 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |