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 1844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1855 DefineAsRegister(new(zone()) LDoubleToI(value, temp))); | 1855 DefineAsRegister(new(zone()) LDoubleToI(value, temp))); |
1856 } | 1856 } |
1857 } else if (from.IsInteger32()) { | 1857 } else if (from.IsInteger32()) { |
1858 info()->MarkAsDeferredCalling(); | 1858 info()->MarkAsDeferredCalling(); |
1859 if (to.IsTagged()) { | 1859 if (to.IsTagged()) { |
1860 HValue* val = instr->value(); | 1860 HValue* val = instr->value(); |
1861 LOperand* value = UseRegister(val); | 1861 LOperand* value = UseRegister(val); |
1862 if (val->HasRange() && val->range()->IsInSmiRange()) { | 1862 if (val->HasRange() && val->range()->IsInSmiRange()) { |
1863 return DefineSameAsFirst(new(zone()) LSmiTag(value)); | 1863 return DefineSameAsFirst(new(zone()) LSmiTag(value)); |
1864 } else if (val->CheckFlag(HInstruction::kUint32)) { | 1864 } else if (val->CheckFlag(HInstruction::kUint32)) { |
1865 LOperand* temp = CpuFeatures::IsSupported(SSE2) ? FixedTemp(xmm1) | 1865 LOperand* temp1 = TempRegister(); |
1866 : NULL; | 1866 LOperand* temp2 = CpuFeatures::IsSupported(SSE2) ? FixedTemp(xmm1) |
1867 LNumberTagU* result = new(zone()) LNumberTagU(value, temp); | 1867 : NULL; |
| 1868 LNumberTagU* result = new(zone()) LNumberTagU(value, temp1, temp2); |
1868 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1869 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1869 } else { | 1870 } else { |
1870 LNumberTagI* result = new(zone()) LNumberTagI(value); | 1871 LOperand* temp = TempRegister(); |
| 1872 LNumberTagI* result = new(zone()) LNumberTagI(value, temp); |
1871 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); | 1873 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); |
1872 } | 1874 } |
1873 } else if (to.IsSmi()) { | 1875 } else if (to.IsSmi()) { |
1874 HValue* val = instr->value(); | 1876 HValue* val = instr->value(); |
1875 LOperand* value = UseRegister(val); | 1877 LOperand* value = UseRegister(val); |
1876 LInstruction* result = val->CheckFlag(HInstruction::kUint32) | 1878 LInstruction* result = val->CheckFlag(HInstruction::kUint32) |
1877 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) | 1879 ? DefineSameAsFirst(new(zone()) LUint32ToSmi(value)) |
1878 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); | 1880 : DefineSameAsFirst(new(zone()) LInteger32ToSmi(value)); |
1879 if (val->HasRange() && val->range()->IsInSmiRange()) { | 1881 if (val->HasRange() && val->range()->IsInSmiRange()) { |
1880 return result; | 1882 return result; |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2592 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2591 LOperand* object = UseRegister(instr->object()); | 2593 LOperand* object = UseRegister(instr->object()); |
2592 LOperand* index = UseTempRegister(instr->index()); | 2594 LOperand* index = UseTempRegister(instr->index()); |
2593 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2595 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2594 } | 2596 } |
2595 | 2597 |
2596 | 2598 |
2597 } } // namespace v8::internal | 2599 } } // namespace v8::internal |
2598 | 2600 |
2599 #endif // V8_TARGET_ARCH_IA32 | 2601 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |