fix unittest for non-volatile registers

- use naked asm blocks to clear registers