diff mbox series

[2/7] tests/tcg/xtensa: restore vecbase SR after test

Message ID 20220427172140.1406059-3-jcmvbkbc@gmail.com (mailing list archive)
State New, archived
Headers show
Series tests/tcg/xtensa: test fixes and improvements | expand

Commit Message

Max Filippov April 27, 2022, 5:21 p.m. UTC
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 | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/tests/tcg/xtensa/test_sr.S b/tests/tcg/xtensa/test_sr.S
index b1a91a0637ee..34441c7afff7 100644
--- a/tests/tcg/xtensa/test_sr.S
+++ b/tests/tcg/xtensa/test_sr.S
@@ -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