From: Max Filippov <jcmvbkbc@gmail.com>
To: qemu-devel@nongnu.org
Cc: Max Filippov <jcmvbkbc@gmail.com>
Subject: [Qemu-devel] [PATCH 13/23] tests/tcg/xtensa: conditionalize and expand SR tests
Date: Mon, 18 Feb 2019 22:11:01 -0800 [thread overview]
Message-ID: <20190219061111.10231-14-jcmvbkbc@gmail.com> (raw)
In-Reply-To: <20190219061111.10231-1-jcmvbkbc@gmail.com>
Make tests for specific special registers conditional on the presence of
the options that add these registers and test that the registers are not
accessible otherwise.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
tests/tcg/xtensa/test_sr.S | 133 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)
diff --git a/tests/tcg/xtensa/test_sr.S b/tests/tcg/xtensa/test_sr.S
index 052f1e04a72c..e64653b8771e 100644
--- a/tests/tcg/xtensa/test_sr.S
+++ b/tests/tcg/xtensa/test_sr.S
@@ -42,50 +42,183 @@ test_end
test_sr_mask \sr, \conf, 7
.endm
+#if XCHAL_HAVE_MAC16
test_sr acchi, 1
test_sr acclo, 1
+#else
+test_sr_mask /*acchi*/17, 0, 0
+test_sr_mask /*acclo*/16, 0, 0
+#endif
+
+#if XCHAL_HAVE_S32C1I && XCHAL_HW_VERSION >= 230000
+test_sr atomctl, 1
+#else
test_sr_mask /*atomctl*/99, 0, 0
+#endif
+
+#if XCHAL_HAVE_BOOLEANS
+test_sr br, 1
+#else
test_sr_mask /*br*/4, 0, 0
+#endif
+
test_sr_mask /*cacheattr*/98, 0, 0
+
+#if XCHAL_HAVE_CCOUNT
test_sr ccompare0, 1
test_sr ccount, 1
+#else
+test_sr_mask /*ccompare0*/240, 0, 0
+test_sr_mask /*ccount*/234, 0, 0
+#endif
+
+#if XCHAL_HAVE_CP
test_sr cpenable, 1
+#else
+test_sr_mask /*cpenable*/224, 0, 0
+#endif
+
+#if XCHAL_HAVE_DEBUG
+#if XCHAL_NUM_DBREAK
test_sr dbreaka0, 1
test_sr dbreakc0, 1
+#endif
test_sr_mask debugcause, 1, 1
+#else
+test_sr_mask /*dbreaka0*/144, 0, 0
+test_sr_mask /*dbreakc0*/160, 0, 0
+test_sr_mask /*debugcause*/233, 0, 0
+#endif
+
test_sr depc, 1
+
+#if XCHAL_HAVE_PTP_MMU
test_sr dtlbcfg, 1
+#else
+test_sr_mask /*dtlbcfg*/92, 0, 0
+#endif
+
test_sr epc1, 1
+
+#if XCHAL_NUM_INTLEVELS > 1
test_sr epc2, 1
test_sr eps2, 1
+#else
+test_sr_mask /*epc2*/178, 0, 0
+test_sr_mask /*eps2*/194, 0, 0
+#endif
+
test_sr exccause, 1
test_sr excsave1, 1
+
+#if XCHAL_NUM_INTLEVELS > 1
test_sr excsave2, 1
+#else
+test_sr_mask /*excsave2*/210, 0, 0
+#endif
+
test_sr excvaddr, 1
+
+#if XCHAL_HAVE_DEBUG
+#if XCHAL_NUM_IBREAK
test_sr ibreaka0, 1
test_sr ibreakenable, 1
+#endif
test_sr icount, 1
test_sr icountlevel, 1
+#else
+test_sr_mask /*ibreaka0*/128, 0, 0
+test_sr_mask /*ibreakenable*/96, 0, 0
+test_sr_mask /*icount*/236, 0, 0
+test_sr_mask /*icountlevel*/237, 0, 0
+#endif
+
test_sr_mask /*intclear*/227, 0, 2
test_sr_mask /*interrupt*/226, 0, 3
test_sr intenable, 1
+
+#if XCHAL_HAVE_PTP_MMU
test_sr itlbcfg, 1
+#else
+test_sr_mask /*itlbcfg*/91, 0, 0
+#endif
+
+#if XCHAL_HAVE_LOOPS
test_sr lbeg, 1
test_sr lcount, 1
test_sr lend, 1
+#else
+test_sr_mask /*lbeg*/0, 0, 0
+test_sr_mask /*lcount*/2, 0, 0
+test_sr_mask /*lend*/1, 0, 0
+#endif
+
+#if XCHAL_HAVE_ABSOLUTE_LITERALS
test_sr litbase, 1
+#else
+test_sr_mask /*litbase*/5, 0, 0
+#endif
+
+#if XCHAL_HAVE_MAC16
test_sr m0, 1
+#else
+test_sr_mask /*m0*/32, 0, 0
+#endif
+
+#if XCHAL_HW_VERSION >= 250000
+test_sr_mask /*memctl*/97, 0, 7
+#else
test_sr_mask /*memctl*/97, 0, 0
+#endif
+
+#if XCHAL_NUM_MISC_REGS
test_sr misc0, 1
+#else
+test_sr_mask /*misc0*/244, 0, 0
+#endif
+
+#if XCHAL_HAVE_PREFETCH
+test_sr prefctl, 1
+#else
test_sr_mask /*prefctl*/40, 0, 0
+#endif
+
+#if XCHAL_HAVE_PRID
test_sr_mask /*prid*/235, 0, 1
+#else
+test_sr_mask /*prid*/235, 0, 0
+#endif
+
test_sr ps, 1
+
+#if XCHAL_HAVE_PTP_MMU
test_sr ptevaddr, 1
test_sr rasid, 1
+#else
+test_sr_mask /*ptevaddr*/83, 0, 0
+test_sr_mask /*rasid*/90, 0, 0
+#endif
+
test_sr sar, 1
+
+#if XCHAL_HAVE_S32C1I
test_sr scompare1, 1
+#else
+test_sr_mask /*scompare1*/12, 0, 0
+#endif
+
+#if XCHAL_HAVE_VECBASE
test_sr vecbase, 1
+#else
+test_sr_mask /*vecbase*/231, 0, 0
+#endif
+
+#if XCHAL_HAVE_WINDOWED
test_sr windowbase, 1
test_sr windowstart, 1
+#else
+test_sr_mask /*windowbase*/72, 0, 0
+test_sr_mask /*windowstart*/73, 0, 0
+#endif
test_suite_end
--
2.11.0
next prev parent reply other threads:[~2019-02-19 6:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 6:10 [Qemu-devel] [PATCH 00/23] tests/tcg/xtensa: conditionalize xtensa tests Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 01/23] target/xtensa: implement PREFCTL SR Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 02/23] tests/tcg/xtensa: indicate failed tests Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 03/23] tests/tcg/xtensa: support configurations w/o vecbase Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 04/23] tests/tcg/xtensa: support configs with LITBASE Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 05/23] tests/tcg/xtensa: don't use optional opcodes in generic code Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 06/23] tests/tcg/xtensa: fix endianness issues in test_b Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 07/23] tests/tcg/xtensa: enable boolean tests Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 08/23] tests/tcg/xtensa: conditionalize debug option tests Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 09/23] tests/tcg/xtensa: conditionalize cache " Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 10/23] tests/tcg/xtensa: add straightforward conditionals Max Filippov
2019-02-19 6:10 ` [Qemu-devel] [PATCH 11/23] tests/tcg/xtensa: conditionalize interrupt tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 12/23] tests/tcg/xtensa: conditionalize timer/CCOUNT tests Max Filippov
2019-02-19 6:11 ` Max Filippov [this message]
2019-02-19 6:11 ` [Qemu-devel] [PATCH 14/23] tests/tcg/xtensa: fix SR tests for big endian configs Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 15/23] tests/tcg/xtensa: conditionalize and fix s32c1i tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 16/23] tests/tcg/xtensa: conditionalize windowed register tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 17/23] tests/tcg/xtensa: conditionalize MMU-related tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 18/23] tests/tcg/xtensa: add test for FLIX Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 19/23] tests/tcg/xtensa: add LSCI/LSCX group tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 20/23] tests/tcg/xtensa: add FP0 group arithmetic tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 21/23] tests/tcg/xtensa: add FP0 group conversion tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 22/23] tests/tcg/xtensa: add FP1 group tests Max Filippov
2019-02-19 6:11 ` [Qemu-devel] [PATCH 23/23] tests/tcg/xtensa: add FPU2000 coprocessor tests Max Filippov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219061111.10231-14-jcmvbkbc@gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.