mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backed out changeset db95ea81a22c (bug 1245112)
This commit is contained in:
parent
d44a3eece6
commit
56fa7909f5
@ -841,9 +841,6 @@ class MacroAssembler : public MacroAssemblerSpecific
|
||||
// boxed inside a js::Value, with a raw pointer (rhs).
|
||||
inline void branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label) PER_ARCH;
|
||||
|
||||
inline void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label) PER_ARCH;
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
public:
|
||||
|
||||
|
@ -575,20 +575,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, rhs, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
ma_orr(lhs.low, lhs.high, ScratchRegister);
|
||||
branchTestPtr(cond, ScratchRegister, ScratchRegister, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -3235,6 +3235,22 @@ template void
|
||||
MacroAssemblerARMCompat::storeUnboxedValue(ConstantOrRegister value, MIRType valueType,
|
||||
const BaseIndex& dest, MIRType slotType);
|
||||
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::branchTest64(Condition cond, Register64 lhs, Register64 rhs,
|
||||
Register temp, Label* label)
|
||||
{
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
mov(lhs.low, ScratchRegister);
|
||||
asMasm().or32(lhs.high, ScratchRegister);
|
||||
branchTestPtr(cond, ScratchRegister, ScratchRegister, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::moveValue(const Value& val, Register type, Register data)
|
||||
{
|
||||
|
@ -878,6 +878,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
ma_sub(imm, lhs, SetCC);
|
||||
as_b(label, cond);
|
||||
}
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp, Label* label);
|
||||
void moveValue(const Value& val, Register type, Register data);
|
||||
|
||||
CodeOffsetJump jumpWithPatch(RepatchLabel* label, Condition cond = Always,
|
||||
|
@ -652,13 +652,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, scratch, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -1641,6 +1641,9 @@ class MacroAssemblerCompat : public vixl::MacroAssembler
|
||||
Cmp(ARMRegister(value.valueReg(), 64), Operand(scratch64));
|
||||
B(label, cond);
|
||||
}
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp, Label* label) {
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
|
||||
void compareDouble(DoubleCondition cond, FloatRegister lhs, FloatRegister rhs) {
|
||||
Fcmp(ARMFPRegister(lhs, 64), ARMFPRegister(rhs, 64));
|
||||
|
@ -245,20 +245,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, rhs, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
as_or(ScratchRegister, lhs.low, lhs.high);
|
||||
branchTestPtr(cond, ScratchRegister, ScratchRegister, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -1731,6 +1731,20 @@ MacroAssemblerMIPSCompat::branchTestBooleanTruthy(bool b, const ValueOperand& op
|
||||
ma_b(operand.payloadReg(), operand.payloadReg(), label, b ? NonZero : Zero);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::branchTest64(Condition cond, Register64 lhs, Register64 rhs,
|
||||
Register temp, Label* label)
|
||||
{
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
as_or(ScratchRegister, lhs.low, lhs.high);
|
||||
branchTestPtr(cond, ScratchRegister, ScratchRegister, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
Register
|
||||
MacroAssemblerMIPSCompat::extractObject(const Address& address, Register scratch)
|
||||
{
|
||||
|
@ -475,6 +475,8 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
|
||||
loadPtr(lhs, SecondScratchReg);
|
||||
branchTestPtr(cond, SecondScratchReg, imm, label);
|
||||
}
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label);
|
||||
inline void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label);
|
||||
|
||||
// higher level tag testing code
|
||||
|
@ -190,13 +190,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, ScratchRegister, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -516,6 +516,10 @@ class MacroAssemblerMIPS64Compat : public MacroAssemblerMIPS64
|
||||
loadPtr(lhs, SecondScratchReg);
|
||||
branchTestPtr(cond, SecondScratchReg, imm, label);
|
||||
}
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label) {
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
inline void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label);
|
||||
|
||||
// higher level tag testing code
|
||||
|
@ -251,6 +251,7 @@ class MacroAssemblerNone : public Assembler
|
||||
template <typename T, typename S> void branchDouble(DoubleCondition, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void branchFloat(DoubleCondition, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void decBranchPtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void branchTest64(Condition, T, T, S, Label*) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void mov(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void movq(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void movePtr(T, S) { MOZ_CRASH(); }
|
||||
|
@ -298,13 +298,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, scratch, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -579,6 +579,10 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
||||
j(cond, label);
|
||||
}
|
||||
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp, Label* label) {
|
||||
branchTestPtr(cond, lhs.reg, rhs.reg, label);
|
||||
}
|
||||
|
||||
void movePtr(Register src, Register dest) {
|
||||
movq(src, dest);
|
||||
}
|
||||
|
@ -304,21 +304,6 @@ MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rh
|
||||
branchPtr(cond, lhs, rhs, label);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp,
|
||||
Label* label)
|
||||
{
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
movl(lhs.low, temp);
|
||||
orl(lhs.high, temp);
|
||||
branchTestPtr(cond, temp, temp, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
@ -607,6 +607,18 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
||||
j(cond, label);
|
||||
}
|
||||
|
||||
void branchTest64(Condition cond, Register64 lhs, Register64 rhs, Register temp, Label* label) {
|
||||
if (cond == Assembler::Zero) {
|
||||
MOZ_ASSERT(lhs.low == rhs.low);
|
||||
MOZ_ASSERT(lhs.high == rhs.high);
|
||||
movl(lhs.low, temp);
|
||||
orl(lhs.high, temp);
|
||||
branchTestPtr(cond, temp, temp, label);
|
||||
} else {
|
||||
MOZ_CRASH("Unsupported condition");
|
||||
}
|
||||
}
|
||||
|
||||
void movePtr(ImmWord imm, Register dest) {
|
||||
movl(Imm32(imm.value), dest);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user