Representation input_rep = value->representation();
LOperand* reg = UseRegister(value);
if (input_rep.IsDouble()) {
- return DefineAsRegister(new LClampDoubleToUint8(reg, FixedTemp(d1)));
+ return DefineAsRegister(new LClampDToUint8(reg, FixedTemp(d1)));
} else if (input_rep.IsInteger32()) {
return DefineAsRegister(new LClampIToUint8(reg));
} else {
ASSERT(input_rep.IsTagged());
// Register allocator doesn't (yet) support allocation of double
// temps. Reserve d1 explicitly.
- LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, FixedTemp(d1));
+ LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d1));
return AssignEnvironment(DefineAsRegister(result));
}
}
V(CheckMap) \
V(CheckPrototypeMaps) \
V(CheckSmi) \
- V(ClampDoubleToUint8) \
+ V(ClampDToUint8) \
V(ClampIToUint8) \
- V(ClampTaggedToUint8) \
+ V(ClampTToUint8) \
V(ClassOfTest) \
V(ClassOfTestAndBranch) \
V(CmpID) \
};
-class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 1> {
+class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
public:
- explicit LClampDoubleToUint8(LOperand* value, LOperand* temp) {
+ LClampDToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value;
temps_[0] = temp;
}
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
};
};
-class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 1> {
+class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
public:
- explicit LClampTaggedToUint8(LOperand* value, LOperand* temp) {
+ LClampTToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value;
temps_[0] = temp;
}
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
};
}
-void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) {
+void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
DoubleRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result());
DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0));
}
-void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) {
+void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
Register scratch = scratch0();
Register input_reg = ToRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result());
}
-void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) {
+void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
XMMRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result());
__ ClampDoubleToUint8(value_reg, xmm0, result_reg);
}
-void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) {
+void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
ASSERT(instr->unclamped()->Equals(instr->result()));
Register input_reg = ToRegister(instr->unclamped());
Label is_smi, done, heap_number;
Representation input_rep = value->representation();
if (input_rep.IsDouble()) {
LOperand* reg = UseRegister(value);
- return DefineAsRegister(new LClampDoubleToUint8(reg));
+ return DefineAsRegister(new LClampDToUint8(reg));
} else if (input_rep.IsInteger32()) {
LOperand* reg = UseFixed(value, eax);
return DefineFixed(new LClampIToUint8(reg), eax);
// Register allocator doesn't (yet) support allocation of double
// temps. Reserve xmm1 explicitly.
LOperand* temp = FixedTemp(xmm1);
- LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, temp);
+ LClampTToUint8* result = new LClampTToUint8(reg, temp);
return AssignEnvironment(DefineFixed(result, eax));
}
}
V(CheckNonSmi) \
V(CheckPrototypeMaps) \
V(CheckSmi) \
- V(ClampDoubleToUint8) \
+ V(ClampDToUint8) \
V(ClampIToUint8) \
- V(ClampTaggedToUint8) \
+ V(ClampTToUint8) \
V(ClassOfTest) \
V(ClassOfTestAndBranch) \
V(CmpID) \
};
-class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 0> {
+class LClampDToUint8: public LTemplateInstruction<1, 1, 0> {
public:
- explicit LClampDoubleToUint8(LOperand* value) {
+ explicit LClampDToUint8(LOperand* value) {
inputs_[0] = value;
}
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
};
};
-class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 1> {
+class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
public:
- explicit LClampTaggedToUint8(LOperand* value, LOperand* temp) {
+ LClampTToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value;
temps_[0] = temp;
}
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
};
}
-void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) {
+void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
XMMRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result());
Register temp_reg = ToRegister(instr->TempAt(0));
}
-void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) {
+void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
ASSERT(instr->unclamped()->Equals(instr->result()));
Register input_reg = ToRegister(instr->unclamped());
Register temp_reg = ToRegister(instr->TempAt(0));
Representation input_rep = value->representation();
LOperand* reg = UseRegister(value);
if (input_rep.IsDouble()) {
- return DefineAsRegister(new LClampDoubleToUint8(reg,
- TempRegister()));
+ return DefineAsRegister(new LClampDToUint8(reg,
+ TempRegister()));
} else if (input_rep.IsInteger32()) {
return DefineSameAsFirst(new LClampIToUint8(reg));
} else {
ASSERT(input_rep.IsTagged());
// Register allocator doesn't (yet) support allocation of double
// temps. Reserve xmm1 explicitly.
- LClampTaggedToUint8* result = new LClampTaggedToUint8(reg,
- TempRegister(),
- FixedTemp(xmm1));
+ LClampTToUint8* result = new LClampTToUint8(reg,
+ TempRegister(),
+ FixedTemp(xmm1));
return AssignEnvironment(DefineSameAsFirst(result));
}
}
V(CheckNonSmi) \
V(CheckPrototypeMaps) \
V(CheckSmi) \
- V(ClampDoubleToUint8) \
+ V(ClampDToUint8) \
V(ClampIToUint8) \
- V(ClampTaggedToUint8) \
+ V(ClampTToUint8) \
V(ClassOfTest) \
V(ClassOfTestAndBranch) \
V(CmpID) \
};
-class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 1> {
+class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
public:
- explicit LClampDoubleToUint8(LOperand* value, LOperand* temp) {
+ LClampDToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value;
temps_[0] = temp;
}
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
};
};
-class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 2> {
+class LClampTToUint8: public LTemplateInstruction<1, 1, 2> {
public:
- explicit LClampTaggedToUint8(LOperand* value,
- LOperand* temp,
- LOperand* temp2) {
+ LClampTToUint8(LOperand* value,
+ LOperand* temp,
+ LOperand* temp2) {
inputs_[0] = value;
temps_[0] = temp;
temps_[1] = temp2;
LOperand* unclamped() { return inputs_[0]; }
- DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8")
+ DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
};