Bug 1113018. Stop manually moving things into ScratchReg in the x86-64 version of extractObject; just rely on unboxNonDouble doing the right thing as needed. r=sunfish

This commit is contained in:
Boris Zbarsky 2015-01-02 17:09:14 -05:00
Родитель 8eabe6108f
Коммит befbf1e8da
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -1165,9 +1165,6 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
// Unbox any non-double value into dest. Prefer unboxInt32 or unboxBoolean
// instead if the source type is known.
void unboxNonDouble(const ValueOperand &src, Register dest) {
// In a non-trivial coupling, we're not permitted to use ScratchReg when
// src and dest are different registers, because of how extractObject is
// implemented.
if (src.valueReg() == dest) {
mov(ImmWord(JSVAL_PAYLOAD_MASK), ScratchReg);
andq(ScratchReg, dest);
@ -1208,10 +1205,7 @@ class MacroAssemblerX64 : public MacroAssemblerX86Shared
// and returns that.
Register extractObject(const Address &address, Register scratch) {
MOZ_ASSERT(scratch != ScratchReg);
loadPtr(address, ScratchReg);
// We have a special coupling with unboxObject. As long as the registers
// aren't equal, it doesn't use ScratchReg.
unboxObject(ValueOperand(ScratchReg), scratch);
unboxObject(address, scratch);
return scratch;
}
Register extractObject(const ValueOperand &value, Register scratch) {