Makefile.am revision 4612846e5f0984904e96650f50e013cb18fa33fb
1
2include $(top_srcdir)/Makefile.tool-tests.am
3
4dist_noinst_SCRIPTS = filter_cpuid filter_stderr gen_insn_test.pl
5
6CLEANFILES = $(addsuffix .c,$(INSN_TESTS))
7
8INSN_TESTS = insn_basic insn_fpu insn_cmov insn_mmx insn_mmxext \
9		insn_sse insn_sse2
10if BUILD_SSE3_TESTS
11   INSN_TESTS += insn_sse3
12endif
13if BUILD_SSSE3_TESTS
14   INSN_TESTS += insn_ssse3
15endif
16
17# Explicitly include insn_sse3 even if ! BUILD_SSE3_TESTS, 
18# to avoid packaging screwups if 'make dist' is run on a machine
19# which failed the BUILD_SSE3_TESTS test in configure.in.
20
21## FIXME: move lzcnt32 to SSE4 conditionalisation, when that happens.
22
23EXTRA_DIST = \
24	aad_aam.stdout.exp aad_aam.stderr.exp aad_aam.vgtest \
25	badseg.stderr.exp badseg.stdout.exp badseg.vgtest \
26	bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \
27	bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
28	bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \
29	bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \
30	bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \
31	bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \
32	bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \
33	bug152818-x86.stderr.exp bug152818-x86.stdout.exp bug152818-x86.vgtest \
34	cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
35	cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
36	cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \
37	faultstatus.disabled faultstatus.stderr.exp \
38	fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
39	fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \
40	fpu_lazy_eflags.vgtest \
41	fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \
42	fxtract.stdout.exp-older-glibc \
43	getseg.stdout.exp getseg.stderr.exp getseg.vgtest \
44	incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \
45	int.stderr.exp int.stdout.exp int.disabled \
46	$(addsuffix .stderr.exp,$(INSN_TESTS)) \
47	$(addsuffix .stdout.exp,$(INSN_TESTS)) \
48	$(addsuffix .vgtest,$(INSN_TESTS)) \
49	insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \
50	insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
51	jcxz.stdout.exp jcxz.stderr.exp jcxz.vgtest \
52	lahf.stdout.exp lahf.stderr.exp lahf.vgtest \
53	looper.stderr.exp looper.stdout.exp looper.vgtest \
54	lzcnt32.stderr.exp lzcnt32.stdout.exp lzcnt32.vgtest \
55	movx.stderr.exp movx.stdout.exp movx.vgtest \
56	movbe.stderr.exp movbe.stdout.exp movbe.vgtest \
57	pushpopseg.stderr.exp pushpopseg.stdout.exp pushpopseg.vgtest \
58	sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \
59	shift_ndep.stderr.exp shift_ndep.stdout.exp shift_ndep.vgtest \
60	smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
61	ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \
62	ssse3_misaligned.vgtest ssse3_misaligned.c \
63	x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \
64	x87trigOOR.vgtest x87trigOOR.stdout.exp x87trigOOR.stderr.exp \
65	yield.stderr.exp yield.stdout.exp yield.disabled \
66	xadd.stdout.exp xadd.stderr.exp xadd.vgtest
67
68check_PROGRAMS = \
69	aad_aam \
70	allexec \
71	badseg \
72	bt_everything \
73	bt_literal \
74	bug125959-x86 \
75	bug126147-x86 \
76	bug132813-x86 \
77	bug135421-x86 \
78	bug137714-x86 \
79	bug152818-x86 \
80	cmpxchg8b \
81	cpuid \
82	fcmovnu \
83	fpu_lazy_eflags \
84	fxtract \
85	getseg \
86	incdec_alt \
87	$(INSN_TESTS) \
88	int \
89	jcxz \
90	lahf \
91	looper \
92	movx \
93	pushpopseg \
94	sbbmisc \
95	shift_ndep \
96	smc1 \
97	x86locked \
98	x87trigOOR \
99	yield \
100	xadd
101if BUILD_SSSE3_TESTS
102   check_PROGRAMS += ssse3_misaligned
103endif
104if BUILD_LZCNT_TESTS
105 check_PROGRAMS += lzcnt32
106endif
107if !VGCONF_OS_IS_DARWIN
108 check_PROGRAMS += cse_fail faultstatus
109endif
110if BUILD_MOVBE_TESTS
111 check_PROGRAMS += movbe
112endif
113
114
115AM_CFLAGS    += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
116AM_CXXFLAGS  += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
117AM_CCASFLAGS += @FLAG_M32@
118
119allexec_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
120
121if VGCONF_OS_IS_DARWIN
122# Some of the tests (bug125959_x86, bug152818_x86, insn_*) need
123# -mdynamic-no-pic.  I tried setting *_CFLAGS separately for all of them,
124# but it caused problems with the generation of insn_*.c.  So just use this
125# crude approach of setting -mdynamic-no-pic for all tests in this
126# directory.
127AM_CFLAGS += -mdynamic-no-pic
128endif
129
130cpuid_SOURCES 		= cpuid_c.c cpuid_s.S
131# fpu_lazy_eflags must use these flags -- the bug only occurred with them.
132fpu_lazy_eflags_CFLAGS	= $(AM_CFLAGS) -O2 -march=pentiumpro
133fxtract_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_OVERFLOW@
134fxtract_LDADD		= -lm
135insn_basic_SOURCES	= insn_basic.def
136insn_basic_LDADD	= -lm
137insn_fpu_SOURCES	= insn_fpu.def
138insn_fpu_LDADD		= -lm
139insn_cmov_SOURCES	= insn_cmov.def
140insn_cmov_LDADD		= -lm
141insn_mmx_SOURCES	= insn_mmx.def
142insn_mmx_LDADD		= -lm
143insn_mmxext_SOURCES	= insn_mmxext.def
144insn_mmxext_LDADD	= -lm
145insn_sse_SOURCES	= insn_sse.def
146insn_sse_LDADD		= -lm
147insn_sse2_SOURCES	= insn_sse2.def
148insn_sse2_LDADD		= -lm
149insn_sse3_SOURCES	= insn_sse3.def
150insn_sse3_LDADD		= -lm
151insn_ssse3_SOURCES	= insn_ssse3.def
152insn_ssse3_LDADD	= -lm
153x86locked_CFLAGS	= $(AM_CFLAGS) -O
154yield_LDADD		= -lpthread
155
156.def.c: $(srcdir)/gen_insn_test.pl
157	$(PERL) $(srcdir)/gen_insn_test.pl < $< > $@
158