зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1203964 - Part 2: Move MacroAssembler::rshiftPtrArithmetic into generic macro assembler. r=jandem
--HG-- extra : rebase_source : 3cdaaee1984f5e0aece4dfe937bce1ed856204da
This commit is contained in:
Родитель
bac0aaf828
Коммит
72dc86fadd
|
@ -703,6 +703,8 @@ class MacroAssembler : public MacroAssemblerSpecific
|
|||
inline void rshiftPtr(Imm32 imm, Register dest) PER_ARCH;
|
||||
inline void rshiftPtr(Imm32 imm, Register src, Register dest) DEFINED_ON(arm64);
|
||||
|
||||
inline void rshiftPtrArithmetic(Imm32 imm, Register dest) PER_ARCH;
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
public:
|
||||
|
||||
|
|
|
@ -137,6 +137,12 @@ MacroAssembler::rshiftPtr(Imm32 imm, Register dest)
|
|||
ma_lsr(imm, dest, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_asr(imm, dest, dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1716,9 +1716,6 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
|||
|
||||
void checkStackAlignment();
|
||||
|
||||
void rshiftPtrArithmetic(Imm32 imm, Register dest) {
|
||||
ma_asr(imm, dest, dest);
|
||||
}
|
||||
void rshift64(Imm32 imm, Register64 dest) {
|
||||
as_mov(dest.low, lsr(dest.low, imm.value));
|
||||
as_orr(dest.low, dest.low, lsl(dest.high, 32 - imm.value));
|
||||
|
|
|
@ -156,6 +156,12 @@ MacroAssembler::rshiftPtr(Imm32 imm, Register src, Register dest)
|
|||
Lsr(ARMRegister(dest, 64), ARMRegister(src, 64), imm.value);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest)
|
||||
{
|
||||
Asr(ARMRegister(dest, 64), ARMRegister(dest, 64), imm.value);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1071,9 +1071,6 @@ class MacroAssemblerCompat : public vixl::MacroAssembler
|
|||
|
||||
inline void rshift64(Imm32 imm, Register64 dest);
|
||||
|
||||
void rshiftPtrArithmetic(Imm32 imm, Register dest) {
|
||||
Asr(ARMRegister(dest, 64), ARMRegister(dest, 64), imm.value);
|
||||
}
|
||||
void lshiftPtr(Imm32 imm, Register dest) {
|
||||
Lsl(ARMRegister(dest, 64), ARMRegister(dest, 64), imm.value);
|
||||
}
|
||||
|
|
|
@ -134,6 +134,12 @@ MacroAssembler::rshiftPtr(Imm32 imm, Register dest)
|
|||
ma_srl(dest, dest, imm);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_sra(dest, dest, imm);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1349,9 +1349,6 @@ class MacroAssemblerMIPSCompat : public MacroAssemblerMIPS
|
|||
void restoreStackPointer();
|
||||
static void calculateAlignedStackPointer(void** stackPointer);
|
||||
|
||||
void rshiftPtrArithmetic(Imm32 imm, Register dest) {
|
||||
ma_sra(dest, dest, imm);
|
||||
}
|
||||
void rshift64(Imm32 imm, Register64 dest) {
|
||||
as_srl(dest.low, dest.low, imm.value);
|
||||
as_sll(ScratchRegister, dest.high, 32 - imm.value);
|
||||
|
|
|
@ -422,7 +422,6 @@ class MacroAssemblerNone : public Assembler
|
|||
template <typename T> void storeUnboxedValue(ConstantOrRegister, MIRType, T, MIRType) { MOZ_CRASH(); }
|
||||
template <typename T> void storeUnboxedPayload(ValueOperand value, T, size_t) { MOZ_CRASH(); }
|
||||
|
||||
void rshiftPtrArithmetic(Imm32, Register) { MOZ_CRASH(); }
|
||||
void lshiftPtr(Imm32, Register) { MOZ_CRASH(); }
|
||||
void convertUInt32ToDouble(Register, FloatRegister) { MOZ_CRASH(); }
|
||||
void convertUInt32ToFloat32(Register, FloatRegister) { MOZ_CRASH(); }
|
||||
|
|
|
@ -75,6 +75,12 @@ MacroAssembler::rshiftPtr(Imm32 imm, Register dest)
|
|||
shrq(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest)
|
||||
{
|
||||
sarq(imm, dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -850,9 +850,6 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
|
|||
void store64(Register64 src, Address address) {
|
||||
movq(src.reg, Operand(address));
|
||||
}
|
||||
void rshiftPtrArithmetic(Imm32 imm, Register dest) {
|
||||
sarq(imm, dest);
|
||||
}
|
||||
void rshift64(Imm32 imm, Register64 dest) {
|
||||
shrq(imm, dest.reg);
|
||||
}
|
||||
|
|
|
@ -76,6 +76,12 @@ MacroAssembler::rshiftPtr(Imm32 imm, Register dest)
|
|||
shrl(imm, dest);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::rshiftPtrArithmetic(Imm32 imm, Register dest)
|
||||
{
|
||||
sarl(imm, dest);
|
||||
}
|
||||
|
||||
//}}} check_macroassembler_style
|
||||
// ===============================================================
|
||||
|
||||
|
|
|
@ -1122,9 +1122,6 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
|||
}
|
||||
}
|
||||
|
||||
void rshiftPtrArithmetic(Imm32 imm, Register dest) {
|
||||
sarl(imm, dest);
|
||||
}
|
||||
void rshift64(Imm32 imm, Register64 dest) {
|
||||
shrdl(imm, dest.high, dest.low);
|
||||
shrl(imm, dest.high);
|
||||
|
|
Загрузка…
Ссылка в новой задаче