OK, so energy, being an extensive variable, gets expanded in terms of all the other extensive variables, giving you a relation SdT=VdP (assuming chemical potential = 0 for simplicity) which if you then substitute back into your differential equation for dE gives you the dE=TdS-PdV result...