mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out 997672af6fc8:8a34b197be1d (bug 885169) for Win64 bustage
This commit is contained in:
parent
08c7624d01
commit
1b8a25bdaf
@ -4466,7 +4466,7 @@ ICGetElem_Arguments::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
regs = availableGeneralRegs(0);
|
||||
regs.takeUnchecked(objReg);
|
||||
regs.takeUnchecked(idxReg);
|
||||
regs.take(scratchReg);
|
||||
regs.takeUnchecked(scratchReg);
|
||||
Register argData = regs.takeAny();
|
||||
Register tempReg = regs.takeAny();
|
||||
|
||||
@ -4488,7 +4488,6 @@ ICGetElem_Arguments::Compiler::generateStubCode(MacroAssembler &masm)
|
||||
masm.addPtr(Imm32(ArgumentsData::offsetOfArgs()), argData);
|
||||
regs.add(scratchReg);
|
||||
regs.add(tempReg);
|
||||
regs.add(argData);
|
||||
ValueOperand tempVal = regs.takeAnyValue();
|
||||
masm.loadValue(BaseIndex(argData, idxReg, ScaleFromElemWidth(sizeof(Value))), tempVal);
|
||||
|
||||
|
@ -400,12 +400,8 @@ class TypedRegisterSet
|
||||
#endif
|
||||
}
|
||||
T getAny() const {
|
||||
// The choice of first or last here is mostly arbitrary, as they are
|
||||
// about the same speed on popular architectures. We choose first, as
|
||||
// it has the advantage of using the "lower" registers more often. These
|
||||
// registers are sometimes more efficient (e.g. optimized encodings for
|
||||
// EAX on x86).
|
||||
return getFirst();
|
||||
JS_ASSERT(!empty());
|
||||
return T::FromCode(mozilla::FloorLog2(bits_));
|
||||
}
|
||||
T getFirst() const {
|
||||
JS_ASSERT(!empty());
|
||||
|
@ -954,30 +954,12 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
|
||||
void moveValue(const Value &val, const ValueOperand &dest);
|
||||
|
||||
void moveValue(const ValueOperand &src, const ValueOperand &dest) {
|
||||
Register s0 = src.typeReg(), d0 = dest.typeReg(),
|
||||
s1 = src.payloadReg(), d1 = dest.payloadReg();
|
||||
|
||||
// Either one or both of the source registers could be the same as a
|
||||
// destination register.
|
||||
if (s1 == d0) {
|
||||
if (s0 == d1) {
|
||||
// If both are, this is just a swap of two registers.
|
||||
JS_ASSERT(d1 != ScratchRegister);
|
||||
JS_ASSERT(d0 != ScratchRegister);
|
||||
ma_mov(d1, ScratchRegister);
|
||||
ma_mov(d0, d1);
|
||||
ma_mov(ScratchRegister, d0);
|
||||
return;
|
||||
}
|
||||
// If only one is, copy that source first.
|
||||
mozilla::Swap(s0, s1);
|
||||
mozilla::Swap(d0, d1);
|
||||
}
|
||||
|
||||
if (s0 != d0)
|
||||
ma_mov(s0, d0);
|
||||
if (s1 != d1)
|
||||
ma_mov(s1, d1);
|
||||
JS_ASSERT(src.typeReg() != dest.payloadReg());
|
||||
JS_ASSERT(src.payloadReg() != dest.typeReg());
|
||||
if (src.typeReg() != dest.typeReg())
|
||||
ma_mov(src.typeReg(), dest.typeReg());
|
||||
if (src.payloadReg() != dest.payloadReg())
|
||||
ma_mov(src.payloadReg(), dest.payloadReg());
|
||||
}
|
||||
|
||||
void storeValue(ValueOperand val, Operand dst);
|
||||
|
@ -651,7 +651,6 @@ IonRuntime::generateVMWrapper(JSContext *cx, const VMFunction &f)
|
||||
|
||||
// The context is the first argument; r0 is the first argument register.
|
||||
Register cxreg = r0;
|
||||
regs.take(cxreg);
|
||||
|
||||
// Stack is:
|
||||
// ... frame ...
|
||||
|
@ -113,26 +113,12 @@ class MacroAssemblerX86 : public MacroAssemblerX86Shared
|
||||
moveValue(val, dest.typeReg(), dest.payloadReg());
|
||||
}
|
||||
void moveValue(const ValueOperand &src, const ValueOperand &dest) {
|
||||
Register s0 = src.typeReg(), d0 = dest.typeReg(),
|
||||
s1 = src.payloadReg(), d1 = dest.payloadReg();
|
||||
|
||||
// Either one or both of the source registers could be the same as a
|
||||
// destination register.
|
||||
if (s1 == d0) {
|
||||
if (s0 == d1) {
|
||||
// If both are, this is just a swap of two registers.
|
||||
xchgl(d0, d1);
|
||||
return;
|
||||
}
|
||||
// If only one is, copy that source first.
|
||||
mozilla::Swap(s0, s1);
|
||||
mozilla::Swap(d0, d1);
|
||||
}
|
||||
|
||||
if (s0 != d0)
|
||||
movl(s0, d0);
|
||||
if (s1 != d1)
|
||||
movl(s1, d1);
|
||||
JS_ASSERT(src.typeReg() != dest.payloadReg());
|
||||
JS_ASSERT(src.payloadReg() != dest.typeReg());
|
||||
if (src.typeReg() != dest.typeReg())
|
||||
movl(src.typeReg(), dest.typeReg());
|
||||
if (src.payloadReg() != dest.payloadReg())
|
||||
movl(src.payloadReg(), dest.payloadReg());
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user