Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 4acbf7201799b93f429461a3d712fa89c3011671..76eaec570cba39f5dda25dd90b52d6f081bacafd 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1677,6 +1677,14 @@ LInstruction* LChunkBuilder::DoThrow(HThrow* instr) { |
} |
+LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) { |
+ // All HForceRepresentation instructions should be eliminated in the |
+ // representation change phase of Hydrogen. |
+ UNREACHABLE(); |
+ return NULL; |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoChange(HChange* instr) { |
Representation from = instr->from(); |
Representation to = instr->to(); |
@@ -1778,6 +1786,27 @@ LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
} |
+LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
+ HValue* value = instr->value(); |
+ Representation input_rep = value->representation(); |
+ if (input_rep.IsDouble()) { |
+ LOperand* reg = UseRegister(value); |
+ return DefineAsRegister(new LClampDToUint8(reg)); |
+ } else if (input_rep.IsInteger32()) { |
+ LOperand* reg = UseFixed(value, eax); |
+ return DefineFixed(new LClampIToUint8(reg), eax); |
+ } else { |
+ ASSERT(input_rep.IsTagged()); |
+ LOperand* reg = UseFixed(value, eax); |
+ // Register allocator doesn't (yet) support allocation of double |
+ // temps. Reserve xmm1 explicitly. |
+ LOperand* temp = FixedTemp(xmm1); |
+ LClampTToUint8* result = new LClampTToUint8(reg, temp); |
+ return AssignEnvironment(DefineFixed(result, eax)); |
+ } |
+} |
+ |
+ |
LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
return new LReturn(UseFixed(instr->value(), eax)); |
} |
@@ -1988,14 +2017,6 @@ LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
LOperand* external_pointer = UseRegister(instr->external_pointer()); |
LOperand* key = UseRegisterOrConstant(instr->key()); |
LOperand* temp = NULL; |
- |
- if (array_type == kExternalPixelArray) { |
- // The generated code for pixel array stores requires that the clamped value |
- // is in a byte register. eax is an arbitrary choice to satisfy this |
- // requirement. |
- temp = FixedTemp(eax); |
- } |
- |
LOperand* val = NULL; |
if (array_type == kExternalByteArray || |
array_type == kExternalUnsignedByteArray) { |