aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/xtensa/test_interrupt.S
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-01-25 16:36:57 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-01-25 16:36:57 +0000
commite32c41e4f65f4d16508fe759a800538a73608839 (patch)
tree288ad9c192a4d6b58d3490eb088450de7153922c /tests/tcg/xtensa/test_interrupt.S
parentae5045ae5b2bbd8ce1335d1b05f9ecacca83a6cf (diff)
parent3a3c9dc4ca2eaa612cbd5d4c85d674b15eadfb02 (diff)
Merge remote-tracking branch 'remotes/xtensa/tags/20170124-xtensa' into staging
target/xtensa updates: - refactor CCOUNT/CCOMPARE (use QEMU timers instead of instruction counting); - support icount; run target/xtensa TCG tests with icount; - implement SMP prerequisites: static vector selection, RUNSTALL and RER/WER. # gpg: Signature made Wed 25 Jan 2017 00:27:51 GMT # gpg: using RSA key 0x51F9CC91F83FA044 # gpg: Good signature from "Max Filippov <max.filippov@cogentembedded.com>" # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" # Primary key fingerprint: 2B67 854B 98E5 327D CDEB 17D8 51F9 CC91 F83F A044 * remotes/xtensa/tags/20170124-xtensa: target-xtensa: implement RER/WER instructions target/xtensa: tests: clean up interrupt tests target/xtensa: tests: add memctl test target/xtensa: implement MEMCTL SR target/xtensa: fix ICACHE/DCACHE options detection target/xtensa: tests: add ccount write tests target/xtensa: tests: replace hardcoded interrupt masks target/xtensa: tests: fix timer tests target/xtensa: tests: run tests with icount target/xtensa: don't continue translation after exception target/xtensa: support icount target/xtensa: refactor CCOUNT/CCOMPARE target/xtensa: implement RUNSTALL target/xtensa: add static vectors selection Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/tcg/xtensa/test_interrupt.S')
-rw-r--r--tests/tcg/xtensa/test_interrupt.S27
1 files changed, 20 insertions, 7 deletions
diff --git a/tests/tcg/xtensa/test_interrupt.S b/tests/tcg/xtensa/test_interrupt.S
index 334ddab287..876683518e 100644
--- a/tests/tcg/xtensa/test_interrupt.S
+++ b/tests/tcg/xtensa/test_interrupt.S
@@ -1,5 +1,7 @@
#include "macros.inc"
+#define LSBIT(v) ((v) ^ ((v) & ((v) - 1)))
+
test_suite interrupt
.macro clear_interrupts
@@ -46,14 +48,17 @@ test soft_disabled
set_vector kernel, 1f
clear_interrupts
- movi a2, 0x80
+ movi a2, LSBIT(XCHAL_INTTYPE_MASK_SOFTWARE)
wsr a2, intset
esync
rsr a3, interrupt
+ movi a4, ~XCHAL_INTTYPE_MASK_TIMER
+ and a3, a3, a4
assert eq, a2, a3
wsr a2, intclear
esync
rsr a3, interrupt
+ and a3, a3, a4
assert eqi, a3, 0
j 2f
1:
@@ -65,10 +70,12 @@ test soft_intenable
set_vector kernel, 1f
clear_interrupts
- movi a2, 0x80
+ movi a2, LSBIT(XCHAL_INTTYPE_MASK_SOFTWARE)
wsr a2, intset
esync
rsr a3, interrupt
+ movi a4, ~XCHAL_INTTYPE_MASK_TIMER
+ and a3, a3, a4
assert eq, a2, a3
rsil a3, 0
wsr a2, intenable
@@ -82,10 +89,12 @@ test soft_rsil
set_vector kernel, 1f
clear_interrupts
- movi a2, 0x80
+ movi a2, LSBIT(XCHAL_INTTYPE_MASK_SOFTWARE)
wsr a2, intset
esync
rsr a3, interrupt
+ movi a4, ~XCHAL_INTTYPE_MASK_TIMER
+ and a3, a3, a4
assert eq, a2, a3
wsr a2, intenable
rsil a3, 0
@@ -99,10 +108,12 @@ test soft_waiti
set_vector kernel, 1f
clear_interrupts
- movi a2, 0x80
+ movi a2, LSBIT(XCHAL_INTTYPE_MASK_SOFTWARE)
wsr a2, intset
esync
rsr a3, interrupt
+ movi a4, ~XCHAL_INTTYPE_MASK_TIMER
+ and a3, a3, a4
assert eq, a2, a3
wsr a2, intenable
waiti 0
@@ -116,10 +127,12 @@ test soft_user
set_vector user, 2f
clear_interrupts
- movi a2, 0x80
+ movi a2, LSBIT(XCHAL_INTTYPE_MASK_SOFTWARE)
wsr a2, intset
esync
rsr a3, interrupt
+ movi a4, ~XCHAL_INTTYPE_MASK_TIMER
+ and a3, a3, a4
assert eq, a2, a3
wsr a2, intenable
@@ -139,7 +152,7 @@ test soft_priority
set_vector level3, 2f
clear_interrupts
- movi a2, 0x880
+ movi a2, XCHAL_INTTYPE_MASK_SOFTWARE
wsr a2, intenable
rsil a3, 0
esync
@@ -161,7 +174,7 @@ test eps_epc_rfi
clear_interrupts
reset_ps
- movi a2, 0x880
+ movi a2, XCHAL_INTTYPE_MASK_SOFTWARE
wsr a2, intenable
rsil a3, 0
rsr a3, ps