2 cables required
1) dual mini 6pin -> single 8 pin
2) single 8pin female -> dual 6+2pin
Then one of the 6+2 can power the 5770. The other one power the RX580. No matter which card under stress, all loading will be shared by both mini 6pin.
The single 8pin can be replaced by single 6pin, doesn't really matter. In both case, all pin 1,2,3 can supply 12V power anyway. The single 8pin (or 6pin) is just a bridge for loading sharing. But in general, dual mini 6pin -> single 8pin is a more useful cable (as per the point below).
Technically, the female port can be on cable 1 or 2, doesn't really matter. However, recommend female connector on cable 2. Therefore, cable 1 can be used solely if you only run the RX580 later.