After a whipsaw end to the month, the stock market’s decline was highlighted by the worst month for chip stocks in 24 years.