(CNN) -

Dow and S&P gain 0.5%, inching closer to all-time highs. Nasdaq ends little changed as some tech stocks falter.