LOS ANGELES (MarketWatch) — Shares of Hewlett-Packard Co. advanced late Wednesday as the tech bellwether released better-than-expected quarterly results and said it will cut thousands of jobs, while NetApp Inc. shares sank more than 20%, weighed by a weak forecast from the storage-technology firm.

H-P HPQ, +0.31% shares extended gains to $23.27, up 10%, with adjusted earnings coming in 7 cents a share above expectations, at 98 cents a share for its fiscal second quarter. Revenue of $30.7 billion was down from $31.6 billion a year ago, but above the FactSet Research estimate of $29.9 billion. H-P forecast fiscal third-quarter adjusted earnings of 94 cents to 97 cents a share. Analysts were expecting $1.02 a share.

“Overall, I feel cautiously optimistic coming out of Q2,” said Chief Executive Meg Whitman during a conference call. “Our results appear to be stabilizing. While I wouldn’t say we’ve turned the corner, we are making progress.”

AOL's bet on local news

The Palo Alto, Calif.-based company also said it plans to lay off about 27,000 workers, or 8% of its workforce, which H-P said will result in annualized savings between $3 billion and $3.5 billion by the end of its 2014 fiscal year. Read about H-P's results, job cuts.

Pandora Media Inc. P shares also pushed higher, by 16% to $11.99 after the online-radio company raised its yearly outlook as the number of hours users were listening nearly doubled. See more on Pandora's raised forecast.

Shares of NetApp NTAP, +0.89% skidded 19% lower at $26.75. The company forecast fiscal first-quarter adjusted earnings of 34 cents and 39 cents a share, on revenue of $1.4 billion to $1.5 billion. Wall Street had pegged earnings of 59 cents a share on $1.61 billion in revenue.

NetApp’s fiscal fourth-quarter adjusted earnings of 66 cents a share were better than Wall Street’s estimate of 63 cents a share. Revenue was $1.7 billion, up from $1.43 billion a year ago. Analysts expected $1.68 billion in revenue. More on NetApp's outlook, results.

Joining NetApp in the red were shares of MediciNova Inc. MNOV, +3.02% after the biopharma company said a clinical study of its MN-221 asthma treatment didn’t yield statistically significant results. The shares fell 47% to $1.46 in modest volume. Read about MediciNova's asthma-treatment study.

During the regular session, U.S. ended off their worst levels of the session. Stocks had taken part in a global selloff of equities on intensifying concerns that Greece could exit the euro zone as European Union leaders meet in Brussels. More on Wednesday's drop in U.S. stocks in Market Snapshot.