aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2019-02-18 06:40:38 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2019-02-28 04:43:23 -0800
commit50f0171a9543f7a40abdbd36714fb1201cdc47b0 (patch)
treeeb172efdd17586270d694f41e9d004c580f77dc2 /tests
parentecf5b577592be61b78b5d67724a1ebf559c9e695 (diff)
tests/tcg/xtensa: add straightforward conditionals
Make tests for optional instruction groups conditional on the presence of corresponding options in the config. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/xtensa/test_clamps.S4
-rw-r--r--tests/tcg/xtensa/test_loop.S4
-rw-r--r--tests/tcg/xtensa/test_mac16.S4
-rw-r--r--tests/tcg/xtensa/test_max.S4
-rw-r--r--tests/tcg/xtensa/test_min.S4
-rw-r--r--tests/tcg/xtensa/test_mul16.S4
-rw-r--r--tests/tcg/xtensa/test_mul32.S4
-rw-r--r--tests/tcg/xtensa/test_nsa.S4
-rw-r--r--tests/tcg/xtensa/test_quo.S4
-rw-r--r--tests/tcg/xtensa/test_rem.S4
-rw-r--r--tests/tcg/xtensa/test_rst0.S8
-rw-r--r--tests/tcg/xtensa/test_sext.S4
12 files changed, 52 insertions, 0 deletions
diff --git a/tests/tcg/xtensa/test_clamps.S b/tests/tcg/xtensa/test_clamps.S
index 3efabfd9d3..d9b2c38ac1 100644
--- a/tests/tcg/xtensa/test_clamps.S
+++ b/tests/tcg/xtensa/test_clamps.S
@@ -2,6 +2,8 @@
test_suite clamps
+#if XCHAL_HAVE_CLAMPS
+
test clamps
movi a2, 0
movi a3, 0
@@ -39,4 +41,6 @@ test clamps
assert eq, a3, a2
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_loop.S b/tests/tcg/xtensa/test_loop.S
index 5755578d01..0cfd8661ea 100644
--- a/tests/tcg/xtensa/test_loop.S
+++ b/tests/tcg/xtensa/test_loop.S
@@ -2,6 +2,8 @@
test_suite loop
+#if XCHAL_HAVE_LOOPS
+
test loop
movi a2, 0
movi a3, 5
@@ -160,4 +162,6 @@ test loopgtz
1:
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_mac16.S b/tests/tcg/xtensa/test_mac16.S
index 512025d842..ee0cedd2ae 100644
--- a/tests/tcg/xtensa/test_mac16.S
+++ b/tests/tcg/xtensa/test_mac16.S
@@ -2,6 +2,8 @@
test_suite mac16
+#if XCHAL_HAVE_MAC16
+
#define ext16(v) (((v) & 0xffff) | (((v) & 0x8000) * 0x1ffffffe))
#define mul16(a, b) ((ext16(a) * ext16(b)))
@@ -240,4 +242,6 @@ test mula_dd_lddec
.text
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_max.S b/tests/tcg/xtensa/test_max.S
index 3caa207ea5..f349d578e3 100644
--- a/tests/tcg/xtensa/test_max.S
+++ b/tests/tcg/xtensa/test_max.S
@@ -2,6 +2,8 @@
test_suite max
+#if XCHAL_HAVE_MINMAX
+
test max
movi a2, 0xffffffff
movi a3, 1
@@ -78,4 +80,6 @@ test maxu
assert eq, a3, a4
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_min.S b/tests/tcg/xtensa/test_min.S
index 551cf591e5..89ee10334f 100644
--- a/tests/tcg/xtensa/test_min.S
+++ b/tests/tcg/xtensa/test_min.S
@@ -2,6 +2,8 @@
test_suite min
+#if XCHAL_HAVE_MINMAX
+
test min
movi a2, 0xffffffff
movi a3, 1
@@ -78,4 +80,6 @@ test minu
assert eq, a3, a4
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_mul16.S b/tests/tcg/xtensa/test_mul16.S
index 98fa7042b5..32507f7f1e 100644
--- a/tests/tcg/xtensa/test_mul16.S
+++ b/tests/tcg/xtensa/test_mul16.S
@@ -2,6 +2,8 @@
test_suite mul16
+#if XCHAL_HAVE_MUL16
+
test mul16u_pp
movi a2, 0x137f5a5a
mov a3, a2
@@ -80,4 +82,6 @@ test mul16s_nn
assert eq, a3, a6
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_mul32.S b/tests/tcg/xtensa/test_mul32.S
index b288ead9f6..862d45abce 100644
--- a/tests/tcg/xtensa/test_mul32.S
+++ b/tests/tcg/xtensa/test_mul32.S
@@ -2,6 +2,8 @@
test_suite mul32
+#if XCHAL_HAVE_MUL32
+
test mull
movi a2, 0x137f5a5a
mov a3, a2
@@ -15,6 +17,8 @@ test mull
assert eq, a3, a6
test_end
+#endif
+
/* unfortunately dc232b doesn't have muluh/mulsh*/
test_suite_end
diff --git a/tests/tcg/xtensa/test_nsa.S b/tests/tcg/xtensa/test_nsa.S
index 479b2e2429..0af7d1f50d 100644
--- a/tests/tcg/xtensa/test_nsa.S
+++ b/tests/tcg/xtensa/test_nsa.S
@@ -2,6 +2,8 @@
test_suite nsa
+#if XCHAL_HAVE_NSA
+
test nsa
movi a2, 0
movi a3, 31
@@ -56,4 +58,6 @@ test nsau
assert eq, a3, a2
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_quo.S b/tests/tcg/xtensa/test_quo.S
index 5b3ae383d0..32886b913b 100644
--- a/tests/tcg/xtensa/test_quo.S
+++ b/tests/tcg/xtensa/test_quo.S
@@ -2,6 +2,8 @@
test_suite quo
+#if XCHAL_HAVE_DIV32
+
test quou_pp
movi a2, 0x5a5a137f
mov a3, a2
@@ -144,4 +146,6 @@ test quos_exc
assert eq, a2, a3
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_rem.S b/tests/tcg/xtensa/test_rem.S
index 6357e520d9..0b96bb3390 100644
--- a/tests/tcg/xtensa/test_rem.S
+++ b/tests/tcg/xtensa/test_rem.S
@@ -2,6 +2,8 @@
test_suite rem
+#if XCHAL_HAVE_DIV32
+
test remu_pp
movi a2, 0x5a5a137f
mov a3, a2
@@ -144,4 +146,6 @@ test rems_exc
assert eq, a2, a3
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_rst0.S b/tests/tcg/xtensa/test_rst0.S
index a73366b120..143e90b401 100644
--- a/tests/tcg/xtensa/test_rst0.S
+++ b/tests/tcg/xtensa/test_rst0.S
@@ -54,6 +54,8 @@ test add
assert eq, a4, a6
test_end
+#if XCHAL_HAVE_ADDX
+
test addx2
movi a2, 0x137fa5a5
mov a3, a2
@@ -93,6 +95,8 @@ test addx8
assert eq, a4, a6
test_end
+#endif
+
test sub
movi a2, 0x137fa5a5
mov a3, a2
@@ -106,6 +110,8 @@ test sub
assert eq, a4, a6
test_end
+#if XCHAL_HAVE_ADDX
+
test subx2
movi a2, 0x137fa5a5
mov a3, a2
@@ -145,4 +151,6 @@ test subx8
assert eq, a4, a6
test_end
+#endif
+
test_suite_end
diff --git a/tests/tcg/xtensa/test_sext.S b/tests/tcg/xtensa/test_sext.S
index 087a6333a4..483d2176e4 100644
--- a/tests/tcg/xtensa/test_sext.S
+++ b/tests/tcg/xtensa/test_sext.S
@@ -2,6 +2,8 @@
test_suite sext
+#if XCHAL_HAVE_SEXT
+
test sext
movi a2, 0xffffff5a
movi a3, 0x0000005a
@@ -66,4 +68,6 @@ test sext_same_rs
assert eq, a3, a2
test_end
+#endif
+
test_suite_end