2 include $(top_srcdir)/Makefile.tool-tests.am
4 dist_noinst_SCRIPTS = filter_cpuid filter_inf_nan filter_stderr gen_insn_test.pl
6 CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
8 INSN_TESTS = insn_basic insn_cmov insn_mmx insn_mmxext insn_sse insn_sse2
11 INSN_TESTS += insn_ssse3
14 if !SOLARIS_SUN_STUDIO_AS
15 # Sun Studio assembler fails to build some tests (illegal mnemonic).
16 INSN_TESTS += insn_sse3
20 if !SOLARIS_SUN_STUDIO_AS
21 # Sun Studio assembler fails to build some tests (illegal mnemonic).
22 INSN_TESTS += insn_fpu
25 # Explicitly include insn_sse3 even if ! BUILD_SSE3_TESTS,
26 # to avoid packaging screwups if 'make dist' is run on a machine
27 # which failed the BUILD_SSE3_TESTS test in configure.in.
29 ## FIXME: move lzcnt32 to SSE4 conditionalisation, when that happens.
32 aad_aam.stdout.exp aad_aam.stderr.exp aad_aam.vgtest \
33 badseg.stderr.exp badseg.stdout.exp badseg.stdout.exp-solaris \
35 bswapw.stderr.exp bswapw.stdout.exp bswapw.vgtest \
36 bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \
37 bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
38 bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \
39 bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \
40 bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \
41 bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \
42 bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \
43 bug152818-x86.stderr.exp bug152818-x86.stdout.exp bug152818-x86.vgtest \
44 cet_nops.stderr.exp cet_nops.stdout.exp cet_nops.vgtest \
45 cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
46 cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
47 cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \
48 faultstatus.disabled faultstatus.stderr.exp \
49 fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
50 fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \
51 fpu_lazy_eflags.vgtest \
52 fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \
53 fxtract.stdout.exp-older-glibc \
54 getseg.stdout.exp getseg.stderr.exp getseg.vgtest \
55 gnu_binutils_nop.stderr.exp gnu_binutils_nop.vgtest \
56 incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \
57 int.stderr.exp int.stdout.exp int.disabled \
58 $(addsuffix .stderr.exp,$(INSN_TESTS)) \
59 $(addsuffix .stdout.exp,$(INSN_TESTS)) \
60 $(addsuffix .vgtest,$(INSN_TESTS)) \
61 insn_fpu.stdout.exp insn_fpu.stderr.exp insn_fpu.vgtest \
62 insn_sse.stdout.exp insn_sse.stderr.exp insn_sse.vgtest \
63 insn_sse2.stdout.exp insn_sse2.stderr.exp insn_sse2.vgtest \
64 insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \
65 insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
66 jcxz.stdout.exp jcxz.stderr.exp jcxz.vgtest \
67 lahf.stdout.exp lahf.stderr.exp lahf.vgtest \
68 looper.stderr.exp looper.stdout.exp looper.vgtest \
69 lzcnt32.stderr.exp lzcnt32.stdout.exp lzcnt32.vgtest \
70 movx.stderr.exp movx.stdout.exp movx.vgtest \
71 movbe.stderr.exp movbe.stdout.exp movbe.vgtest \
72 pushpopseg.stderr.exp pushpopseg.stdout.exp pushpopseg.vgtest \
73 sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \
74 shift_ndep.stderr.exp shift_ndep.stdout.exp shift_ndep.vgtest \
75 smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
76 ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \
77 ssse3_misaligned.vgtest ssse3_misaligned.c \
78 sse4-x86.stdout.exp sse4-x86.stderr.exp sse4-x86.vgtest \
79 x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \
80 x87trigOOR.vgtest x87trigOOR.stdout.exp x87trigOOR.stderr.exp \
81 yield.stderr.exp yield.stdout.exp yield.disabled \
82 xadd.stdout.exp xadd.stderr.exp xadd.vgtest
121 check_PROGRAMS += ssse3_misaligned
124 check_PROGRAMS += sse4-x86
127 check_PROGRAMS += lzcnt32
130 check_PROGRAMS += movbe
132 if !VGCONF_OS_IS_DARWIN
133 if !SOLARIS_SUN_STUDIO_AS
134 # Sun Studio assembler fails to assemble the bound instruction
135 if !COMPILER_IS_CLANG
136 # clang errors out complaining that %eax as the 1st operand in the bound
137 # insn is an invalid operand.
138 check_PROGRAMS += faultstatus
142 if !SOLARIS_SUN_STUDIO_AS
143 # Sun Studio assembler fails to assemble pushw %fs, popw %fs
144 check_PROGRAMS += pushpopseg
148 AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
149 AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
150 AM_CCASFLAGS += @FLAG_M32@
152 allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
154 if VGCONF_OS_IS_DARWIN
155 # Some of the tests (bug125959_x86, bug152818_x86, insn_*) need
156 # -mdynamic-no-pic. I tried setting *_CFLAGS separately for all of them,
157 # but it caused problems with the generation of insn_*.c. So just use this
158 # crude approach of setting -mdynamic-no-pic for all tests in this
160 AM_CFLAGS += -mdynamic-no-pic
163 cpuid_SOURCES = cpuid_c.c cpuid_s.S
164 # fpu_lazy_eflags must use these flags -- the bug only occurred with them.
165 fpu_lazy_eflags_CFLAGS = $(AM_CFLAGS) -O2 -march=pentiumpro
166 fxtract_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_OVERFLOW@
168 insn_basic_SOURCES = insn_basic.def
169 insn_basic_LDADD = -lm
170 insn_fpu_SOURCES = insn_fpu.def
172 insn_cmov_SOURCES = insn_cmov.def
173 insn_cmov_LDADD = -lm
174 insn_mmx_SOURCES = insn_mmx.def
176 insn_mmxext_SOURCES = insn_mmxext.def
177 insn_mmxext_LDADD = -lm
178 insn_sse_SOURCES = insn_sse.def
180 insn_sse2_SOURCES = insn_sse2.def
181 insn_sse2_LDADD = -lm
182 insn_sse3_SOURCES = insn_sse3.def
183 insn_sse3_LDADD = -lm
184 insn_ssse3_SOURCES = insn_ssse3.def
185 insn_ssse3_LDADD = -lm
186 x86locked_CFLAGS = $(AM_CFLAGS) -O
187 yield_LDADD = -lpthread
190 $(PERL) $(srcdir)/gen_insn_test.pl < $< > $@