Virginia Gov. Mills E. Godwin signed into law yesterday a measure that will force state judges to send persons convicted of a second felony to prison for a specific term without any immediate chance of a suspended sentence or parole.

The measure, passed during the final night of the 1977 General Assembly as an amendment to another bill, was one of the few pieces of legislation that Godwin had sought from the legislature this year. The bill was designed, in part, to deal with some judges who legislators charge are reluctant to send repeat offenders to prison.

In a public ceremony at his Capitol office in Richmond, Godwin also signed four other "anticrime bills" that he said serve "notice on te criminal element . . . that henceforth, crime and punishment will be one and inseparable" in Virginia.

In addition to the mandatory sentencing bills, Godwin signed a measure that legislators have said will make Virginia's death penalty conform to recent Supreme Court rulings and one that adds killing a police officer performing his duties to the four other crimes that are punishable by death in the state.

Effective July 1, the measures will establish a two-part trial procedure for persons charged with capital offenses. Juries will be first asked to determine the guilt or innocence of the accused and then in a second proceeding asked to impose punishment.

Godwin and Virginia legal officials had said the state's mandatory death penalty law was probably unconstitutional. The U.S. Supreme Court last July said that consideration of "the character and record of the individual offender and the circumstances of the particular offense [are] a constitutionally indispensable part of inflicting the death penalty." The high court suggested a two-part legal procedure, such as that signed into law yesterday.

The mandatory sentencing law directs state judges to impose additional sentences on persons after conviction of second and subsequent felonies. The sentences would be added on to the normal sentence set by a jury and imposed by a judge. The additional sentence would be 1 year after conviction of a second felony; an additional 3 years after a third convictim and an additional 5 years after a fourth or subsequent conviction.

Judges are not allowed to suspend those sentences or to place the defendants on parole or probation until they have served the mandatory prison time.

The Virginia law apparently will be the most severe such measure in the Washington area. Maryland has no mandatory sentencing measure although a proposal for one is currently awaiting action in the state legislature.

District laws provide mandatory sentences of from 5 to 15 years for persons convicted of certain "crimes of violence" and for one-year mandatory sentences for persons arrested while on release under bail.

As happy as Godwin was with the bills he signed today, he said the legislature did not go far enough in the criminal measures it approved. He said "a serious ommission occurred" when the assembly killed a measure that would have provided a mandatory sentence of "10 years" for an importer, manufacturer, or wholesaler of drugs that are "most often associated with violent crime."

Godwin signed a bill requiring mandatory sentences of "at least one year" in prison for a felon who escapes from a state prison and another measure upgrading and escape from a state prison by a person in jail for a misdemeanor to a felony punishable by a sentence of 1 to 5 years. Previously such a person faced a sentence of 30 days to 12 months.