mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset f95c21f4dd50 (bug 1245112)
This commit is contained in:
parent
0571f8ea06
commit
8d50f2cc1d
@ -798,13 +798,6 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||||||
|
|
||||||
inline void rshift64(Imm32 imm, Register64 dest) PER_ARCH;
|
inline void rshift64(Imm32 imm, Register64 dest) PER_ARCH;
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
// This function compares a Value (lhs) which is having a private pointer
|
|
||||||
// boxed inside a js::Value, with a raw pointer (rhs).
|
|
||||||
inline void branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label) PER_ARCH;
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -390,15 +390,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
as_mov(dest.high, lsr(dest.high, imm.value));
|
as_mov(dest.high, lsr(dest.high, imm.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
branchPtr(cond, lhs, rhs, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -822,6 +822,18 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||||||
branch32(cond, lhs, rhs, label);
|
branch32(cond, lhs, rhs, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, Register ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Register lhs, ImmWord ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void branchTestDouble(Condition cond, const T & t, Label* label) {
|
void branchTestDouble(Condition cond, const T & t, Label* label) {
|
||||||
Condition c = testDouble(cond, t);
|
Condition c = testDouble(cond, t);
|
||||||
|
@ -435,21 +435,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
rshiftPtr(imm, dest.reg);
|
rshiftPtr(imm, dest.reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
vixl::UseScratchRegisterScope temps(this);
|
|
||||||
const Register scratch = temps.AcquireX().asUnsized();
|
|
||||||
if (rhs != scratch)
|
|
||||||
movePtr(rhs, scratch);
|
|
||||||
// Instead of unboxing lhs, box rhs and do direct comparison with lhs.
|
|
||||||
rshiftPtr(Imm32(1), scratch);
|
|
||||||
branchPtr(cond, lhs, scratch, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -1593,6 +1593,17 @@ class MacroAssemblerCompat : public vixl::MacroAssembler
|
|||||||
loadPtr(lhs, scratch);
|
loadPtr(lhs, scratch);
|
||||||
branchTestPtr(cond, scratch, imm, label);
|
branchTestPtr(cond, scratch, imm, label);
|
||||||
}
|
}
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, Register ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Register lhs, ImmWord ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label) {
|
void decBranchPtr(Condition cond, Register lhs, Imm32 imm, Label* label) {
|
||||||
Subs(ARMRegister(lhs, 64), ARMRegister(lhs, 64), Operand(imm.value));
|
Subs(ARMRegister(lhs, 64), ARMRegister(lhs, 64), Operand(imm.value));
|
||||||
|
@ -236,15 +236,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
as_srl(dest.high, dest.high, imm.value);
|
as_srl(dest.high, dest.high, imm.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
branchPtr(cond, lhs, rhs, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -420,6 +420,18 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
|
|||||||
ma_b(SecondScratchReg, rhs, label, cond);
|
ma_b(SecondScratchReg, rhs, label, cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, Register ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Register lhs, ImmWord ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
void branchTestDouble(Condition cond, const ValueOperand& value, Label* label);
|
void branchTestDouble(Condition cond, const ValueOperand& value, Label* label);
|
||||||
void branchTestDouble(Condition cond, Register tag, Label* label);
|
void branchTestDouble(Condition cond, Register tag, Label* label);
|
||||||
void branchTestDouble(Condition cond, const Address& address, Label* label);
|
void branchTestDouble(Condition cond, const Address& address, Label* label);
|
||||||
|
@ -177,19 +177,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
ma_dsrl(dest.reg, dest.reg, imm);
|
ma_dsrl(dest.reg, dest.reg, imm);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
if (rhs != ScratchRegister)
|
|
||||||
movePtr(rhs, ScratchRegister);
|
|
||||||
// Instead of unboxing lhs, box rhs and do direct comparison with lhs.
|
|
||||||
rshiftPtr(Imm32(1), ScratchRegister);
|
|
||||||
branchPtr(cond, lhs, ScratchRegister, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -461,6 +461,18 @@ class MacroAssemblerMIPS64Compat : public MacroAssemblerMIPS64
|
|||||||
ma_b(SecondScratchReg, rhs, label, cond);
|
ma_b(SecondScratchReg, rhs, label, cond);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, Register ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Register lhs, ImmWord ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
void branchTestDouble(Condition cond, const ValueOperand& value, Label* label);
|
void branchTestDouble(Condition cond, const ValueOperand& value, Label* label);
|
||||||
void branchTestDouble(Condition cond, Register tag, Label* label);
|
void branchTestDouble(Condition cond, Register tag, Label* label);
|
||||||
void branchTestDouble(Condition cond, const Address& address, Label* label);
|
void branchTestDouble(Condition cond, const Address& address, Label* label);
|
||||||
|
@ -252,6 +252,7 @@ class MacroAssemblerNone : public Assembler
|
|||||||
template <typename T, typename S> void branchTestPtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
template <typename T, typename S> void branchTestPtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||||
template <typename T, typename S> void branchDouble(DoubleCondition, T, S, Label*) { MOZ_CRASH(); }
|
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 branchFloat(DoubleCondition, T, S, Label*) { MOZ_CRASH(); }
|
||||||
|
template <typename T, typename S> void branchPrivatePtr(Condition, T, S, Label*) { MOZ_CRASH(); }
|
||||||
template <typename T, typename S> void decBranchPtr(Condition, 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 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 mov(T, S) { MOZ_CRASH(); }
|
||||||
|
@ -219,20 +219,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
shrq(imm, dest.reg);
|
shrq(imm, dest.reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
ScratchRegisterScope scratch(*this);
|
|
||||||
if (rhs != scratch)
|
|
||||||
movePtr(rhs, scratch);
|
|
||||||
// Instead of unboxing lhs, box rhs and do direct comparison with lhs.
|
|
||||||
rshiftPtr(Imm32(1), scratch);
|
|
||||||
branchPtr(cond, lhs, scratch, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -120,6 +120,16 @@ MacroAssemblerX64::finish()
|
|||||||
MacroAssemblerX86Shared::finish();
|
MacroAssemblerX86Shared::finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
MacroAssemblerX64::branchPrivatePtr(Condition cond, Address lhs, Register ptr, Label* label)
|
||||||
|
{
|
||||||
|
ScratchRegisterScope scratch(asMasm());
|
||||||
|
if (ptr != scratch)
|
||||||
|
movePtr(ptr, scratch);
|
||||||
|
asMasm().rshiftPtr(Imm32(1), scratch);
|
||||||
|
branchPtr(cond, lhs, scratch, label);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerX64::handleFailureWithHandlerTail(void* handler)
|
MacroAssemblerX64::handleFailureWithHandlerTail(void* handler)
|
||||||
{
|
{
|
||||||
|
@ -604,6 +604,11 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||||||
branchPtr(cond, Operand(scratch, 0x0), ptr, label);
|
branchPtr(cond, Operand(scratch, 0x0), ptr, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Address lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ImmWord(uintptr_t(ptr.value) >> 1), label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, Address lhs, Register ptr, Label* label);
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
void branchPtr(Condition cond, const T& lhs, const S& ptr, Label* label) {
|
void branchPtr(Condition cond, const T& lhs, const S& ptr, Label* label) {
|
||||||
cmpPtr(Operand(lhs), ptr);
|
cmpPtr(Operand(lhs), ptr);
|
||||||
|
@ -255,15 +255,6 @@ MacroAssembler::rshift64(Imm32 imm, Register64 dest)
|
|||||||
shrl(imm, dest.high);
|
shrl(imm, dest.high);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===============================================================
|
|
||||||
// Branch functions
|
|
||||||
|
|
||||||
void
|
|
||||||
MacroAssembler::branchPrivatePtr(Condition cond, const Address& lhs, Register rhs, Label* label)
|
|
||||||
{
|
|
||||||
branchPtr(cond, lhs, rhs, label);
|
|
||||||
}
|
|
||||||
|
|
||||||
//}}} check_macroassembler_style
|
//}}} check_macroassembler_style
|
||||||
// ===============================================================
|
// ===============================================================
|
||||||
|
|
||||||
|
@ -594,6 +594,14 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
|||||||
j(cond, label);
|
j(cond, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, ImmPtr ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void branchPrivatePtr(Condition cond, const Address& lhs, Register ptr, Label* label) {
|
||||||
|
branchPtr(cond, lhs, ptr, label);
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, typename S>
|
template <typename T, typename S>
|
||||||
void branchPtr(Condition cond, T lhs, S ptr, RepatchLabel* label) {
|
void branchPtr(Condition cond, T lhs, S ptr, RepatchLabel* label) {
|
||||||
cmpPtr(Operand(lhs), ptr);
|
cmpPtr(Operand(lhs), ptr);
|
||||||
|
Loading…
Reference in New Issue
Block a user