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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 } else { | 1744 } else { |
1745 __ sub(ToRegister(left), ToOperand(right)); | 1745 __ sub(ToRegister(left), ToOperand(right)); |
1746 } | 1746 } |
1747 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { | 1747 if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) { |
1748 DeoptimizeIf(overflow, instr->environment()); | 1748 DeoptimizeIf(overflow, instr->environment()); |
1749 } | 1749 } |
1750 } | 1750 } |
1751 | 1751 |
1752 | 1752 |
1753 void LCodeGen::DoConstantI(LConstantI* instr) { | 1753 void LCodeGen::DoConstantI(LConstantI* instr) { |
1754 ASSERT(instr->result()->IsRegister()); | |
1755 __ Set(ToRegister(instr->result()), Immediate(instr->value())); | 1754 __ Set(ToRegister(instr->result()), Immediate(instr->value())); |
1756 } | 1755 } |
1757 | 1756 |
| 1757 |
| 1758 void LCodeGen::DoConstantS(LConstantS* instr) { |
| 1759 __ Set(ToRegister(instr->result()), Immediate(instr->value())); |
| 1760 } |
| 1761 |
1758 | 1762 |
1759 void LCodeGen::DoConstantD(LConstantD* instr) { | 1763 void LCodeGen::DoConstantD(LConstantD* instr) { |
1760 double v = instr->value(); | 1764 double v = instr->value(); |
1761 uint64_t int_val = BitCast<uint64_t, double>(v); | 1765 uint64_t int_val = BitCast<uint64_t, double>(v); |
1762 int32_t lower = static_cast<int32_t>(int_val); | 1766 int32_t lower = static_cast<int32_t>(int_val); |
1763 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt)); | 1767 int32_t upper = static_cast<int32_t>(int_val >> (kBitsPerInt)); |
1764 | 1768 |
1765 if (!CpuFeatures::IsSafeForSnapshot(SSE2)) { | 1769 if (!CpuFeatures::IsSafeForSnapshot(SSE2)) { |
1766 __ push(Immediate(lower)); | 1770 __ push(Immediate(lower)); |
1767 __ push(Immediate(upper)); | 1771 __ push(Immediate(upper)); |
(...skipping 4813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6581 FixedArray::kHeaderSize - kPointerSize)); | 6585 FixedArray::kHeaderSize - kPointerSize)); |
6582 __ bind(&done); | 6586 __ bind(&done); |
6583 } | 6587 } |
6584 | 6588 |
6585 | 6589 |
6586 #undef __ | 6590 #undef __ |
6587 | 6591 |
6588 } } // namespace v8::internal | 6592 } } // namespace v8::internal |
6589 | 6593 |
6590 #endif // V8_TARGET_ARCH_IA32 | 6594 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |