Stocks stopped a three-day slide, but ended well off the highs on Wednesday as investors took the suggestion of further Federal Reserve stimulus as a mixed blessing.

Stock index futures dropped after Moody's Investors Service said it may cut the United States' triple-A rating due to the rising chance its debt ceiling may not be raised by the August 2nd deadline.

Concerns about the debt ceiling have been a headwind for equities as no budget deal has been brokered. Futures initially slumped on the news, though they later recovered some of their losses. S&P futures fell 0.4 percent.

The rating agencies were so slow to respond to anything in 2007 and 2008 that now they're overly quick to respond, said Paul Schatz, president and chief investment officer of Heritage Capital in Woodbridge, Connecticut, who added that he felt there was no chance of a default.

I don't think this is a big deal and I don't think it will move the needle for long. This will be a short-term issue, no more than half a day.

In Wednesday's session, the three major U.S. stock indexes rose more than 1 percent at their peaks after Fed Chairman Ben Bernanke suggested the Fed would consider additional measures to support the economy if the outlook gets worse. Energy and materials stocks led gains, but the rally fizzled in afternoon trading.

Bernanke's comments were a positive this morning, but we had a little too much happiness early on, said Richard Sichel, chief investment officer of Philadelphia Trust Co. The comments were not upbeat by any means, and obviously, no one wants the economy to get to the point where more stimulus is needed.

The Fed's $600 billion bond-buying effort, known as QE2, has contributed to huge equity gains since September.

In testimony to the House Financial Services Committee, Bernanke said the recent economic weakness may prove more persistent than expected ... implying a need for additional policy support.

Stock investors had put a low probability on any more stimulus from the Fed, but June's dismal jobs report altered some perceptions.

The CBOE Volatility Index <.VIX>, Wall Street's fear gauge, ended up just 0.2 percent after dropping nearly 9 percent to a session low on the Fed chairman's comments. Over the past three days, the VIX had climbed almost 25 percent while the S&P 500 lost about 2.3 percent, pressured by weak earnings and concerns over Europe's debt crisis.

The Dow Jones industrial average <.DJI> rose 44.73 points, or 0.36 percent, to 12,491.61 at the close. The Standard & Poor's 500 Index <.SPX> gained 4.08 points, or 0.31 percent, to 1,317.72. The Nasdaq Composite Index <.IXIC> advanced 15.01 points, or 0.54 percent, to 2,796.92.

After the closing bell, Yum Brands Inc rose 2.9 percent to $57.20 in extended trading after the fast-food chain operator reported a better-than-expected profit and raised its full-year profit view. Shares of U.S. hotel chain Marriott International Inc fell 3.4 percent to $35.89 after the bell following the company's results.

During the regular session, News Corp shares jumped 3.8 percent to $15.93. It was the Nasdaq's most active name after announcing it had withdrawn a $12 billion bid to buy the 61 percent of broadcaster BSkyB it does not already own. Volume in the media company's stock was its highest since December 17, 2004, when it was officially added to the S&P 500.

News Corp is at the center of allegations that one of its tabloid newspapers committed criminal acts.

Energy and material stocks were the top gainers, though they were off their highs as crude oil cut its gains. The S&P energy sector index <.GSPE> rose 0.7 percent, while August crude futures gained 62 cents, or 0.6 percent, to settle at $98.05 a barrel. Baker Hughes Inc was one of the top energy sector gainers, rising 3.3 percent to $74.83.

The S&P materials sector index <.GSPM> rose 0.8 percent, with Freeport-McMoRan Copper & Gold Inc up 2 percent at $54.89 on heavy volume.

Shares of JPMorgan Chase & Co rose 0.6 percent to $39.62 while Google Inc climbed 0.8 percent to close at $538.26. JPMorgan is scheduled to report its results tomorrow morning, while Google is slated to report after the market's closing bell on Thursday.

Wall Street got an early boost from overseas data that showed China's economy grew faster than expected in the second quarter, but there was still caution over developments in Europe. Moody's downgraded Ireland's debt to junk late on Tuesday and said Ireland was likely to follow Greece in needing a second bailout. Irish bond yields jumped to record highs.

Electronic Arts Inc , the video game publisher, is buying PopCap Games in a deal worth up to $1.3 billion as it tries to ramp up its social and casual games portfolio. Shares of Electronic Arts shed 1.1 percent to $23.91.

Volume was light, with about 6.83 billion shares traded on the New York Stock Exchange, the American Stock Exchange and Nasdaq, below last year's daily average of 8.47 billion.

Advancing stocks outnumbered decliners on the New York Stock Exchange by a ratio of about 2 to 1, while on the Nasdaq, about nine stocks rose for every four that fell.

(Reporting by Ryan Vlastelica; Editing by Jan Paschal)