Index: src/ia32/lithium-ia32.h |
diff --git a/src/ia32/lithium-ia32.h b/src/ia32/lithium-ia32.h |
index 1ed3eaabd7efcf29af78c37c6ac5c47e93c5cd82..516222348e4a802baae30c06fdaf5633bd005de7 100644 |
--- a/src/ia32/lithium-ia32.h |
+++ b/src/ia32/lithium-ia32.h |
@@ -67,6 +67,9 @@ class LCodeGen; |
V(CheckNonSmi) \ |
V(CheckPrototypeMaps) \ |
V(CheckSmi) \ |
+ V(ClampDoubleToUint8) \ |
+ V(ClampIToUint8) \ |
+ V(ClampTaggedToUint8) \ |
V(ClassOfTest) \ |
V(ClassOfTestAndBranch) \ |
V(CmpID) \ |
@@ -1974,6 +1977,43 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> { |
}; |
+class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 0> { |
+ public: |
+ explicit LClampDoubleToUint8(LOperand* value) { |
+ inputs_[0] = value; |
+ } |
+ |
+ LOperand* unclamped() { return inputs_[0]; } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8") |
+}; |
+ |
+ |
+class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { |
+ public: |
+ explicit LClampIToUint8(LOperand* value) { |
+ inputs_[0] = value; |
+ } |
+ |
+ LOperand* unclamped() { return inputs_[0]; } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(ClampIToUint8, "clamp-i-to-uint8") |
+}; |
+ |
+ |
+class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 1> { |
+ public: |
+ explicit LClampTaggedToUint8(LOperand* value, LOperand* temp) { |
+ inputs_[0] = value; |
+ temps_[0] = temp; |
+ } |
+ |
+ LOperand* unclamped() { return inputs_[0]; } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8") |
+}; |
+ |
+ |
class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { |
public: |
explicit LCheckNonSmi(LOperand* value) { |