U.S. stocks rose on Thursday, as a rise in oil prices boosted energy shares, overshadowing mixed economic data on housing sales and manufacturing orders.

Exxon Mobil Corp was one of the top boosts to the blue-chip Dow Jones industrial average -- up 1 percent to $68.98 -- after oil rose to nearly $65 per barrel on a report showing crude oil stocks fell more than expected last week.

Dow member General Motors Corp. rose after it said major bondholders had agreed to a debt-for-equity exchange, helping to counter uncertainty of the spillover effects onto the broader economy of a contentious bankruptcy filing by the largest U.S. automaker.

It does make a difference if it's pre-packaged and it's easier than if the bondholders are contesting it, there is no question about that, said Paul Mendelsohn, chief investment strategist at Windham Financial Services in Charlotte, Vermont.

But there's still a lot of uncertainty about how this thing is going to come down and what it's going to mean for jobs and dealerships and everything else.

Economic data was mixed, with weekly jobless claims and durable goods orders signaling a stabilizing economy while new home sales data indicated ongoing weakness in the housing market.

Sales of newly built U.S. single-family homes rose less than expected for April, with the previous month's figures revised downward to show a steeper decline.

The Dow Jones U.S. Home Construction index <.DJUSHB> slumped 5 percent.

The Dow Jones industrial average <.DJI> gained 50.02 points, or 0.60 percent, to 8,350.04. The Standard & Poor's 500 Index <.SPX> rose 8.53 points, or 0.96 percent, to 901.59. The Nasdaq Composite Index <.IXIC> added 7.96 points, or 0.46 percent, to 1,739.04.

Wall Street was buoyed by government data that showed new orders for long-lasting U.S. goods rose more than expected in April, while the number of workers filing new claims for jobless pay dropped by 13,000 last week.

GM shares rose 11.3 percent to $1.28, as the company reached a deal with some major bondholders that would give them a bigger stake in a reorganized automaker and could pave the way for a fast-track bankruptcy backed by the U.S. Treasury [ID:nSP402834]

Economists have been concerned about the far-reaching implications of a GM bankruptcy on the auto industry and the economy. Auto parts makers Visteon Corp and Metaldyne filed for Chapter 11 bankruptcy protection on Thursday.

A disappointing outlook from consumer products maker Procter & Gamble Co and earnings results from wholesale retailer Costco Wholesale Corp continued to paint a picture of a weak economy, however.

Costco slid 4 percent to $46.87 after the retailer reported its third-quarter profit fell 29 percent, as shoppers stuck to buying basic such as food and medicine and curbed discretionary purchases of clothes and jewelry.

Dow component Procter & Gamble
shares slid 0.6 percent to $51.47 after the household products maker gave guidance for 2010 that was well below Wall Street estimates.

Also on the earnings front, H.J. Heinz slipped 0.7 percent to $36 after the ketchup maker reported a quarterly profit that matched Wall Street estimates but issued full-year guidance that fell short of expectations.

The market looked set to recover some ground lost after Wednesday's sharp drop as rising yields on U.S. government debt fueled concern that businesses and consumers would face higher borrowing costs, hampering an economic recovery.

With recent declines on Wall Street, the Dow has trimmed its gains to 27 percent on the Dow and nearly 33 percent on the S&P 500 since hitting 12-year lows on March 9.

(Reporting by Chuck Mikolajczak; Editing by Padraic Cassidy)