Software has been the market’s favorite growth story for more than a decade. But lately, it’s been the market’s punching bag.