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

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

Issue 6528013: Implement crankshaft support for pixel array stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 10 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/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.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 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 1815 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 ? UseTempRegister(instr->value()) 1826 ? UseTempRegister(instr->value())
1827 : UseRegisterAtStart(instr->value()); 1827 : UseRegisterAtStart(instr->value());
1828 LOperand* key = needs_write_barrier 1828 LOperand* key = needs_write_barrier
1829 ? UseTempRegister(instr->key()) 1829 ? UseTempRegister(instr->key())
1830 : UseRegisterOrConstantAtStart(instr->key()); 1830 : UseRegisterOrConstantAtStart(instr->key());
1831 1831
1832 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val)); 1832 return AssignEnvironment(new LStoreKeyedFastElement(obj, key, val));
1833 } 1833 }
1834 1834
1835 1835
1836 LInstruction* LChunkBuilder::DoStorePixelArrayElement(
1837 HStorePixelArrayElement* instr) {
1838 ASSERT(instr->value()->representation().IsInteger32());
1839 ASSERT(instr->external_pointer()->representation().IsExternal());
1840 ASSERT(instr->key()->representation().IsInteger32());
1841
1842 LOperand* external_pointer = UseRegister(instr->external_pointer());
1843 LOperand* val = UseRegister(instr->value());
1844 LOperand* key = UseRegister(instr->key());
1845 // The generated code requires that the clamped value is in a byte
1846 // register. eax is an arbitrary choice to satisfy this requirement.
1847 LOperand* clamped = FixedTemp(eax);
1848
1849 return new LStorePixelArrayElement(external_pointer, key, val, clamped);
1850 }
1851
1852
1836 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) { 1853 LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
1837 LOperand* context = UseFixed(instr->context(), esi); 1854 LOperand* context = UseFixed(instr->context(), esi);
1838 LOperand* object = UseFixed(instr->object(), edx); 1855 LOperand* object = UseFixed(instr->object(), edx);
1839 LOperand* key = UseFixed(instr->key(), ecx); 1856 LOperand* key = UseFixed(instr->key(), ecx);
1840 LOperand* value = UseFixed(instr->value(), eax); 1857 LOperand* value = UseFixed(instr->value(), eax);
1841 1858
1842 ASSERT(instr->object()->representation().IsTagged()); 1859 ASSERT(instr->object()->representation().IsTagged());
1843 ASSERT(instr->key()->representation().IsTagged()); 1860 ASSERT(instr->key()->representation().IsTagged());
1844 ASSERT(instr->value()->representation().IsTagged()); 1861 ASSERT(instr->value()->representation().IsTagged());
1845 1862
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2052 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2036 HEnvironment* outer = current_block_->last_environment()->outer(); 2053 HEnvironment* outer = current_block_->last_environment()->outer();
2037 current_block_->UpdateEnvironment(outer); 2054 current_block_->UpdateEnvironment(outer);
2038 return NULL; 2055 return NULL;
2039 } 2056 }
2040 2057
2041 2058
2042 } } // namespace v8::internal 2059 } } // namespace v8::internal
2043 2060
2044 #endif // V8_TARGET_ARCH_IA32 2061 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698