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>
This commit is contained in:
parent
ecf5b57759
commit
50f0171a95
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite clamps
|
test_suite clamps
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_CLAMPS
|
||||||
|
|
||||||
test clamps
|
test clamps
|
||||||
movi a2, 0
|
movi a2, 0
|
||||||
movi a3, 0
|
movi a3, 0
|
||||||
|
@ -39,4 +41,6 @@ test clamps
|
||||||
assert eq, a3, a2
|
assert eq, a3, a2
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite loop
|
test_suite loop
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_LOOPS
|
||||||
|
|
||||||
test loop
|
test loop
|
||||||
movi a2, 0
|
movi a2, 0
|
||||||
movi a3, 5
|
movi a3, 5
|
||||||
|
@ -160,4 +162,6 @@ test loopgtz
|
||||||
1:
|
1:
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite mac16
|
test_suite mac16
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_MAC16
|
||||||
|
|
||||||
#define ext16(v) (((v) & 0xffff) | (((v) & 0x8000) * 0x1ffffffe))
|
#define ext16(v) (((v) & 0xffff) | (((v) & 0x8000) * 0x1ffffffe))
|
||||||
#define mul16(a, b) ((ext16(a) * ext16(b)))
|
#define mul16(a, b) ((ext16(a) * ext16(b)))
|
||||||
|
|
||||||
|
@ -240,4 +242,6 @@ test mula_dd_lddec
|
||||||
.text
|
.text
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite max
|
test_suite max
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_MINMAX
|
||||||
|
|
||||||
test max
|
test max
|
||||||
movi a2, 0xffffffff
|
movi a2, 0xffffffff
|
||||||
movi a3, 1
|
movi a3, 1
|
||||||
|
@ -78,4 +80,6 @@ test maxu
|
||||||
assert eq, a3, a4
|
assert eq, a3, a4
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite min
|
test_suite min
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_MINMAX
|
||||||
|
|
||||||
test min
|
test min
|
||||||
movi a2, 0xffffffff
|
movi a2, 0xffffffff
|
||||||
movi a3, 1
|
movi a3, 1
|
||||||
|
@ -78,4 +80,6 @@ test minu
|
||||||
assert eq, a3, a4
|
assert eq, a3, a4
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite mul16
|
test_suite mul16
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_MUL16
|
||||||
|
|
||||||
test mul16u_pp
|
test mul16u_pp
|
||||||
movi a2, 0x137f5a5a
|
movi a2, 0x137f5a5a
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -80,4 +82,6 @@ test mul16s_nn
|
||||||
assert eq, a3, a6
|
assert eq, a3, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite mul32
|
test_suite mul32
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_MUL32
|
||||||
|
|
||||||
test mull
|
test mull
|
||||||
movi a2, 0x137f5a5a
|
movi a2, 0x137f5a5a
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -15,6 +17,8 @@ test mull
|
||||||
assert eq, a3, a6
|
assert eq, a3, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* unfortunately dc232b doesn't have muluh/mulsh*/
|
/* unfortunately dc232b doesn't have muluh/mulsh*/
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite nsa
|
test_suite nsa
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_NSA
|
||||||
|
|
||||||
test nsa
|
test nsa
|
||||||
movi a2, 0
|
movi a2, 0
|
||||||
movi a3, 31
|
movi a3, 31
|
||||||
|
@ -56,4 +58,6 @@ test nsau
|
||||||
assert eq, a3, a2
|
assert eq, a3, a2
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite quo
|
test_suite quo
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_DIV32
|
||||||
|
|
||||||
test quou_pp
|
test quou_pp
|
||||||
movi a2, 0x5a5a137f
|
movi a2, 0x5a5a137f
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -144,4 +146,6 @@ test quos_exc
|
||||||
assert eq, a2, a3
|
assert eq, a2, a3
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite rem
|
test_suite rem
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_DIV32
|
||||||
|
|
||||||
test remu_pp
|
test remu_pp
|
||||||
movi a2, 0x5a5a137f
|
movi a2, 0x5a5a137f
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -144,4 +146,6 @@ test rems_exc
|
||||||
assert eq, a2, a3
|
assert eq, a2, a3
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -54,6 +54,8 @@ test add
|
||||||
assert eq, a4, a6
|
assert eq, a4, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_ADDX
|
||||||
|
|
||||||
test addx2
|
test addx2
|
||||||
movi a2, 0x137fa5a5
|
movi a2, 0x137fa5a5
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -93,6 +95,8 @@ test addx8
|
||||||
assert eq, a4, a6
|
assert eq, a4, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test sub
|
test sub
|
||||||
movi a2, 0x137fa5a5
|
movi a2, 0x137fa5a5
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -106,6 +110,8 @@ test sub
|
||||||
assert eq, a4, a6
|
assert eq, a4, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_ADDX
|
||||||
|
|
||||||
test subx2
|
test subx2
|
||||||
movi a2, 0x137fa5a5
|
movi a2, 0x137fa5a5
|
||||||
mov a3, a2
|
mov a3, a2
|
||||||
|
@ -145,4 +151,6 @@ test subx8
|
||||||
assert eq, a4, a6
|
assert eq, a4, a6
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
test_suite sext
|
test_suite sext
|
||||||
|
|
||||||
|
#if XCHAL_HAVE_SEXT
|
||||||
|
|
||||||
test sext
|
test sext
|
||||||
movi a2, 0xffffff5a
|
movi a2, 0xffffff5a
|
||||||
movi a3, 0x0000005a
|
movi a3, 0x0000005a
|
||||||
|
@ -66,4 +68,6 @@ test sext_same_rs
|
||||||
assert eq, a3, a2
|
assert eq, a3, a2
|
||||||
test_end
|
test_end
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
test_suite_end
|
test_suite_end
|
||||||
|
|
Loading…
Reference in New Issue