Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: src/ia32/lithium-ia32.cc

Issue 9565007: Fix a register assignment bug in typed array stores without SSE3 available. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Fixed assert for real Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after
1809 LOperand* reg = UseFixed(value, eax); 1809 LOperand* reg = UseFixed(value, eax);
1810 // Register allocator doesn't (yet) support allocation of double 1810 // Register allocator doesn't (yet) support allocation of double
1811 // temps. Reserve xmm1 explicitly. 1811 // temps. Reserve xmm1 explicitly.
1812 LOperand* temp = FixedTemp(xmm1); 1812 LOperand* temp = FixedTemp(xmm1);
1813 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, temp); 1813 LClampTToUint8* result = new(zone()) LClampTToUint8(reg, temp);
1814 return AssignEnvironment(DefineFixed(result, eax)); 1814 return AssignEnvironment(DefineFixed(result, eax));
1815 } 1815 }
1816 } 1816 }
1817 1817
1818 1818
1819 LInstruction* LChunkBuilder::DoToInt32(HToInt32* instr) {
1820 HValue* value = instr->value();
1821 Representation input_rep = value->representation();
1822
1823 LInstruction* result;
1824 if (input_rep.IsDouble()) {
1825 LOperand* reg = UseRegister(value);
1826 LOperand* temp_reg =
1827 CpuFeatures::IsSupported(SSE3) ? NULL : TempRegister();
1828 result = DefineAsRegister(new(zone()) LDoubleToI(reg, temp_reg));
1829 } else if (input_rep.IsInteger32()) {
1830 // Canonicalization should already have removed the hydrogen instruction in
1831 // this case, since it is a noop.
1832 UNREACHABLE();
1833 return NULL;
1834 } else {
1835 ASSERT(input_rep.IsTagged());
1836 LOperand* reg = UseRegister(value);
1837 // Register allocator doesn't (yet) support allocation of double
1838 // temps. Reserve xmm1 explicitly.
1839 LOperand* xmm_temp =
1840 CpuFeatures::IsSupported(SSE3) ? NULL : FixedTemp(xmm1);
1841 result = DefineSameAsFirst(new(zone()) LTaggedToI(reg, xmm_temp));
1842 }
1843 return AssignEnvironment(result);
1844 }
1845
1846
1847 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { 1819 LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
1848 return new(zone()) LReturn(UseFixed(instr->value(), eax)); 1820 return new(zone()) LReturn(UseFixed(instr->value(), eax));
1849 } 1821 }
1850 1822
1851 1823
1852 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 1824 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
1853 Representation r = instr->representation(); 1825 Representation r = instr->representation();
1854 if (r.IsInteger32()) { 1826 if (r.IsInteger32()) {
1855 return DefineAsRegister(new(zone()) LConstantI); 1827 return DefineAsRegister(new(zone()) LConstantI);
1856 } else if (r.IsDouble()) { 1828 } else if (r.IsDouble()) {
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2415 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2444 LOperand* object = UseRegister(instr->object()); 2416 LOperand* object = UseRegister(instr->object());
2445 LOperand* index = UseTempRegister(instr->index()); 2417 LOperand* index = UseTempRegister(instr->index());
2446 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); 2418 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index));
2447 } 2419 }
2448 2420
2449 2421
2450 } } // namespace v8::internal 2422 } } // namespace v8::internal
2451 2423
2452 #endif // V8_TARGET_ARCH_IA32 2424 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698