SAN FRANCISCO -- Spansion ( SPSN) posted a smaller-than- expected loss in the fourth quarter, as the chipmaker managed to bump up its gross margin. Spansion's sales were down about 5% year over year at $652.8 million, within the company's guided range, but short of the $660 million expected by analysts. The Sunnyvale, Calif., chipmaker incurred a net loss of $50 million, or 37 cents a share, compared with a net loss of $25 million, or 19 cents a share at this time last year. The average analyst expectation called for Spansion to lose 54 cents a share, according to Thomson Financial. While Spansion had projected that its gross margin would remain flat in the fourth quarter, at 18%, the company said Tuesday that the margin came in at 20%. CEO Bertrand Cambou said in a statement that the results reflected operational improvements at the company. "The overall pricing environment was encouraging and the book-to-bill ratio was strong at 1.3," Cambou said. He added that the company's new 300mm wafer manufacturing facility is on track to begin recognizing revenue in the current quarter, and that chips from the facility are already qualified at leading customers. The new manufacturing facility is expected to lower Spansion's chip production costs going forward, although the company noted Tuesday that it will mean a lower gross margin in the current quarter due to noncash depreciation charges. Spansion said that revenue in the current quarter will range between $580 million and $640 million. The midpoint of the forecast, $610 million, lagged Wall Street's first-quarter sales expectation of $617.4 million. Shares of Spansion were up 4 cents at $2.98 in extended trading Tuesday. Spansion has been particularly hard hit by the bearish outlook affecting most chip stocks in recent months, with its shares down a whopping 79% from a 52-week high of $14.20.