In mode 5 or 8, nothing.
In all other modes it'll travel until it sees an edge at the reference cam/limit switch, then travel until it gets to the motor zero pulse. That position is then the reference position + offset.
Exception is mode 1, where it just travels until it sees the motor zero pulse.