mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010775 part 2 - Pass Imm32 by value instead of const-ref. r=sunfish
This commit is contained in:
parent
bda720d862
commit
cc21da8794
@ -2002,7 +2002,7 @@ MacroAssemblerARMCompat::andPtr(Register src, Register dest)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::move32(const Imm32 &imm, Register dest)
|
||||
MacroAssemblerARMCompat::move32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_mov(imm, dest);
|
||||
}
|
||||
@ -2273,7 +2273,7 @@ MacroAssemblerARMCompat::loadFloat32(const BaseIndex &src, const FloatRegister &
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store8(const Imm32 &imm, const Address &address)
|
||||
MacroAssemblerARMCompat::store8(Imm32 imm, const Address &address)
|
||||
{
|
||||
ma_mov(imm, secondScratchReg_);
|
||||
store8(secondScratchReg_, address);
|
||||
@ -2286,7 +2286,7 @@ MacroAssemblerARMCompat::store8(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store8(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerARMCompat::store8(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_mov(imm, secondScratchReg_);
|
||||
store8(secondScratchReg_, dest);
|
||||
@ -2306,7 +2306,7 @@ MacroAssemblerARMCompat::store8(Register src, const BaseIndex &dest)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store16(const Imm32 &imm, const Address &address)
|
||||
MacroAssemblerARMCompat::store16(Imm32 imm, const Address &address)
|
||||
{
|
||||
ma_mov(imm, secondScratchReg_);
|
||||
store16(secondScratchReg_, address);
|
||||
@ -2319,7 +2319,7 @@ MacroAssemblerARMCompat::store16(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store16(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerARMCompat::store16(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_mov(imm, secondScratchReg_);
|
||||
store16(secondScratchReg_, dest);
|
||||
@ -2354,14 +2354,14 @@ MacroAssemblerARMCompat::store32(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store32(const Imm32 &src, const Address &address)
|
||||
MacroAssemblerARMCompat::store32(Imm32 src, const Address &address)
|
||||
{
|
||||
move32(src, secondScratchReg_);
|
||||
storePtr(secondScratchReg_, address);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::store32(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerARMCompat::store32(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_mov(imm, secondScratchReg_);
|
||||
store32(secondScratchReg_, dest);
|
||||
@ -2468,7 +2468,7 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::cmp32(Register lhs, const Imm32 &rhs)
|
||||
MacroAssemblerARMCompat::cmp32(Register lhs, Imm32 rhs)
|
||||
{
|
||||
JS_ASSERT(lhs != ScratchRegister);
|
||||
ma_cmp(lhs, rhs);
|
||||
@ -2481,7 +2481,7 @@ MacroAssemblerARMCompat::cmp32(const Operand &lhs, Register rhs)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::cmp32(const Operand &lhs, const Imm32 &rhs)
|
||||
MacroAssemblerARMCompat::cmp32(const Operand &lhs, Imm32 rhs)
|
||||
{
|
||||
JS_ASSERT(lhs.toReg() != ScratchRegister);
|
||||
ma_cmp(lhs.toReg(), rhs);
|
||||
@ -2519,7 +2519,7 @@ MacroAssemblerARMCompat::cmpPtr(Register lhs, const ImmGCPtr &rhs)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerARMCompat::cmpPtr(Register lhs, const Imm32 &rhs)
|
||||
MacroAssemblerARMCompat::cmpPtr(Register lhs, Imm32 rhs)
|
||||
{
|
||||
ma_cmp(lhs, rhs);
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
Imm32 totSpace = Imm32(extraSpace.value + 4);
|
||||
ma_dtr(IsStore, sp, totSpace, reg, PreIndex);
|
||||
}
|
||||
void pushWithPadding(const Imm32 &imm, const Imm32 extraSpace) {
|
||||
void pushWithPadding(Imm32 imm, const Imm32 extraSpace) {
|
||||
Imm32 totSpace = Imm32(extraSpace.value + 4);
|
||||
// ma_dtr may need the scratch register to adjust the stack, so use the
|
||||
// second scratch register.
|
||||
@ -1308,7 +1308,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
void addPtr(const Address &src, Register dest);
|
||||
void not32(Register reg);
|
||||
|
||||
void move32(const Imm32 &imm, Register dest);
|
||||
void move32(Imm32 imm, Register dest);
|
||||
void move32(Register src, Register dest);
|
||||
|
||||
void movePtr(Register src, Register dest);
|
||||
@ -1351,20 +1351,20 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
void loadFloat32(const BaseIndex &src, const FloatRegister &dest);
|
||||
|
||||
void store8(Register src, const Address &address);
|
||||
void store8(const Imm32 &imm, const Address &address);
|
||||
void store8(Imm32 imm, const Address &address);
|
||||
void store8(Register src, const BaseIndex &address);
|
||||
void store8(const Imm32 &imm, const BaseIndex &address);
|
||||
void store8(Imm32 imm, const BaseIndex &address);
|
||||
|
||||
void store16(Register src, const Address &address);
|
||||
void store16(const Imm32 &imm, const Address &address);
|
||||
void store16(Imm32 imm, const Address &address);
|
||||
void store16(Register src, const BaseIndex &address);
|
||||
void store16(const Imm32 &imm, const BaseIndex &address);
|
||||
void store16(Imm32 imm, const BaseIndex &address);
|
||||
|
||||
void store32(Register src, const AbsoluteAddress &address);
|
||||
void store32(Register src, const Address &address);
|
||||
void store32(Register src, const BaseIndex &address);
|
||||
void store32(const Imm32 &src, const Address &address);
|
||||
void store32(const Imm32 &src, const BaseIndex &address);
|
||||
void store32(Imm32 src, const Address &address);
|
||||
void store32(Imm32 src, const BaseIndex &address);
|
||||
|
||||
void storePtr(ImmWord imm, const Address &address);
|
||||
void storePtr(ImmPtr imm, const Address &address);
|
||||
@ -1406,16 +1406,16 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
add32(Imm32(1), ToPayload(addr));
|
||||
}
|
||||
|
||||
void cmp32(Register lhs, const Imm32 &rhs);
|
||||
void cmp32(Register lhs, Imm32 rhs);
|
||||
void cmp32(Register lhs, Register rhs);
|
||||
void cmp32(const Operand &lhs, const Imm32 &rhs);
|
||||
void cmp32(const Operand &lhs, Imm32 rhs);
|
||||
void cmp32(const Operand &lhs, Register rhs);
|
||||
|
||||
void cmpPtr(Register lhs, const ImmWord &rhs);
|
||||
void cmpPtr(Register lhs, const ImmPtr &rhs);
|
||||
void cmpPtr(Register lhs, Register rhs);
|
||||
void cmpPtr(Register lhs, const ImmGCPtr &rhs);
|
||||
void cmpPtr(Register lhs, const Imm32 &rhs);
|
||||
void cmpPtr(Register lhs, Imm32 rhs);
|
||||
void cmpPtr(const Address &lhs, Register rhs);
|
||||
void cmpPtr(const Address &lhs, const ImmWord &rhs);
|
||||
void cmpPtr(const Address &lhs, const ImmPtr &rhs);
|
||||
|
@ -784,7 +784,7 @@ MacroAssemblerMIPS::ma_store(Register data, const BaseIndex &dest,
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPS::ma_store(const Imm32 &imm, const BaseIndex &dest,
|
||||
MacroAssemblerMIPS::ma_store(Imm32 imm, const BaseIndex &dest,
|
||||
LoadStoreSize size, LoadStoreExtension extension)
|
||||
{
|
||||
// Make sure that SecondScratchReg contains absolute address so that
|
||||
@ -1739,7 +1739,7 @@ MacroAssemblerMIPSCompat::andPtr(Register src, Register dest)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::move32(const Imm32 &imm, Register dest)
|
||||
MacroAssemblerMIPSCompat::move32(Imm32 imm, Register dest)
|
||||
{
|
||||
ma_li(dest, imm);
|
||||
}
|
||||
@ -1916,7 +1916,7 @@ MacroAssemblerMIPSCompat::loadFloat32(const BaseIndex &src, const FloatRegister
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store8(const Imm32 &imm, const Address &address)
|
||||
MacroAssemblerMIPSCompat::store8(Imm32 imm, const Address &address)
|
||||
{
|
||||
ma_li(SecondScratchReg, imm);
|
||||
ma_store(SecondScratchReg, address, SizeByte);
|
||||
@ -1929,7 +1929,7 @@ MacroAssemblerMIPSCompat::store8(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store8(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerMIPSCompat::store8(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_store(imm, dest, SizeByte);
|
||||
}
|
||||
@ -1941,7 +1941,7 @@ MacroAssemblerMIPSCompat::store8(Register src, const BaseIndex &dest)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store16(const Imm32 &imm, const Address &address)
|
||||
MacroAssemblerMIPSCompat::store16(Imm32 imm, const Address &address)
|
||||
{
|
||||
ma_li(SecondScratchReg, imm);
|
||||
ma_store(SecondScratchReg, address, SizeHalfWord);
|
||||
@ -1954,7 +1954,7 @@ MacroAssemblerMIPSCompat::store16(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store16(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerMIPSCompat::store16(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_store(imm, dest, SizeHalfWord);
|
||||
}
|
||||
@ -1978,14 +1978,14 @@ MacroAssemblerMIPSCompat::store32(Register src, const Address &address)
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store32(const Imm32 &src, const Address &address)
|
||||
MacroAssemblerMIPSCompat::store32(Imm32 src, const Address &address)
|
||||
{
|
||||
move32(src, ScratchRegister);
|
||||
storePtr(ScratchRegister, address);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSCompat::store32(const Imm32 &imm, const BaseIndex &dest)
|
||||
MacroAssemblerMIPSCompat::store32(Imm32 imm, const BaseIndex &dest)
|
||||
{
|
||||
ma_store(imm, dest, SizeWord);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ class MacroAssemblerMIPS : public Assembler
|
||||
LoadStoreExtension extension = SignExtend);
|
||||
void ma_store(Register data, const BaseIndex &dest, LoadStoreSize size = SizeWord,
|
||||
LoadStoreExtension extension = SignExtend);
|
||||
void ma_store(const Imm32 &imm, const BaseIndex &dest, LoadStoreSize size = SizeWord,
|
||||
void ma_store(Imm32 imm, const BaseIndex &dest, LoadStoreSize size = SizeWord,
|
||||
LoadStoreExtension extension = SignExtend);
|
||||
|
||||
void computeScaledAddress(const BaseIndex &address, Register dest);
|
||||
@ -1020,7 +1020,7 @@ public:
|
||||
void addPtr(const Address &src, Register dest);
|
||||
void not32(Register reg);
|
||||
|
||||
void move32(const Imm32 &imm, Register dest);
|
||||
void move32(Imm32 imm, Register dest);
|
||||
void move32(Register src, Register dest);
|
||||
|
||||
void movePtr(Register src, Register dest);
|
||||
@ -1063,20 +1063,20 @@ public:
|
||||
void loadFloat32(const BaseIndex &src, const FloatRegister &dest);
|
||||
|
||||
void store8(Register src, const Address &address);
|
||||
void store8(const Imm32 &imm, const Address &address);
|
||||
void store8(Imm32 imm, const Address &address);
|
||||
void store8(Register src, const BaseIndex &address);
|
||||
void store8(const Imm32 &imm, const BaseIndex &address);
|
||||
void store8(Imm32 imm, const BaseIndex &address);
|
||||
|
||||
void store16(Register src, const Address &address);
|
||||
void store16(const Imm32 &imm, const Address &address);
|
||||
void store16(Imm32 imm, const Address &address);
|
||||
void store16(Register src, const BaseIndex &address);
|
||||
void store16(const Imm32 &imm, const BaseIndex &address);
|
||||
void store16(Imm32 imm, const BaseIndex &address);
|
||||
|
||||
void store32(Register src, const AbsoluteAddress &address);
|
||||
void store32(Register src, const Address &address);
|
||||
void store32(Register src, const BaseIndex &address);
|
||||
void store32(const Imm32 &src, const Address &address);
|
||||
void store32(const Imm32 &src, const BaseIndex &address);
|
||||
void store32(Imm32 src, const Address &address);
|
||||
void store32(Imm32 src, const BaseIndex &address);
|
||||
|
||||
void storePtr(ImmWord imm, const Address &address);
|
||||
void storePtr(ImmPtr imm, const Address &address);
|
||||
|
@ -333,7 +333,7 @@ class AssemblerX86Shared : public AssemblerShared
|
||||
label->bind(masm.size());
|
||||
masm.floatConstant(f);
|
||||
}
|
||||
void movl(const Imm32 &imm32, Register dest) {
|
||||
void movl(Imm32 imm32, Register dest) {
|
||||
masm.movl_i32r(imm32.value, dest.code());
|
||||
}
|
||||
void movl(Register src, Register dest) {
|
||||
@ -375,7 +375,7 @@ class AssemblerX86Shared : public AssemblerShared
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
|
||||
}
|
||||
}
|
||||
void movl(const Imm32 &imm32, const Operand &dest) {
|
||||
void movl(Imm32 imm32, const Operand &dest) {
|
||||
switch (dest.kind()) {
|
||||
case Operand::REG:
|
||||
masm.movl_i32r(imm32.value, dest.reg());
|
||||
@ -503,7 +503,7 @@ class AssemblerX86Shared : public AssemblerShared
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
|
||||
}
|
||||
}
|
||||
void movb(const Imm32 &src, const Operand &dest) {
|
||||
void movb(Imm32 src, const Operand &dest) {
|
||||
switch (dest.kind()) {
|
||||
case Operand::MEM_REG_DISP:
|
||||
masm.movb_i8m(src.value, dest.disp(), dest.base());
|
||||
@ -545,7 +545,7 @@ class AssemblerX86Shared : public AssemblerShared
|
||||
MOZ_ASSUME_UNREACHABLE("unexpected operand kind");
|
||||
}
|
||||
}
|
||||
void movw(const Imm32 &src, const Operand &dest) {
|
||||
void movw(Imm32 src, const Operand &dest) {
|
||||
switch (dest.kind()) {
|
||||
case Operand::MEM_REG_DISP:
|
||||
masm.movw_i16m(src.value, dest.disp(), dest.base());
|
||||
|
@ -95,13 +95,13 @@ class MacroAssemblerX86Shared : public Assembler
|
||||
void branchNegativeZero(const FloatRegister ®, Register scratch, Label *label);
|
||||
void branchNegativeZeroFloat32(const FloatRegister ®, Register scratch, Label *label);
|
||||
|
||||
void move32(const Imm32 &imm, Register dest) {
|
||||
void move32(Imm32 imm, Register dest) {
|
||||
// Use the ImmWord version of mov to register, which has special
|
||||
// optimizations. Casting to uint32_t here ensures that the value
|
||||
// is zero-extended.
|
||||
mov(ImmWord(uint32_t(imm.value)), dest);
|
||||
}
|
||||
void move32(const Imm32 &imm, const Operand &dest) {
|
||||
void move32(Imm32 imm, const Operand &dest) {
|
||||
movl(imm, dest);
|
||||
}
|
||||
void move32(Register src, Register dest) {
|
||||
@ -110,19 +110,19 @@ class MacroAssemblerX86Shared : public Assembler
|
||||
void move32(Register src, const Operand &dest) {
|
||||
movl(src, dest);
|
||||
}
|
||||
void and32(const Imm32 &imm, Register dest) {
|
||||
void and32(Imm32 imm, Register dest) {
|
||||
andl(imm, dest);
|
||||
}
|
||||
void and32(const Imm32 &imm, const Address &dest) {
|
||||
void and32(Imm32 imm, const Address &dest) {
|
||||
andl(imm, Operand(dest));
|
||||
}
|
||||
void or32(Register src, Register dest) {
|
||||
orl(src, dest);
|
||||
}
|
||||
void or32(const Imm32 &imm, Register dest) {
|
||||
void or32(Imm32 imm, Register dest) {
|
||||
orl(imm, dest);
|
||||
}
|
||||
void or32(const Imm32 &imm, const Address &dest) {
|
||||
void or32(Imm32 imm, const Address &dest) {
|
||||
orl(imm, Operand(dest));
|
||||
}
|
||||
void neg32(Register reg) {
|
||||
@ -134,16 +134,16 @@ class MacroAssemblerX86Shared : public Assembler
|
||||
void test32(const Address &addr, Imm32 imm) {
|
||||
testl(Operand(addr), imm);
|
||||
}
|
||||
void test32(Register lhs, const Imm32 &rhs) {
|
||||
void test32(Register lhs, Imm32 rhs) {
|
||||
testl(lhs, rhs);
|
||||
}
|
||||
void cmp32(Register lhs, const Imm32 &rhs) {
|
||||
void cmp32(Register lhs, Imm32 rhs) {
|
||||
cmpl(lhs, rhs);
|
||||
}
|
||||
void cmp32(Register a, Register b) {
|
||||
cmpl(a, b);
|
||||
}
|
||||
void cmp32(const Operand &lhs, const Imm32 &rhs) {
|
||||
void cmp32(const Operand &lhs, Imm32 rhs) {
|
||||
cmpl(lhs, rhs);
|
||||
}
|
||||
void cmp32(const Operand &lhs, Register rhs) {
|
||||
|
@ -536,7 +536,7 @@ class Assembler : public AssemblerX86Shared
|
||||
void mov(Register src, const Operand &dest) {
|
||||
movq(src, dest);
|
||||
}
|
||||
void mov(const Imm32 &imm32, const Operand &dest) {
|
||||
void mov(Imm32 imm32, const Operand &dest) {
|
||||
movq(imm32, dest);
|
||||
}
|
||||
void mov(Register src, Register dest) {
|
||||
|
Loading…
Reference in New Issue
Block a user