| 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 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 Representation from = instr->from(); | 1637 Representation from = instr->from(); |
| 1638 Representation to = instr->to(); | 1638 Representation to = instr->to(); |
| 1639 if (from.IsTagged()) { | 1639 if (from.IsTagged()) { |
| 1640 if (to.IsDouble()) { | 1640 if (to.IsDouble()) { |
| 1641 LOperand* value = UseRegister(instr->value()); | 1641 LOperand* value = UseRegister(instr->value()); |
| 1642 LNumberUntagD* res = new(zone()) LNumberUntagD(value); | 1642 LNumberUntagD* res = new(zone()) LNumberUntagD(value); |
| 1643 return AssignEnvironment(DefineAsRegister(res)); | 1643 return AssignEnvironment(DefineAsRegister(res)); |
| 1644 } else { | 1644 } else { |
| 1645 ASSERT(to.IsInteger32()); | 1645 ASSERT(to.IsInteger32()); |
| 1646 LOperand* value = UseRegister(instr->value()); | 1646 LOperand* value = UseRegister(instr->value()); |
| 1647 bool needs_check = !instr->value()->type().IsSmi(); | 1647 if (instr->value()->IsValueTaggedSmi()) { |
| 1648 if (needs_check) { | 1648 return DefineSameAsFirst(new(zone()) LSmiUntag(value, false)); |
| 1649 } else { |
| 1649 bool truncating = instr->CanTruncateToInt32(); | 1650 bool truncating = instr->CanTruncateToInt32(); |
| 1650 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); | 1651 LOperand* xmm_temp = truncating ? NULL : FixedTemp(xmm1); |
| 1651 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); | 1652 LTaggedToI* res = new(zone()) LTaggedToI(value, xmm_temp); |
| 1652 return AssignEnvironment(DefineSameAsFirst(res)); | 1653 return AssignEnvironment(DefineSameAsFirst(res)); |
| 1653 } else { | |
| 1654 return DefineSameAsFirst(new(zone()) LSmiUntag(value, needs_check)); | |
| 1655 } | 1654 } |
| 1656 } | 1655 } |
| 1657 } else if (from.IsDouble()) { | 1656 } else if (from.IsDouble()) { |
| 1658 if (to.IsTagged()) { | 1657 if (to.IsTagged()) { |
| 1659 LOperand* value = UseRegister(instr->value()); | 1658 LOperand* value = UseRegister(instr->value()); |
| 1660 LOperand* temp = TempRegister(); | 1659 LOperand* temp = TempRegister(); |
| 1661 | 1660 |
| 1662 // Make sure that temp and result_temp are different registers. | 1661 // Make sure that temp and result_temp are different registers. |
| 1663 LUnallocated* result_temp = TempRegister(); | 1662 LUnallocated* result_temp = TempRegister(); |
| 1664 LNumberTagD* result = new(zone()) LNumberTagD(value, temp); | 1663 LNumberTagD* result = new(zone()) LNumberTagD(value, temp); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2327 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2326 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2328 LOperand* object = UseRegister(instr->object()); | 2327 LOperand* object = UseRegister(instr->object()); |
| 2329 LOperand* index = UseTempRegister(instr->index()); | 2328 LOperand* index = UseTempRegister(instr->index()); |
| 2330 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2329 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2331 } | 2330 } |
| 2332 | 2331 |
| 2333 | 2332 |
| 2334 } } // namespace v8::internal | 2333 } } // namespace v8::internal |
| 2335 | 2334 |
| 2336 #endif // V8_TARGET_ARCH_X64 | 2335 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |