The Pentagon warned yesterday that the version of budget-balancing legislation approved by congressional negotiators yesterday would produce "the first negative growth in defense in Ronald Reagan's presidency" and would send "a message of comfort to the Soviets."

Spokesman Robert B. Sims, in what defense officials said was a futile fusillade against the Gramm-Rudman-Hollings legislation, said at a Pentagon news briefing that the cuts expected to be triggered this spring by the legislation "would take 3 to 8 percent out of our hide."

Defense Secretary Caspar W. Weinberger authorized the vocal attack on the measure -- which President Reagan endorsed last night -- because, as one associate put it, "There was nothing to lose at this point by going on record about its impact on defense."

Defense officials said the Joint Chiefs of Staff went to the White House on Friday to warn the president about the impact the antideficit measure would have on military operations.

One member of the Joint Chiefs, who was not identified, reportedly told Reagan that if Gramm-Rudman-Hollings becomes law, the cuts that would have to be made in defense would mean that the military could not fulfill its worldwide commitments, such as rotating aircraft carrier battle groups to distant oceans.

Despite such strong opposition, Pentagon officials were drawing up lists yesterday of the best programs to cut if spending reductions have to be made this spring to reach the deficit reductions required by Gramm-Rudman-Hollings. The White House figures defense may have to absorb a cut of $5.8 billion in fiscal 1986.

One defense official whose job would be to restructure the Pentagon budget in light of Gramm-Rudman-Hollings, said the big target would be the procurement account in hopes of sparing cuts in personnel or in funds needed to operate ships and aircraft to keep forces ready to fight.

The flexibility to take less money out of one budget account and more out of others, rather than cutting across-the-board, was one of the objectives that Weinberger achieved in intensive lobbying within the administration and with Congress.

Of the $276 billion in appropriations recently approved by the House, $87 billion is earmarked for procurement, $77 billion for the readiness accounts called operation and maintenance, $70 billion for military personnel and $33 billion for research.

Pentagon officials said they had not yet drawn up a cut list but said they would probably rewrite a number of contracts for the purchase of ships and aircraft.

By buying fewer ships and aircraft, or stretching out their purchases over a longer period, the Department of Defense would reduce its cash outlays, the spending targeted by Gramm-Rudman-Hollings.

However, defense officials said they would have to reduce money in the bank, called budget authority, $3 to save $1 in actual spending in a given year. This is because the Pentagon pays for weapons on installment, not all at once.

Asked where Weinberger would concentrate spending cuts, Sims said he would "protect those programs which the president has given priority to: strategic modernization, readiness, personnel, naval shipbuilding." He cited the Strategic Defense Initiative, the "Star Wars" missile defense, as one of the programs that would be shielded.