| 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 1779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1790 LOperand* temp = FixedTemp(xmm1); | 1790 LOperand* temp = FixedTemp(xmm1); |
| 1791 LClampTToUint8* result = new LClampTToUint8(reg, temp); | 1791 LClampTToUint8* result = new LClampTToUint8(reg, temp); |
| 1792 return AssignEnvironment(DefineFixed(result, eax)); | 1792 return AssignEnvironment(DefineFixed(result, eax)); |
| 1793 } | 1793 } |
| 1794 } | 1794 } |
| 1795 | 1795 |
| 1796 | 1796 |
| 1797 LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) { | 1797 LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) { |
| 1798 HValue* value = instr->value(); | 1798 HValue* value = instr->value(); |
| 1799 Representation input_rep = value->representation(); | 1799 Representation input_rep = value->representation(); |
| 1800 // Register allocator doesn't (yet) support allocation of double | 1800 |
| 1801 // temps. Reserve xmm1 explicitly. | |
| 1802 LOperand* xmm_temp = | |
| 1803 CpuFeatures::IsSupported(SSE3) | |
| 1804 ? NULL | |
| 1805 : FixedTemp(xmm1); | |
| 1806 LInstruction* result; | 1801 LInstruction* result; |
| 1807 if (input_rep.IsDouble()) { | 1802 if (input_rep.IsDouble()) { |
| 1808 LOperand* reg = UseRegister(value); | 1803 LOperand* reg = UseRegister(value); |
| 1809 // Register allocator doesn't (yet) support allocation of double | 1804 LOperand* temp_reg = |
| 1810 // temps. Reserve xmm1 explicitly. | 1805 CpuFeatures::IsSupported(SSE3) ? NULL : TempRegister(); |
| 1811 result = DefineAsRegister(new LDoubleToI(reg, xmm_temp)); | 1806 result = DefineAsRegister(new LDoubleToI(reg, temp_reg)); |
| 1812 } else if (input_rep.IsInteger32()) { | 1807 } else if (input_rep.IsInteger32()) { |
| 1813 // Canonicalization should already have removed the hydrogen instruction in | 1808 // Canonicalization should already have removed the hydrogen instruction in |
| 1814 // this case, since it is a noop. | 1809 // this case, since it is a noop. |
| 1815 UNREACHABLE(); | 1810 UNREACHABLE(); |
| 1816 return NULL; | 1811 return NULL; |
| 1817 } else { | 1812 } else { |
| 1818 ASSERT(input_rep.IsTagged()); | 1813 ASSERT(input_rep.IsTagged()); |
| 1819 LOperand* reg = UseRegister(value); | 1814 LOperand* reg = UseRegister(value); |
| 1815 // Register allocator doesn't (yet) support allocation of double |
| 1816 // temps. Reserve xmm1 explicitly. |
| 1817 LOperand* xmm_temp = |
| 1818 CpuFeatures::IsSupported(SSE3) ? NULL : FixedTemp(xmm1); |
| 1820 result = DefineSameAsFirst(new LTaggedToI(reg, xmm_temp)); | 1819 result = DefineSameAsFirst(new LTaggedToI(reg, xmm_temp)); |
| 1821 } | 1820 } |
| 1822 return AssignEnvironment(result); | 1821 return AssignEnvironment(result); |
| 1823 } | 1822 } |
| 1824 | 1823 |
| 1825 | 1824 |
| 1826 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { | 1825 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| 1827 return new LReturn(UseFixed(instr->value(), eax)); | 1826 return new LReturn(UseFixed(instr->value(), eax)); |
| 1828 } | 1827 } |
| 1829 | 1828 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2282 LOperand* key = UseOrConstantAtStart(instr->key()); | 2281 LOperand* key = UseOrConstantAtStart(instr->key()); |
| 2283 LOperand* object = UseOrConstantAtStart(instr->object()); | 2282 LOperand* object = UseOrConstantAtStart(instr->object()); |
| 2284 LIn* result = new LIn(key, object); | 2283 LIn* result = new LIn(key, object); |
| 2285 return MarkAsCall(DefineFixed(result, eax), instr); | 2284 return MarkAsCall(DefineFixed(result, eax), instr); |
| 2286 } | 2285 } |
| 2287 | 2286 |
| 2288 | 2287 |
| 2289 } } // namespace v8::internal | 2288 } } // namespace v8::internal |
| 2290 | 2289 |
| 2291 #endif // V8_TARGET_ARCH_IA32 | 2290 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |