aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-04-10 02:48:20 +0400
committerBlue Swirl <blauwirbel@gmail.com>2012-04-14 15:25:39 +0000
commitad4ccc9370339e4f311a9e1d2c7cae77a9d45639 (patch)
tree589262ae32dcef6e01bfa2033a78af6ac459ee05 /tests
parenttarget-xtensa: add tests for LBEG/LEND invalidation (diff)
downloadqemu-kvm-ad4ccc9370339e4f311a9e1d2c7cae77a9d45639.tar.gz
qemu-kvm-ad4ccc9370339e4f311a9e1d2c7cae77a9d45639.tar.bz2
qemu-kvm-ad4ccc9370339e4f311a9e1d2c7cae77a9d45639.zip
target-xtensa: add test for IBREAK invalidation
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/xtensa/test_break.S34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/tcg/xtensa/test_break.S b/tests/tcg/xtensa/test_break.S
index 8a8db8033..7574cbefc 100644
--- a/tests/tcg/xtensa/test_break.S
+++ b/tests/tcg/xtensa/test_break.S
@@ -91,6 +91,40 @@ test ibreak
assert eq, a2, a3
test_end
+test ibreak_remove
+ set_vector debug_vector, 3f
+ rsil a2, debug_level - 1
+ movi a2, 2f
+ wsr a2, ibreaka0
+ movi a3, 1
+1:
+ wsr a3, ibreakenable
+ isync
+2:
+ beqz a3, 4f
+ test_fail
+3:
+ assert eqi, a3, 1
+ rsr a2, ps
+ movi a3, 0x1f
+ and a2, a2, a3
+ movi a3, 0x10 | debug_level
+ assert eq, a2, a3
+ rsr a2, epc6
+ movi a3, 2b
+ assert eq, a2, a3
+ rsr a2, debugcause
+ movi a3, 0x2
+ assert eq, a2, a3
+
+ movi a2, 0x40000
+ wsr a2, ps
+ isync
+ movi a3, 0
+ j 1b
+4:
+test_end
+
test ibreak_priority
set_vector debug_vector, 2f
rsil a2, debug_level - 1