OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1669 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1669 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
1670 return new LReturn(UseFixed(instr->value(), eax)); | 1670 return new LReturn(UseFixed(instr->value(), eax)); |
1671 } | 1671 } |
1672 | 1672 |
1673 | 1673 |
1674 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { | 1674 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
1675 Representation r = instr->representation(); | 1675 Representation r = instr->representation(); |
1676 if (r.IsInteger32()) { | 1676 if (r.IsInteger32()) { |
1677 return DefineAsRegister(new LConstantI); | 1677 return DefineAsRegister(new LConstantI); |
1678 } else if (r.IsDouble()) { | 1678 } else if (r.IsDouble()) { |
1679 return DefineAsRegister(new LConstantD); | 1679 double value = instr->DoubleValue(); |
| 1680 LOperand* temp = (BitCast<uint64_t, double>(value) != 0) |
| 1681 ? TempRegister() |
| 1682 : NULL; |
| 1683 return DefineAsRegister(new LConstantD(temp)); |
1680 } else if (r.IsTagged()) { | 1684 } else if (r.IsTagged()) { |
1681 return DefineAsRegister(new LConstantT); | 1685 return DefineAsRegister(new LConstantT); |
1682 } else { | 1686 } else { |
1683 UNREACHABLE(); | 1687 UNREACHABLE(); |
1684 return NULL; | 1688 return NULL; |
1685 } | 1689 } |
1686 } | 1690 } |
1687 | 1691 |
1688 | 1692 |
1689 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { | 1693 LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1985 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { | 1989 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { |
1986 HEnvironment* outer = current_block_->last_environment()->outer(); | 1990 HEnvironment* outer = current_block_->last_environment()->outer(); |
1987 current_block_->UpdateEnvironment(outer); | 1991 current_block_->UpdateEnvironment(outer); |
1988 return NULL; | 1992 return NULL; |
1989 } | 1993 } |
1990 | 1994 |
1991 | 1995 |
1992 } } // namespace v8::internal | 1996 } } // namespace v8::internal |
1993 | 1997 |
1994 #endif // V8_TARGET_ARCH_IA32 | 1998 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |