| 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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1690 LOperand* value = UseRegister(instr->value()); | 1690 LOperand* value = UseRegister(instr->value()); |
| 1691 // Temp register only necessary for minus zero check. | 1691 // Temp register only necessary for minus zero check. |
| 1692 LOperand* temp = instr->deoptimize_on_minus_zero() | 1692 LOperand* temp = instr->deoptimize_on_minus_zero() |
| 1693 ? TempRegister() | 1693 ? TempRegister() |
| 1694 : NULL; | 1694 : NULL; |
| 1695 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); | 1695 LNumberUntagD* res = new(zone()) LNumberUntagD(value, temp); |
| 1696 return AssignEnvironment(DefineAsRegister(res)); | 1696 return AssignEnvironment(DefineAsRegister(res)); |
| 1697 } else { | 1697 } else { |
| 1698 ASSERT(to.IsInteger32()); | 1698 ASSERT(to.IsInteger32()); |
| 1699 LOperand* value = UseRegister(instr->value()); | 1699 LOperand* value = UseRegister(instr->value()); |
| 1700 bool needs_check = !instr->value()->type().IsSmi(); | 1700 if (instr->value()->IsValueTaggedSmi()) { |
| 1701 if (needs_check) { | 1701 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
| 1702 } else { |
| 1702 bool truncating = instr->CanTruncateToInt32(); | 1703 bool truncating = instr->CanTruncateToInt32(); |
| 1703 LOperand* xmm_temp = | 1704 LOperand* xmm_temp = |
| 1704 (truncating && CpuFeatures::IsSupported(SSE3)) | 1705 (truncating && CpuFeatures::IsSupported(SSE3)) |
| 1705 ? NULL | 1706 ? NULL |
| 1706 : FixedTemp(xmm1); | 1707 : FixedTemp(xmm1); |
| 1707 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); | 1708 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); |
| 1708 return AssignEnvironment(DefineSameAsFirst(res)); | 1709 return AssignEnvironment(DefineSameAsFirst(res)); |
| 1709 } else { | |
| 1710 return DefineSameAsFirst(new(zone()) LSmiUntag(value, needs_check)); | |
| 1711 } | 1710 } |
| 1712 } | 1711 } |
| 1713 } else if (from.IsDouble()) { | 1712 } else if (from.IsDouble()) { |
| 1714 if (to.IsTagged()) { | 1713 if (to.IsTagged()) { |
| 1715 LOperand* value = UseRegister(instr->value()); | 1714 LOperand* value = UseRegister(instr->value()); |
| 1716 LOperand* temp = TempRegister(); | 1715 LOperand* temp = TempRegister(); |
| 1717 | 1716 |
| 1718 // Make sure that temp and result_temp are different registers. | 1717 // Make sure that temp and result_temp are different registers. |
| 1719 LUnallocated* result_temp = TempRegister(); | 1718 LUnallocated* result_temp = TempRegister(); |
| 1720 LNumberTagD* result = new(zone()) LNumberTagD(value, temp); | 1719 LNumberTagD* result = new(zone()) LNumberTagD(value, temp); |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2438 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2440 LOperand* object = UseRegister(instr->object()); | 2439 LOperand* object = UseRegister(instr->object()); |
| 2441 LOperand* index = UseTempRegister(instr->index()); | 2440 LOperand* index = UseTempRegister(instr->index()); |
| 2442 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2441 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2443 } | 2442 } |
| 2444 | 2443 |
| 2445 | 2444 |
| 2446 } } // namespace v8::internal | 2445 } } // namespace v8::internal |
| 2447 | 2446 |
| 2448 #endif // V8_TARGET_ARCH_IA32 | 2447 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |