Commit 7185ec6c authored by danno@chromium.org's avatar danno@chromium.org

Remaining (forgotten) feedback for pixel array deopt fix

TBR=kmillikin@chromium.org
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/7019008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7903 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 05fd779d
...@@ -1756,14 +1756,14 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { ...@@ -1756,14 +1756,14 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
Representation input_rep = value->representation(); Representation input_rep = value->representation();
LOperand* reg = UseRegister(value); LOperand* reg = UseRegister(value);
if (input_rep.IsDouble()) { if (input_rep.IsDouble()) {
return DefineAsRegister(new LClampDoubleToUint8(reg, FixedTemp(d1))); return DefineAsRegister(new LClampDToUint8(reg, FixedTemp(d1)));
} else if (input_rep.IsInteger32()) { } else if (input_rep.IsInteger32()) {
return DefineAsRegister(new LClampIToUint8(reg)); return DefineAsRegister(new LClampIToUint8(reg));
} else { } else {
ASSERT(input_rep.IsTagged()); ASSERT(input_rep.IsTagged());
// Register allocator doesn't (yet) support allocation of double // Register allocator doesn't (yet) support allocation of double
// temps. Reserve d1 explicitly. // temps. Reserve d1 explicitly.
LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, FixedTemp(d1)); LClampTToUint8* result = new LClampTToUint8(reg, FixedTemp(d1));
return AssignEnvironment(DefineAsRegister(result)); return AssignEnvironment(DefineAsRegister(result));
} }
} }
......
...@@ -73,9 +73,9 @@ class LCodeGen; ...@@ -73,9 +73,9 @@ class LCodeGen;
V(CheckMap) \ V(CheckMap) \
V(CheckPrototypeMaps) \ V(CheckPrototypeMaps) \
V(CheckSmi) \ V(CheckSmi) \
V(ClampDoubleToUint8) \ V(ClampDToUint8) \
V(ClampIToUint8) \ V(ClampIToUint8) \
V(ClampTaggedToUint8) \ V(ClampTToUint8) \
V(ClassOfTest) \ V(ClassOfTest) \
V(ClassOfTestAndBranch) \ V(ClassOfTestAndBranch) \
V(CmpID) \ V(CmpID) \
...@@ -1930,16 +1930,16 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { ...@@ -1930,16 +1930,16 @@ class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
}; };
class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 1> { class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
public: public:
explicit LClampDoubleToUint8(LOperand* value, LOperand* temp) { LClampDToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value; inputs_[0] = value;
temps_[0] = temp; temps_[0] = temp;
} }
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
}; };
...@@ -1955,16 +1955,16 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { ...@@ -1955,16 +1955,16 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> {
}; };
class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 1> { class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
public: public:
explicit LClampTaggedToUint8(LOperand* value, LOperand* temp) { LClampTToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value; inputs_[0] = value;
temps_[0] = temp; temps_[0] = temp;
} }
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
}; };
......
...@@ -4011,7 +4011,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) { ...@@ -4011,7 +4011,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) {
} }
void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) { void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
DoubleRegister value_reg = ToDoubleRegister(instr->unclamped()); DoubleRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result()); Register result_reg = ToRegister(instr->result());
DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0)); DoubleRegister temp_reg = ToDoubleRegister(instr->TempAt(0));
...@@ -4026,7 +4026,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { ...@@ -4026,7 +4026,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) {
} }
void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) { void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
Register scratch = scratch0(); Register scratch = scratch0();
Register input_reg = ToRegister(instr->unclamped()); Register input_reg = ToRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result()); Register result_reg = ToRegister(instr->result());
......
...@@ -3951,7 +3951,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) { ...@@ -3951,7 +3951,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) {
} }
void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) { void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
XMMRegister value_reg = ToDoubleRegister(instr->unclamped()); XMMRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result()); Register result_reg = ToRegister(instr->result());
__ ClampDoubleToUint8(value_reg, xmm0, result_reg); __ ClampDoubleToUint8(value_reg, xmm0, result_reg);
...@@ -3965,7 +3965,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { ...@@ -3965,7 +3965,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) {
} }
void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) { void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
ASSERT(instr->unclamped()->Equals(instr->result())); ASSERT(instr->unclamped()->Equals(instr->result()));
Register input_reg = ToRegister(instr->unclamped()); Register input_reg = ToRegister(instr->unclamped());
Label is_smi, done, heap_number; Label is_smi, done, heap_number;
......
...@@ -1783,7 +1783,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { ...@@ -1783,7 +1783,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
Representation input_rep = value->representation(); Representation input_rep = value->representation();
if (input_rep.IsDouble()) { if (input_rep.IsDouble()) {
LOperand* reg = UseRegister(value); LOperand* reg = UseRegister(value);
return DefineAsRegister(new LClampDoubleToUint8(reg)); return DefineAsRegister(new LClampDToUint8(reg));
} else if (input_rep.IsInteger32()) { } else if (input_rep.IsInteger32()) {
LOperand* reg = UseFixed(value, eax); LOperand* reg = UseFixed(value, eax);
return DefineFixed(new LClampIToUint8(reg), eax); return DefineFixed(new LClampIToUint8(reg), eax);
...@@ -1793,7 +1793,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { ...@@ -1793,7 +1793,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
// Register allocator doesn't (yet) support allocation of double // Register allocator doesn't (yet) support allocation of double
// temps. Reserve xmm1 explicitly. // temps. Reserve xmm1 explicitly.
LOperand* temp = FixedTemp(xmm1); LOperand* temp = FixedTemp(xmm1);
LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, temp); LClampTToUint8* result = new LClampTToUint8(reg, temp);
return AssignEnvironment(DefineFixed(result, eax)); return AssignEnvironment(DefineFixed(result, eax));
} }
} }
......
...@@ -67,9 +67,9 @@ class LCodeGen; ...@@ -67,9 +67,9 @@ class LCodeGen;
V(CheckNonSmi) \ V(CheckNonSmi) \
V(CheckPrototypeMaps) \ V(CheckPrototypeMaps) \
V(CheckSmi) \ V(CheckSmi) \
V(ClampDoubleToUint8) \ V(ClampDToUint8) \
V(ClampIToUint8) \ V(ClampIToUint8) \
V(ClampTaggedToUint8) \ V(ClampTToUint8) \
V(ClassOfTest) \ V(ClassOfTest) \
V(ClassOfTestAndBranch) \ V(ClassOfTestAndBranch) \
V(CmpID) \ V(CmpID) \
...@@ -1977,15 +1977,15 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> { ...@@ -1977,15 +1977,15 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
}; };
class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 0> { class LClampDToUint8: public LTemplateInstruction<1, 1, 0> {
public: public:
explicit LClampDoubleToUint8(LOperand* value) { explicit LClampDToUint8(LOperand* value) {
inputs_[0] = value; inputs_[0] = value;
} }
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
}; };
...@@ -2001,16 +2001,16 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { ...@@ -2001,16 +2001,16 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> {
}; };
class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 1> { class LClampTToUint8: public LTemplateInstruction<1, 1, 1> {
public: public:
explicit LClampTaggedToUint8(LOperand* value, LOperand* temp) { LClampTToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value; inputs_[0] = value;
temps_[0] = temp; temps_[0] = temp;
} }
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
}; };
......
...@@ -3775,7 +3775,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) { ...@@ -3775,7 +3775,7 @@ void LCodeGen::DoCheckMap(LCheckMap* instr) {
} }
void LCodeGen::DoClampDoubleToUint8(LClampDoubleToUint8* instr) { void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
XMMRegister value_reg = ToDoubleRegister(instr->unclamped()); XMMRegister value_reg = ToDoubleRegister(instr->unclamped());
Register result_reg = ToRegister(instr->result()); Register result_reg = ToRegister(instr->result());
Register temp_reg = ToRegister(instr->TempAt(0)); Register temp_reg = ToRegister(instr->TempAt(0));
...@@ -3790,7 +3790,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) { ...@@ -3790,7 +3790,7 @@ void LCodeGen::DoClampIToUint8(LClampIToUint8* instr) {
} }
void LCodeGen::DoClampTaggedToUint8(LClampTaggedToUint8* instr) { void LCodeGen::DoClampTToUint8(LClampTToUint8* instr) {
ASSERT(instr->unclamped()->Equals(instr->result())); ASSERT(instr->unclamped()->Equals(instr->result()));
Register input_reg = ToRegister(instr->unclamped()); Register input_reg = ToRegister(instr->unclamped());
Register temp_reg = ToRegister(instr->TempAt(0)); Register temp_reg = ToRegister(instr->TempAt(0));
......
...@@ -1747,7 +1747,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { ...@@ -1747,7 +1747,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
Representation input_rep = value->representation(); Representation input_rep = value->representation();
LOperand* reg = UseRegister(value); LOperand* reg = UseRegister(value);
if (input_rep.IsDouble()) { if (input_rep.IsDouble()) {
return DefineAsRegister(new LClampDoubleToUint8(reg, return DefineAsRegister(new LClampDToUint8(reg,
TempRegister())); TempRegister()));
} else if (input_rep.IsInteger32()) { } else if (input_rep.IsInteger32()) {
return DefineSameAsFirst(new LClampIToUint8(reg)); return DefineSameAsFirst(new LClampIToUint8(reg));
...@@ -1755,7 +1755,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { ...@@ -1755,7 +1755,7 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
ASSERT(input_rep.IsTagged()); ASSERT(input_rep.IsTagged());
// Register allocator doesn't (yet) support allocation of double // Register allocator doesn't (yet) support allocation of double
// temps. Reserve xmm1 explicitly. // temps. Reserve xmm1 explicitly.
LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, LClampTToUint8* result = new LClampTToUint8(reg,
TempRegister(), TempRegister(),
FixedTemp(xmm1)); FixedTemp(xmm1));
return AssignEnvironment(DefineSameAsFirst(result)); return AssignEnvironment(DefineSameAsFirst(result));
......
...@@ -73,9 +73,9 @@ class LCodeGen; ...@@ -73,9 +73,9 @@ class LCodeGen;
V(CheckNonSmi) \ V(CheckNonSmi) \
V(CheckPrototypeMaps) \ V(CheckPrototypeMaps) \
V(CheckSmi) \ V(CheckSmi) \
V(ClampDoubleToUint8) \ V(ClampDToUint8) \
V(ClampIToUint8) \ V(ClampIToUint8) \
V(ClampTaggedToUint8) \ V(ClampTToUint8) \
V(ClassOfTest) \ V(ClassOfTest) \
V(ClassOfTestAndBranch) \ V(ClassOfTestAndBranch) \
V(CmpID) \ V(CmpID) \
...@@ -1910,16 +1910,16 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> { ...@@ -1910,16 +1910,16 @@ class LCheckSmi: public LTemplateInstruction<0, 1, 0> {
}; };
class LClampDoubleToUint8: public LTemplateInstruction<1, 1, 1> { class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
public: public:
explicit LClampDoubleToUint8(LOperand* value, LOperand* temp) { LClampDToUint8(LOperand* value, LOperand* temp) {
inputs_[0] = value; inputs_[0] = value;
temps_[0] = temp; temps_[0] = temp;
} }
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampDoubleToUint8, "clamp-d-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampDToUint8, "clamp-d-to-uint8")
}; };
...@@ -1935,9 +1935,9 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> { ...@@ -1935,9 +1935,9 @@ class LClampIToUint8: public LTemplateInstruction<1, 1, 0> {
}; };
class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 2> { class LClampTToUint8: public LTemplateInstruction<1, 1, 2> {
public: public:
explicit LClampTaggedToUint8(LOperand* value, LClampTToUint8(LOperand* value,
LOperand* temp, LOperand* temp,
LOperand* temp2) { LOperand* temp2) {
inputs_[0] = value; inputs_[0] = value;
...@@ -1947,7 +1947,7 @@ class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 2> { ...@@ -1947,7 +1947,7 @@ class LClampTaggedToUint8: public LTemplateInstruction<1, 1, 2> {
LOperand* unclamped() { return inputs_[0]; } LOperand* unclamped() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(ClampTaggedToUint8, "clamp-t-to-uint8") DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment