]>
Commit | Line | Data |
---|---|---|
dff2441c | 1 | ## |
1c629814 | 2 | ## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. |
dff2441c TS |
3 | ## |
4 | ## This program is free software; you can redistribute it and/or modify | |
5 | ## it under the terms of the GNU General Public License as published by | |
6 | ## the Free Software Foundation; either version 2 of the License, or | |
7 | ## (at your option) any later version. | |
8 | ## | |
9 | ## This program is distributed in the hope that it will be useful, | |
10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | ## GNU General Public License for more details. | |
13 | ## | |
14 | ## You should have received a copy of the GNU General Public License | |
15 | ## along with this program; if not, see <http://www.gnu.org/licenses/>. | |
16 | ## | |
17 | ||
18 | # Hexagon doesn't support gdb, so skip the EXTRA_RUNS | |
19 | EXTRA_RUNS = | |
20 | ||
dff2441c | 21 | CFLAGS += -Wno-incompatible-pointer-types -Wno-undefined-internal |
580731dc | 22 | CFLAGS += -fno-unroll-loops -fno-stack-protector |
825d6eba TS |
23 | |
24 | HEX_SRC=$(SRC_PATH)/tests/tcg/hexagon | |
25 | VPATH += $(HEX_SRC) | |
26 | ||
585a86b1 | 27 | %: $(HEX_SRC)/%.S $(HEX_SRC)/crt.S |
825d6eba TS |
28 | $(CC) -static -mv67 -nostdlib $^ -o $@ |
29 | ||
30 | HEX_TESTS = first | |
c23b5764 | 31 | HEX_TESTS += hex_sigsegv |
825d6eba | 32 | HEX_TESTS += misc |
4d04395a | 33 | HEX_TESTS += usr |
825d6eba TS |
34 | HEX_TESTS += preg_alias |
35 | HEX_TESTS += dual_stores | |
d934c16d | 36 | HEX_TESTS += multi_result |
825d6eba | 37 | HEX_TESTS += mem_noshuf |
15fc6bad | 38 | HEX_TESTS += mem_noshuf_exception |
46ef47e2 | 39 | HEX_TESTS += circ |
af7f1821 | 40 | HEX_TESTS += brev |
0d0b91a8 | 41 | HEX_TESTS += load_unpack |
7aa9ffab | 42 | HEX_TESTS += load_align |
825d6eba | 43 | HEX_TESTS += atomics |
703c08d9 | 44 | HEX_TESTS += fpstuff |
b9dd6ff9 | 45 | HEX_TESTS += overflow |
c979d901 | 46 | HEX_TESTS += signal_context |
d63aeb3b | 47 | HEX_TESTS += reg_mut |
00e64fda | 48 | HEX_TESTS += read_write_overlap |
1c629814 TS |
49 | HEX_TESTS += vector_add_int |
50 | HEX_TESTS += scatter_gather | |
51 | HEX_TESTS += hvx_misc | |
52 | HEX_TESTS += hvx_histogram | |
14edcf11 MTB |
53 | HEX_TESTS += invalid-slots |
54 | ||
55 | run-and-check-exception = $(call run-test,$2,$3 2>$2.stderr; \ | |
56 | test $$? -eq 1 && grep -q "exception $(strip $1)" $2.stderr) | |
57 | ||
58 | run-invalid-slots: invalid-slots | |
59 | $(call run-and-check-exception, 0x15, $@, $(QEMU) $(QEMU_OPTS) $<) | |
825d6eba | 60 | |
585a86b1 NI |
61 | HEX_TESTS += test_abs |
62 | HEX_TESTS += test_bitcnt | |
63 | HEX_TESTS += test_bitsplit | |
64 | HEX_TESTS += test_call | |
65 | HEX_TESTS += test_clobber | |
66 | HEX_TESTS += test_cmp | |
67 | HEX_TESTS += test_dotnew | |
68 | HEX_TESTS += test_ext | |
69 | HEX_TESTS += test_fibonacci | |
70 | HEX_TESTS += test_hl | |
71 | HEX_TESTS += test_hwloops | |
72 | HEX_TESTS += test_jmp | |
73 | HEX_TESTS += test_lsr | |
74 | HEX_TESTS += test_mpyi | |
75 | HEX_TESTS += test_packet | |
76 | HEX_TESTS += test_reorder | |
77 | HEX_TESTS += test_round | |
78 | HEX_TESTS += test_vavgw | |
79 | HEX_TESTS += test_vcmpb | |
80 | HEX_TESTS += test_vcmpw | |
81 | HEX_TESTS += test_vlsrw | |
82 | HEX_TESTS += test_vmaxh | |
83 | HEX_TESTS += test_vminh | |
84 | HEX_TESTS += test_vpmpyh | |
85 | HEX_TESTS += test_vspliceb | |
86 | ||
860132e2 | 87 | HEX_TESTS += v68_scalar |
d636fb70 | 88 | HEX_TESTS += v68_hvx |
6c61d4e1 | 89 | HEX_TESTS += v69_hvx |
4dd311ed | 90 | HEX_TESTS += v73_scalar |
860132e2 | 91 | |
825d6eba | 92 | TESTS += $(HEX_TESTS) |
4d04395a | 93 | |
0d57cd61 TS |
94 | atomics: atomics.c hex_test.h |
95 | brev: brev.c hex_test.h | |
96 | circ: circ.c hex_test.h | |
97 | dual_stores: dual_stores.c hex_test.h | |
98 | fpstuff: fpstuff.c hex_test.h | |
99 | hex_sigsegv: hex_sigsegv.c hex_test.h | |
100 | load_align: load_align.c hex_test.h | |
101 | load_unpack: load_unpack.c hex_test.h | |
102 | mem_noshuf_exception: mem_noshuf_exception.c hex_test.h | |
103 | mem_noshuf: mem_noshuf.c hex_test.h | |
104 | misc: misc.c hex_test.h | |
105 | multi_result: multi_result.c hex_test.h | |
106 | overflow: overflow.c hex_test.h | |
107 | preg_alias: preg_alias.c hex_test.h | |
108 | read_write_overlap: read_write_overlap.c hex_test.h | |
109 | reg_mut: reg_mut.c hex_test.h | |
110 | ||
4d04395a | 111 | # This test has to be compiled for the -mv67t target |
0d57cd61 | 112 | usr: usr.c hex_test.h |
4d04395a TS |
113 | $(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined $< -o $@ $(LDFLAGS) |
114 | ||
fc2622f6 TS |
115 | # Build this test with -mv71 to exercise the CABAC instruction |
116 | misc: misc.c | |
117 | $(CC) $(CFLAGS) -mv71 -O2 $< -o $@ $(LDFLAGS) | |
1c629814 TS |
118 | scatter_gather: CFLAGS += -mhvx |
119 | vector_add_int: CFLAGS += -mhvx -fvectorize | |
761e1c67 | 120 | hvx_misc: hvx_misc.c hvx_misc.h |
1c629814 TS |
121 | hvx_misc: CFLAGS += -mhvx |
122 | hvx_histogram: CFLAGS += -mhvx -Wno-gnu-folding-constant | |
d636fb70 TS |
123 | v68_hvx: v68_hvx.c hvx_misc.h v6mpy_ref.c.inc |
124 | v68_hvx: CFLAGS += -mhvx -Wno-unused-function | |
6c61d4e1 TS |
125 | v69_hvx: v69_hvx.c hvx_misc.h |
126 | v69_hvx: CFLAGS += -mhvx -Wno-unused-function | |
4dd311ed | 127 | v73_scalar: CFLAGS += -Wno-unused-function |
1c629814 TS |
128 | |
129 | hvx_histogram: hvx_histogram.c hvx_histogram_row.S | |
130 | $(CC) $(CFLAGS) $(CROSS_CC_GUEST_CFLAGS) $^ -o $@ $(LDFLAGS) |