Backed out 2 changesets (bug 1229604) for Spidermonkey bustage on Windows and static failures. r=backout

Backed out changeset 0cb584405271 (bug 1229604)
Backed out changeset d4053d8be57b (bug 1229604)
This commit is contained in:
Sebastian Hengst 2015-12-05 22:33:18 +01:00
parent 4d0c1bf1a0
commit 134244b2ae
5 changed files with 16 additions and 34 deletions

View File

@ -36,12 +36,6 @@ struct Register {
typedef Codes::SetType SetType;
Codes::Encoding reg_;
MOZ_CONSTEXPR Register()
: reg_(Encoding(0))
{ }
MOZ_CONSTEXPR Register(Encoding r)
: reg_(r)
{ }
static Register FromCode(Code i) {
MOZ_ASSERT(i < Registers::Total);
Register r = { Encoding(i) };

View File

@ -298,7 +298,7 @@ RValueAllocation::readPayload(CompactBufferReader& reader, PayloadType type,
p->stackOffset = reader.readSigned();
break;
case PAYLOAD_GPR:
p->gpr.data = reader.readByte();
p->gpr = Register::FromCode(reader.readByte());
break;
case PAYLOAD_FPU:
p->fpu.data = reader.readByte();

View File

@ -121,24 +121,10 @@ class RValueAllocation
}
};
struct RegisterBits {
uint32_t data;
bool operator == (const RegisterBits& other) const {
return data == other.data;
}
uint32_t code() const {
return data;
}
const char* name() const {
Register tmp = Register::FromCode(data);
return tmp.name();
}
};
union Payload {
uint32_t index;
int32_t stackOffset;
RegisterBits gpr;
Register gpr;
FloatRegisterBits fpu;
JSValueType type;
};
@ -158,9 +144,7 @@ class RValueAllocation
}
static Payload payloadOfRegister(Register reg) {
Payload p;
RegisterBits b;
b.data = reg.code();
p.gpr = b;
p.gpr = reg;
return p;
}
static Payload payloadOfFloatRegister(FloatRegister reg) {
@ -326,8 +310,7 @@ class RValueAllocation
}
Register reg() const {
MOZ_ASSERT(layoutFromMode(mode()).type1 == PAYLOAD_GPR);
RegisterBits b = arg1_.gpr;
return Register::FromCode(b.data);
return arg1_.gpr;
}
FloatRegister fpuReg() const {
MOZ_ASSERT(layoutFromMode(mode()).type1 == PAYLOAD_FPU);
@ -349,8 +332,7 @@ class RValueAllocation
}
Register reg2() const {
MOZ_ASSERT(layoutFromMode(mode()).type2 == PAYLOAD_GPR);
RegisterBits b = arg2_.gpr;
return Register::FromCode(b.data);
return arg2_.gpr;
}
public:

View File

@ -106,9 +106,11 @@ static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rdx;
static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r8;
static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r9;
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 4;
static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
// of VS2015 Update 1. See bug 1229604.
static const Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
static const Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
@ -126,9 +128,11 @@ static MOZ_CONSTEXPR_VAR Register IntArgReg3 = rcx;
static MOZ_CONSTEXPR_VAR Register IntArgReg4 = r8;
static MOZ_CONSTEXPR_VAR Register IntArgReg5 = r9;
static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 6;
static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
static const Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rbx };
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
// of VS2015 Update 1. See bug 1229604.
static const Register CallTempNonArgRegs[] = { rax, rbx };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);

View File

@ -61,7 +61,9 @@ static MOZ_CONSTEXPR_VAR Register CallTempReg4 = esi;
static MOZ_CONSTEXPR_VAR Register CallTempReg5 = edx;
// We have no arg regs, so our NonArgRegs are just our CallTempReg*
static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
// of VS2015 Update 1. See bug 1229604.
static const Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);