tests/tcg/xtensa: restore vecbase SR after test
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 24 Apr 2022 15:33:16 +0000 (08:33 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 6 May 2022 22:27:40 +0000 (15:27 -0700)
Writing garbage into the vecbase SR results in hang in the subsequent
tests that expect to raise an exception. Restore vecbase SR to its
reset value after the test.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
tests/tcg/xtensa/test_sr.S

index b1a91a0637ee350830c027458ea11236a26122bb..34441c7afff7a97595f870bda28a98681d72c010 100644 (file)
@@ -221,6 +221,8 @@ test_sr_mask /*scompare1*/12, 0, 0
 
 #if XCHAL_HAVE_VECBASE
 test_sr vecbase, 1
+movi   a2, XCHAL_VECBASE_RESET_VADDR
+wsr    a2, vecbase
 #else
 test_sr_mask /*vecbase*/231, 0, 0
 #endif