The S&P 500 .SPX closed 55.29 points, or 0.72%, higher at 7,730.99 and the Nasdaq Composite .IXIC gained 411.16 points, or 1.57%, to 26,541.35. The Dow Jones Industrial Average .DJI rose 105.56 points, or 0.20%, to 53,569.44.
U.S. chip-linked stocks broadly rose, with the semiconductor index .SOX notching a 2.3% gain.
The S&P 500 Information Technology sector .SPLRCT rose 3.4%, making it the best gainer among the S&P 500's 11 constituents, which were mostly in the red.
"While Nvidia’s earnings beat and strong guidance restarted the party, it's apparent that not all sectors of the market were invited," said Charlie Ripley, senior investment strategist at Allianz Investment Management.
"Market headwinds continue to be a factor as higher interest rates, geopolitical tensions and global trade, among other things, are playing a role in the weakness seen across other sectors."
Brent crude prices jumped by more than $2 per barrel on Thursday, after a Wall Street Journal report that said U.S. President Donald Trump is not interested in returning to terms of a memorandum of understanding reached with Iran in June.
Salesforce CRM.N surged 22.6% after raising annual revenue and profit forecasts, and rolling out a new plug-in integrated with Anthropic's Claude AI models.
CrowdStrike CRWD.O climbed 20.5% after the cybersecurity software provider raised its annual revenue forecast and topped second-quarter earnings estimates.
The Salesforce and CrowdStrike reports calmed worries that advanced AI tools could upend the traditional software industry, boosting investor appetite for beaten-down software stocks and narrowing the gap with semiconductors, which are seen as the primary beneficiaries of the AI boom.
Shares of other software firms, including ServiceNow NOW.O and Palo Alto Networks PANW.O, also surged.
Moderna MRNA.O dropped 4.6% after unveiling a $2 billion convertible bond sale, while HP HPQ.N fell almost 3% after shipments and margins of its PC unit declined in the third quarter.