If any person commits any of the acts mentioned in § 18.2-90 with intent to commit larceny, or any felony other than murder, rape, robbery or arson in violation of §§ 18.2-77, 18.2-79 or § 18.2-80, or if any person commits any of the acts mentioned in § 18.2-89 or § 18.2-90 with intent to commit assault and battery, he shall be guilty of statutory burglary, punishable by confinement in a state correctional facility for not less than one or more than twenty years or, in the discretion of the jury or the court trying the case without a jury, be confined in jail for a period not exceeding twelve months or fined not more than $2,500, either or both. However, if the person was armed with a deadly weapon at the time of such entry, he shall be guilty of a Class 2 felony.
Va. Code § 18.2-91