Tech company gains help push S&P 500 to record high