Commit 99c0758a authored by Ryan VanderMeulen's avatar Ryan VanderMeulen
Browse files

Backed out changeset e11e53daf76d (bug 1692972) for bustage.

parent 502e58e6
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -61,13 +61,6 @@ void CodeGenerator::visitBox(LBox* box) {
  ValueOperand result = ToOutValue(box);

  masm.moveValue(TypedOrValueRegister(box->type(), ToAnyRegister(in)), result);

  if (JitOptions.spectreValueMasking && IsFloatingPointType(box->type())) {
    ScratchRegisterScope scratch(masm);
    masm.movePtr(ImmWord(JSVAL_SHIFTED_TAG_MAX_DOUBLE), scratch);
    masm.cmpPtrMovePtr(Assembler::Below, scratch, result.valueReg(), scratch,
                       result.valueReg());
  }
}

void CodeGenerator::visitUnbox(LUnbox* unbox) {
+0 −7
Original line number Diff line number Diff line
@@ -91,13 +91,6 @@ void CodeGenerator::visitBoxFloatingPoint(LBoxFloatingPoint* box) {
  const ValueOperand out = ToOutValue(box);

  masm.moveValue(TypedOrValueRegister(box->type(), in), out);

  if (JitOptions.spectreValueMasking) {
    Register scratch = ToRegister(box->spectreTemp());
    masm.move32(Imm32(JSVAL_TAG_CLEAR), scratch);
    masm.cmp32Move32(Assembler::Below, scratch, out.typeReg(), scratch,
                     out.typeReg());
  }
}

void CodeGenerator::visitUnbox(LUnbox* unbox) {
+2 −5
Original line number Diff line number Diff line
@@ -10,23 +10,20 @@
namespace js {
namespace jit {

class LBoxFloatingPoint : public LInstructionHelper<2, 1, 2> {
class LBoxFloatingPoint : public LInstructionHelper<2, 1, 1> {
  MIRType type_;

 public:
  LIR_HEADER(BoxFloatingPoint);

  LBoxFloatingPoint(const LAllocation& in, const LDefinition& temp,
                    const LDefinition& spectreTemp, MIRType type)
                    MIRType type)
      : LInstructionHelper(classOpcode), type_(type) {
    MOZ_ASSERT(IsFloatingPointType(type));
    setOperand(0, in);
    setTemp(0, temp);
    setTemp(1, spectreTemp);
  }

  const LDefinition* spectreTemp() { return getTemp(1); }

  MIRType type() const { return type_; }
  const char* extraName() const { return StringFromMIRType(type_); }
};
+2 −5
Original line number Diff line number Diff line
@@ -45,11 +45,8 @@ void LIRGenerator::visitBox(MBox* box) {

  // If the box wrapped a double, it needs a new register.
  if (IsFloatingPointType(inner->type())) {
    LDefinition spectreTemp =
        JitOptions.spectreValueMasking ? temp() : LDefinition::BogusTemp();
    defineBox(new (alloc()) LBoxFloatingPoint(useRegisterAtStart(inner),
                                              tempCopy(inner, 0), spectreTemp,
                                              inner->type()),
    defineBox(new (alloc()) LBoxFloatingPoint(
                  useRegisterAtStart(inner), tempCopy(inner, 0), inner->type()),
              box);
    return;
  }