Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index e1ebb3eacaee90ddf48c7e013906c83bf4b4746f..48d149e861300a3a80689c84b660dd5e6506e6df 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2148,6 +2148,24 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
} |
+void LCodeGen::DoStorePixelArrayElement(LStorePixelArrayElement* instr) { |
+ Register external_pointer = ToRegister(instr->external_pointer()); |
+ Register key = ToRegister(instr->key()); |
+ Register value = ToRegister(instr->value()); |
+ |
+ { // Clamp the value to [0..255]. |
+ NearLabel done; |
+ __ testl(value, Immediate(0xFFFFFF00)); |
+ __ j(zero, &done); |
+ __ setcc(negative, value); // 1 if negative, 0 if positive. |
+ __ decb(value); // 0 if negative, 255 if positive. |
+ __ bind(&done); |
+ } |
+ |
+ __ movb(Operand(external_pointer, key, times_1, 0), value); |
+} |
+ |
+ |
void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { |
if (instr->length()->IsRegister()) { |
__ cmpq(ToRegister(instr->index()), ToRegister(instr->length())); |