Index: runtime/vm/flow_graph_compiler_ia32.cc |
=================================================================== |
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 16802) |
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy) |
@@ -1336,19 +1336,6 @@ |
#define __ compiler_->assembler()-> |
-static Address ToStackSlotAddress(Location loc) { |
- const intptr_t index = loc.stack_index(); |
- if (index < 0) { |
- const intptr_t offset = (1 - index) * kWordSize; |
- return Address(EBP, offset); |
- } else { |
- const intptr_t offset = |
- (ParsedFunction::kFirstLocalSlotIndex - index) * kWordSize; |
- return Address(EBP, offset); |
- } |
-} |
- |
- |
void ParallelMoveResolver::EmitMove(int index) { |
MoveOperands* move = moves_[index]; |
const Location source = move->src(); |
@@ -1359,15 +1346,15 @@ |
__ movl(destination.reg(), source.reg()); |
} else { |
ASSERT(destination.IsStackSlot()); |
- __ movl(ToStackSlotAddress(destination), source.reg()); |
+ __ movl(destination.ToStackSlotAddress(), source.reg()); |
} |
} else if (source.IsStackSlot()) { |
if (destination.IsRegister()) { |
- __ movl(destination.reg(), ToStackSlotAddress(source)); |
+ __ movl(destination.reg(), source.ToStackSlotAddress()); |
} else { |
ASSERT(destination.IsStackSlot()); |
- MoveMemoryToMemory(ToStackSlotAddress(destination), |
- ToStackSlotAddress(source)); |
+ MoveMemoryToMemory(destination.ToStackSlotAddress(), |
+ source.ToStackSlotAddress()); |
} |
} else if (source.IsXmmRegister()) { |
if (destination.IsXmmRegister()) { |
@@ -1376,15 +1363,15 @@ |
__ movaps(destination.xmm_reg(), source.xmm_reg()); |
} else { |
ASSERT(destination.IsDoubleStackSlot()); |
- __ movsd(ToStackSlotAddress(destination), source.xmm_reg()); |
+ __ movsd(destination.ToStackSlotAddress(), source.xmm_reg()); |
} |
} else if (source.IsDoubleStackSlot()) { |
if (destination.IsXmmRegister()) { |
- __ movsd(destination.xmm_reg(), ToStackSlotAddress(source)); |
+ __ movsd(destination.xmm_reg(), source.ToStackSlotAddress()); |
} else { |
ASSERT(destination.IsDoubleStackSlot()); |
- __ movsd(XMM0, ToStackSlotAddress(source)); |
- __ movsd(ToStackSlotAddress(destination), XMM0); |
+ __ movsd(XMM0, source.ToStackSlotAddress()); |
+ __ movsd(destination.ToStackSlotAddress(), XMM0); |
} |
} else { |
ASSERT(source.IsConstant()); |
@@ -1397,7 +1384,7 @@ |
} |
} else { |
ASSERT(destination.IsStackSlot()); |
- StoreObject(ToStackSlotAddress(destination), source.constant()); |
+ StoreObject(destination.ToStackSlotAddress(), source.constant()); |
} |
} |
@@ -1413,11 +1400,11 @@ |
if (source.IsRegister() && destination.IsRegister()) { |
__ xchgl(destination.reg(), source.reg()); |
} else if (source.IsRegister() && destination.IsStackSlot()) { |
- Exchange(source.reg(), ToStackSlotAddress(destination)); |
+ Exchange(source.reg(), destination.ToStackSlotAddress()); |
} else if (source.IsStackSlot() && destination.IsRegister()) { |
- Exchange(destination.reg(), ToStackSlotAddress(source)); |
+ Exchange(destination.reg(), source.ToStackSlotAddress()); |
} else if (source.IsStackSlot() && destination.IsStackSlot()) { |
- Exchange(ToStackSlotAddress(destination), ToStackSlotAddress(source)); |
+ Exchange(destination.ToStackSlotAddress(), source.ToStackSlotAddress()); |
} else if (source.IsXmmRegister() && destination.IsXmmRegister()) { |
__ movaps(XMM0, source.xmm_reg()); |
__ movaps(source.xmm_reg(), destination.xmm_reg()); |
@@ -1426,8 +1413,9 @@ |
ASSERT(destination.IsDoubleStackSlot() || source.IsDoubleStackSlot()); |
XmmRegister reg = source.IsXmmRegister() ? source.xmm_reg() |
: destination.xmm_reg(); |
- Address slot_address = |
- ToStackSlotAddress(source.IsXmmRegister() ? destination : source); |
+ Address slot_address = source.IsXmmRegister() |
+ ? destination.ToStackSlotAddress() |
+ : source.ToStackSlotAddress(); |
__ movsd(XMM0, slot_address); |
__ movsd(slot_address, reg); |