U.S. stocks had another day of gains Thursday that pushed the Dow and S&P 500 to new record highs.

The S&P 500 gained nearly 0.4% to 1,593.37, also a new record and putting the broad index just 0.4% away from 1,600.

"It's a market that's climbed the walls of worry. When there are pullbacks, the market rebounds quickly," said Tim Ghriskey, chief investment officer at Solaris Asset Management.

The outlier was the Nasdaq , which was dragged down by weakness in the tech sector. Shares of PC-related companies extended the prior day's sell-off following news that PC sales fell 14% worldwide last quarter.

Shares of Microsoft(MSFT), Intel(INTC) and Hewlett-Packard(HPQ) fell between 3% and 7%.

Microsoft and other PC stocks crash

Herbalife(HLF) spiked 3% after the Securities and Exchange Commission filed insider trading charges against the former KPMG partner who was fired after allegedly leaking insider trading information. KPMG resigned as auditor of the nutritional supplement company on Wednesday.

Shares of Yum Brands(YUM) were slightly higher after falling in premarket trading. The restaurant operator revealed that its same-store sales in China dropped in March amid an ongoing food safety scandal and concerns about bird flu.

Despite the company's recall of 1.7 million vehicles because of airbag defects, Toyota(TM) shares rose. Honda(HMC) shares also gained, even after the automaker said it was recalling 1.1 million vehicles with airbag problems.Shares of airbag supplier Takata Corp closed down 9% in Tokyo.

Drugstore chain Rite Aid(RAD) swung to a profit in the latest quarter, trouncing forecasts and sending shares up 19%. Bed Bath & Beyond(BBBY) reported earnings in line with forecasts, as sales continued to rise.

The first of the big banks, JPMorgan(JPM) and Wells Fargo(WFC), will report their results ahead of the opening bell Friday.