]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
tests/tcg/xtensa: add straightforward conditionals
authorMax Filippov <jcmvbkbc@gmail.com>
Mon, 18 Feb 2019 14:40:38 +0000 (06:40 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Thu, 28 Feb 2019 12:43:23 +0000 (04:43 -0800)
Make tests for optional instruction groups conditional on the presence
of corresponding options in the config.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
12 files changed:
tests/tcg/xtensa/test_clamps.S
tests/tcg/xtensa/test_loop.S
tests/tcg/xtensa/test_mac16.S
tests/tcg/xtensa/test_max.S
tests/tcg/xtensa/test_min.S
tests/tcg/xtensa/test_mul16.S
tests/tcg/xtensa/test_mul32.S
tests/tcg/xtensa/test_nsa.S
tests/tcg/xtensa/test_quo.S
tests/tcg/xtensa/test_rem.S
tests/tcg/xtensa/test_rst0.S
tests/tcg/xtensa/test_sext.S

index 3efabfd9d3d92441d952c3c4c113c35de3dbcbf5..d9b2c38ac1d6d9ffaf5695ff28d7c687649080ee 100644 (file)
@@ -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
index 5755578d01912e80c375def15aa2c05c2238991d..0cfd8661ea0e5267916a7d5cc18cec7cafc63c80 100644 (file)
@@ -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
index 512025d842913027a9f914390408ae7d17c3dc6b..ee0cedd2ae5dd3d791216fb1482bea9d0d82c37d 100644 (file)
@@ -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
index 3caa207ea5ec79ffacc6696248d052e441eb3870..f349d578e3bb42bcd7015fcbaeeec3a1b7f3acb0 100644 (file)
@@ -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
index 551cf591e54e3d051b035306276fedaa52dd0157..89ee10334f624d50a255589ab8ed7de46063641a 100644 (file)
@@ -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
index 98fa7042b504e03f86a1794645102767bcefcaae..32507f7f1ef1d20d83ed7499775ea4c6e00bbaed 100644 (file)
@@ -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
index b288ead9f6cb3edcc978778334d5136772c795f1..862d45abcec06167e2bfbc229584a83fac4ed8db 100644 (file)
@@ -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
index 479b2e2429f5841aa7f73dedfd6a3ee09464b671..0af7d1f50d5643ab00ae68ffd9ba098ae3d14cd4 100644 (file)
@@ -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
index 5b3ae383d0cd65e708a9e6f4f904c4a7c3972a5f..32886b913be6c7c26868ba787459bb714a749364 100644 (file)
@@ -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
index 6357e520d97968fe9a33dfe62d09793d817b2931..0b96bb3390abde47906059178709a4eac307d831 100644 (file)
@@ -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
index a73366b1203aceae3e2f5d0385130a1a13002252..143e90b401ec7bf021f746c2e5df6ca413c1943b 100644 (file)
@@ -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
index 087a6333a434c52f296575ce3e9338295f8764cc..483d2176e421f6d74312ca092058ae99b91068b7 100644 (file)
@@ -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