зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1199719 part 4 - Move MacroAssembler::or32 into the generic macro assembler. r=hev
This commit is contained in:
Родитель
fa05442ddf
Коммит
ecf6576784
|
@ -678,6 +678,10 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
inline void andPtr(Register src, Register dest) PER_ARCH;
|
||||
inline void andPtr(Imm32 imm, Register dest) PER_ARCH;
|
||||
|
||||
inline void or32(Register src, Register dest) PER_SHARED_ARCH;
|
||||
inline void or32(Imm32 imm, Register dest) PER_SHARED_ARCH;
|
||||
inline void or32(Imm32 imm, const Address& dest) PER_SHARED_ARCH;
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
public:
|
||||
|
||||
|
|
|
@ -57,6 +57,27 @@ MacroAssembler::andPtr(Imm32 imm, Register dest)
|
|||
ma_and(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Register src, Register dest)
|
||||
{
|
||||
ma_orr(src, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_orr(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
ScratchRegisterScope scratch(*this);
|
||||
load32(dest, scratch);
|
||||
ma_orr(imm, scratch);
|
||||
store32(scratch, dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1959,27 +1959,6 @@ MacroAssemblerARMCompat::not32(Register reg)
|
|||
ma_mvn(reg, reg);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
ScratchRegisterScope scratch(asMasm());
|
||||
load32(dest, scratch);
|
||||
ma_orr(imm, scratch);
|
||||
store32(scratch, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_orr(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::or32(Register src, Register dest)
|
||||
{
|
||||
ma_orr(src, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::xorPtr(Imm32 imm, Register dest)
|
||||
{
|
||||
|
|
|
@ -1202,9 +1202,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
}
|
||||
void xor32(Imm32 imm, Register dest);
|
||||
|
||||
void or32(Register src, Register dest);
|
||||
void or32(Imm32 imm, Register dest);
|
||||
void or32(Imm32 imm, const Address& dest);
|
||||
void xorPtr(Imm32 imm, Register dest);
|
||||
void xorPtr(Register src, Register dest);
|
||||
void orPtr(Imm32 imm, Register dest);
|
||||
|
|
|
@ -67,6 +67,29 @@ MacroAssembler::andPtr(Imm32 imm, Register dest)
|
|||
And(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(imm.value));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
Orr(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(imm.value));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Register src, Register dest)
|
||||
{
|
||||
Orr(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(ARMRegister(src, 32)));
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const ARMRegister scratch32 = temps.AcquireW();
|
||||
MOZ_ASSERT(scratch32.asUnsized() != dest.base);
|
||||
load32(dest, scratch32.asUnsized());
|
||||
Orr(scratch32, scratch32, Operand(imm.value));
|
||||
store32(scratch32.asUnsized(), dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1097,20 +1097,6 @@ class MacroAssemblerCompat : public vixl::MacroAssembler
|
|||
void orPtr(Register src, Register dest) {
|
||||
Orr(ARMRegister(dest, 64), ARMRegister(dest, 64), Operand(ARMRegister(src, 64)));
|
||||
}
|
||||
void or32(Imm32 imm, Register dest) {
|
||||
Orr(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(imm.value));
|
||||
}
|
||||
void or32(Register src, Register dest) {
|
||||
Orr(ARMRegister(dest, 32), ARMRegister(dest, 32), Operand(ARMRegister(src, 32)));
|
||||
}
|
||||
void or32(Imm32 imm, const Address& dest) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const ARMRegister scratch32 = temps.AcquireW();
|
||||
MOZ_ASSERT(scratch32.asUnsized() != dest.base);
|
||||
load32(dest, scratch32.asUnsized());
|
||||
Orr(scratch32, scratch32, Operand(imm.value));
|
||||
store32(scratch32.asUnsized(), dest);
|
||||
}
|
||||
|
||||
void testPtr(Register lhs, Register rhs) {
|
||||
Tst(ARMRegister(lhs, 64), Operand(ARMRegister(rhs, 64)));
|
||||
|
|
|
@ -55,6 +55,26 @@ MacroAssembler::andPtr(Imm32 imm, Register dest)
|
|||
ma_and(dest, imm);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Register src, Register dest)
|
||||
{
|
||||
ma_or(dest, src);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_or(dest, imm);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
load32(dest, SecondScratchReg);
|
||||
ma_or(SecondScratchReg, imm);
|
||||
store32(SecondScratchReg, dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1573,27 +1573,6 @@ MacroAssemblerMIPSCompat::not32(Register reg)
|
|||
}
|
||||
|
||||
// Logical operations
|
||||
void
|
||||
MacroAssemblerMIPSCompat::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_or(dest, imm);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
load32(dest, SecondScratchReg);
|
||||
ma_or(SecondScratchReg, imm);
|
||||
store32(SecondScratchReg, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::or32(Register src, Register dest)
|
||||
{
|
||||
ma_or(dest, src);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::xor32(Imm32 imm, Register dest)
|
||||
{
|
||||
|
|
|
@ -1131,9 +1131,6 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
|
|||
}
|
||||
}
|
||||
|
||||
void or32(Imm32 imm, Register dest);
|
||||
void or32(Imm32 imm, const Address& dest);
|
||||
void or32(Register src, Register dest);
|
||||
void xor32(Imm32 imm, Register dest);
|
||||
void xorPtr(Imm32 imm, Register dest);
|
||||
void xorPtr(Register src, Register dest);
|
||||
|
|
|
@ -428,7 +428,6 @@ class MacroAssemblerNone : public Assembler
|
|||
template <typename T, typename S> void xorPtr(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void xor32(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void orPtr(T, S) { MOZ_CRASH(); }
|
||||
template <typename T, typename S> void or32(T, S) { MOZ_CRASH(); }
|
||||
template <typename T> void not32(T) { MOZ_CRASH(); }
|
||||
void convertUInt32ToDouble(Register, FloatRegister) { MOZ_CRASH(); }
|
||||
void convertUInt32ToFloat32(Register, FloatRegister) { MOZ_CRASH(); }
|
||||
|
|
|
@ -40,6 +40,24 @@ MacroAssembler::and32(const Address& src, Register dest)
|
|||
andl(Operand(src), dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Register src, Register dest)
|
||||
{
|
||||
orl(src, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, Register dest)
|
||||
{
|
||||
orl(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::or32(Imm32 imm, const Address& dest)
|
||||
{
|
||||
orl(imm, Operand(dest));
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -123,15 +123,6 @@ class MacroAssemblerX86Shared : public Assembler
|
|||
void move32(Register src, const Operand& dest) {
|
||||
movl(src, dest);
|
||||
}
|
||||
void or32(Register src, Register dest) {
|
||||
orl(src, dest);
|
||||
}
|
||||
void or32(Imm32 imm, Register dest) {
|
||||
orl(imm, dest);
|
||||
}
|
||||
void or32(Imm32 imm, const Address& dest) {
|
||||
orl(imm, Operand(dest));
|
||||
}
|
||||
void neg32(Register reg) {
|
||||
negl(reg);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче