void MoveEmitterMIPS::emit(const MoveOp &move) { const MoveOperand &from = move.from(); const MoveOperand &to = move.to(); if (move.isCycleEnd()) { MOZ_ASSERT(inCycle_); completeCycle(from, to, move.type()); inCycle_ = false; return; } if (move.isCycleBegin()) { MOZ_ASSERT(!inCycle_); breakCycle(from, to, move.endCycleType()); inCycle_ = true; } switch (move.type()) { case MoveOp::FLOAT32: emitFloat32Move(from, to); break; case MoveOp::DOUBLE: emitDoubleMove(from, to); break; case MoveOp::INT32: MOZ_ASSERT(sizeof(uintptr_t) == sizeof(int32_t)); case MoveOp::GENERAL: emitMove(from, to); break; default: MOZ_ASSUME_UNREACHABLE("Unexpected move type"); } }
void MoveEmitterARM64::emitMove(const MoveOp& move) { const MoveOperand& from = move.from(); const MoveOperand& to = move.to(); if (move.isCycleBegin()) { MOZ_ASSERT(!inCycle_ && !move.isCycleEnd()); breakCycle(from, to, move.endCycleType()); inCycle_ = true; } else if (move.isCycleEnd()) { MOZ_ASSERT(inCycle_); completeCycle(from, to, move.type()); inCycle_ = false; return; } switch (move.type()) { case MoveOp::FLOAT32: emitFloat32Move(from, to); break; case MoveOp::DOUBLE: emitDoubleMove(from, to); break; case MoveOp::INT32: emitInt32Move(from, to); break; case MoveOp::GENERAL: emitGeneralMove(from, to); break; default: MOZ_CRASH("Unexpected move type"); } }
void MoveEmitterMIPS::emit(const MoveOp& move) { const MoveOperand& from = move.from(); const MoveOperand& to = move.to(); if (move.isCycleEnd() && move.isCycleBegin()) { // A fun consequence of aliased registers is you can have multiple // cycles at once, and one can end exactly where another begins. breakCycle(from, to, move.endCycleType(), move.cycleBeginSlot()); completeCycle(from, to, move.type(), move.cycleEndSlot()); return; } if (move.isCycleEnd()) { MOZ_ASSERT(inCycle_); completeCycle(from, to, move.type(), move.cycleEndSlot()); MOZ_ASSERT(inCycle_ > 0); inCycle_--; return; } if (move.isCycleBegin()) { breakCycle(from, to, move.endCycleType(), move.cycleBeginSlot()); inCycle_++; } switch (move.type()) { case MoveOp::FLOAT32: emitFloat32Move(from, to); break; case MoveOp::DOUBLE: emitDoubleMove(from, to); break; case MoveOp::INT32: MOZ_ASSERT(sizeof(uintptr_t) == sizeof(int32_t)); case MoveOp::GENERAL: emitMove(from, to); break; default: MOZ_CRASH("Unexpected move type"); } }