Tesla helped the S&P achieve its first winning day in three and the Nasdaq break its four-day losing streak, despite Nvidia dropping 1.3%.