| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1628 | 1628 |
| 1629 | 1629 |
| 1630 void LCodeGen::DoConstantS(LConstantS* instr) { | 1630 void LCodeGen::DoConstantS(LConstantS* instr) { |
| 1631 __ li(ToRegister(instr->result()), Operand(instr->value())); | 1631 __ li(ToRegister(instr->result()), Operand(instr->value())); |
| 1632 } | 1632 } |
| 1633 | 1633 |
| 1634 | 1634 |
| 1635 void LCodeGen::DoConstantD(LConstantD* instr) { | 1635 void LCodeGen::DoConstantD(LConstantD* instr) { |
| 1636 DCHECK(instr->result()->IsDoubleRegister()); | 1636 DCHECK(instr->result()->IsDoubleRegister()); |
| 1637 DoubleRegister result = ToDoubleRegister(instr->result()); | 1637 DoubleRegister result = ToDoubleRegister(instr->result()); |
| 1638 #if V8_HOST_ARCH_IA32 | |
| 1639 // Need some crappy work-around for x87 sNaN -> qNaN breakage in simulator | |
| 1640 // builds. | |
| 1641 uint64_t bits = instr->bits(); | |
| 1642 if ((bits & V8_UINT64_C(0x7FF8000000000000)) == | |
| 1643 V8_UINT64_C(0x7FF0000000000000)) { | |
| 1644 uint32_t lo = static_cast<uint32_t>(bits); | |
| 1645 uint32_t hi = static_cast<uint32_t>(bits >> 32); | |
| 1646 __ li(at, Operand(lo)); | |
| 1647 __ li(scratch0(), Operand(hi)); | |
| 1648 __ Move(result, at, scratch0()); | |
| 1649 return; | |
| 1650 } | |
| 1651 #endif | |
| 1652 double v = instr->value(); | 1638 double v = instr->value(); |
| 1653 __ Move(result, v); | 1639 __ Move(result, v); |
| 1654 } | 1640 } |
| 1655 | 1641 |
| 1656 | 1642 |
| 1657 void LCodeGen::DoConstantE(LConstantE* instr) { | 1643 void LCodeGen::DoConstantE(LConstantE* instr) { |
| 1658 __ li(ToRegister(instr->result()), Operand(instr->value())); | 1644 __ li(ToRegister(instr->result()), Operand(instr->value())); |
| 1659 } | 1645 } |
| 1660 | 1646 |
| 1661 | 1647 |
| (...skipping 4020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5682 __ Push(at, ToRegister(instr->function())); | 5668 __ Push(at, ToRegister(instr->function())); |
| 5683 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5669 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5684 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5670 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5685 } | 5671 } |
| 5686 | 5672 |
| 5687 | 5673 |
| 5688 #undef __ | 5674 #undef __ |
| 5689 | 5675 |
| 5690 } // namespace internal | 5676 } // namespace internal |
| 5691 } // namespace v8 | 5677 } // namespace v8 |
| OLD | NEW |