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

Side by Side Diff: src/x64/lithium-codegen-x64.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.cc ('k') | src/x64/lithium-x64.h » ('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 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 } 2141 }
2142 } 2142 }
2143 } 2143 }
2144 2144
2145 2145
2146 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 2146 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
2147 Abort("Unimplemented: %s", "DoStoreNamedGeneric"); 2147 Abort("Unimplemented: %s", "DoStoreNamedGeneric");
2148 } 2148 }
2149 2149
2150 2150
2151 void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) {
2152 Register external_pointer = ToRegister(instr->external_pointer());
2153 Register key = ToRegister(instr->key());
2154 Register value = ToRegister(instr->value());
2155
2156 { // Clamp the value to [0..255].
2157 NearLabel done;
2158 __ testl(value, Immediate(0xFFFFFF00));
2159 __ j(zero, &done);
2160 __ setcc(negative, value); // 1 if negative, 0 if positive.
2161 __ decb(value); // 0 if negative, 255 if positive.
2162 __ bind(&done);
2163 }
2164
2165 __ movb(Operand(external_pointer, key, times_1, 0), value);
2166 }
2167
2168
2151 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 2169 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
2152 if (instr->length()->IsRegister()) { 2170 if (instr->length()->IsRegister()) {
2153 __ cmpq(ToRegister(instr->index()), ToRegister(instr->length())); 2171 __ cmpq(ToRegister(instr->index()), ToRegister(instr->length()));
2154 } else { 2172 } else {
2155 __ cmpq(ToRegister(instr->index()), ToOperand(instr->length())); 2173 __ cmpq(ToRegister(instr->index()), ToOperand(instr->length()));
2156 } 2174 }
2157 DeoptimizeIf(above_equal, instr->environment()); 2175 DeoptimizeIf(above_equal, instr->environment());
2158 } 2176 }
2159 2177
2160 2178
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
2754 RegisterEnvironmentForDeoptimization(environment); 2772 RegisterEnvironmentForDeoptimization(environment);
2755 ASSERT(osr_pc_offset_ == -1); 2773 ASSERT(osr_pc_offset_ == -1);
2756 osr_pc_offset_ = masm()->pc_offset(); 2774 osr_pc_offset_ = masm()->pc_offset();
2757 } 2775 }
2758 2776
2759 #undef __ 2777 #undef __
2760 2778
2761 } } // namespace v8::internal 2779 } } // namespace v8::internal
2762 2780
2763 #endif // V8_TARGET_ARCH_X64 2781 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698