diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2012-04-10 02:48:19 +0400 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-04-14 15:25:39 +0000 |
commit | ec9fe93efe3a1211caa182771725833bbca733e0 (patch) | |
tree | f3de0c263a50d15c189366a603031fec309ec3e4 /tests/tcg/xtensa | |
parent | 3d0be8a5c135dadcfbd68ed354007a8cece98849 (diff) | |
download | qemu-ec9fe93efe3a1211caa182771725833bbca733e0.zip |
target-xtensa: add tests for LBEG/LEND invalidation
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tests/tcg/xtensa')
-rw-r--r-- | tests/tcg/xtensa/test_loop.S | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/tcg/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S index a5ea933913..5cead47a27 100644 --- a/tests/tcg/xtensa/test_loop.S +++ b/tests/tcg/xtensa/test_loop.S @@ -74,4 +74,54 @@ test loop_excm assert eqi, a2, 1 test_end +test lbeg_invalidation + movi a2, 0 + movi a3, 1 + movi a4, 1f + movi a5, 3f + wsr a3, lcount + wsr a4, lbeg + wsr a5, lend + isync + j 1f +.align 4 +1: + addi a2, a2, 1 + j 2f +.align 4 +2: + addi a2, a2, 2 + movi a3, 2b + wsr a3, lbeg + isync + nop +3: + assert eqi, a2, 5 +test_end + +test lend_invalidation + movi a2, 0 + movi a3, 5 + movi a4, 1f + movi a5, 2f + wsr a3, lcount + wsr a4, lbeg + wsr a5, lend + isync + j 1f +.align 4 +1: + addi a2, a2, 1 +2: + beqi a3, 3, 1f + assert eqi, a2, 6 + movi a3, 3 + wsr a3, lcount + wsr a4, lend + isync + j 1b +1: + assert eqi, a2, 7 +test_end + test_suite_end |