Chromium Code Reviews| Index: src/arm/lithium-arm.cc |
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
| index af01c296b12895ebe4f91d205f47f4b1f51aa501..e3b512afbaa0f368e3fcff5ac07c3240f6cf22cd 100644 |
| --- a/src/arm/lithium-arm.cc |
| +++ b/src/arm/lithium-arm.cc |
| @@ -1751,6 +1751,22 @@ LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) { |
| } |
| +LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) { |
| + HValue* value = instr->value(); |
| + Representation rep = value->representation(); |
|
Kevin Millikin (Chromium)
2011/05/16 07:06:35
Can we rename this to input_rep and assert that in
danno
2011/05/16 14:13:43
Done.
|
| + LOperand* reg = UseRegister(value); |
| + if (rep.IsDouble()) { |
| + return DefineAsRegister(new LClampDoubleToUint8(reg, FixedTemp(d1))); |
|
Kevin Millikin (Chromium)
2011/05/16 07:06:35
Probably needs a comment that the fixed register i
danno
2011/05/16 14:13:43
Done.
|
| + } else if (rep.IsInteger32()) { |
| + return DefineAsRegister(new LClampIToUint8(reg)); |
| + } else { |
| + ASSERT(rep.IsTagged()); |
| + LClampTaggedToUint8* result = new LClampTaggedToUint8(reg, FixedTemp(d1)); |
| + return AssignEnvironment(DefineAsRegister(result)); |
| + } |
| +} |
| + |
| + |
| LInstruction* LChunkBuilder::DoReturn(HReturn* instr) { |
| return new LReturn(UseFixed(instr->value(), r0)); |
| } |