In any case of felony or misdemeanor, the accused may be sworn and examined in his own behalf, and if so sworn and examined, he shall be deemed to have waived his privilege of not giving evidence against himself, and shall be subject to cross-examination as any other witness; but his failure to testify shall create no presumption against him, nor be the subject of any comment before the court or jury by the prosecuting attorney.
Va. Code § 19.2-268