Bug 1129088 - IonMonkey: Revert bug 1100685 and add a comment r=jandem

This commit is contained in:
Dan Gohman 2015-02-06 15:30:25 -08:00
parent 92dad06559
commit a98be558ff
2 changed files with 6 additions and 3 deletions

View File

@ -5029,13 +5029,14 @@ class LClampIToUint8 : public LInstructionHelper<1, 1, 0>
}
};
class LClampDToUint8 : public LInstructionHelper<1, 1, 0>
class LClampDToUint8 : public LInstructionHelper<1, 1, 1>
{
public:
LIR_HEADER(ClampDToUint8)
explicit LClampDToUint8(const LAllocation &in) {
LClampDToUint8(const LAllocation &in, const LDefinition &temp) {
setOperand(0, in);
setTemp(0, temp);
}
};

View File

@ -2896,7 +2896,9 @@ LIRGenerator::visitClampToUint8(MClampToUint8 *ins)
break;
case MIRType_Double:
define(new(alloc()) LClampDToUint8(useRegisterAtStart(in)), ins);
// LClampDToUint8 clobbers its input register. Making it available as
// a temp copy describes this behavior to the register allocator.
define(new(alloc()) LClampDToUint8(useRegisterAtStart(in), tempCopy(in, 0)), ins);
break;
case MIRType_Value: