Makefile.am revision 55e438b24ef4fb7105f9bea85e6fc33b496e8f6c
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	badseg.stderr.exp badseg.stdout.exp badseg.vgtest \
25	bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \
26	bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \
27	bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \
28	bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \
29	bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \
30	bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \
31	bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \
32	bug152818-x86.stderr.exp bug152818-x86.stdout.exp bug152818-x86.vgtest \
33	cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \
34	cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \
35	cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \
36	faultstatus.disabled faultstatus.stderr.exp \
37	fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \
38	fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \
39	fpu_lazy_eflags.vgtest \
40	fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \
41	getseg.stdout.exp getseg.stderr.exp getseg.vgtest \
42	incdec_alt.stdout.exp incdec_alt.stderr.exp incdec_alt.vgtest \
43	int.stderr.exp int.stdout.exp int.disabled \
44	$(addsuffix .stderr.exp,$(INSN_TESTS)) \
45	$(addsuffix .stdout.exp,$(INSN_TESTS)) \
46	$(addsuffix .vgtest,$(INSN_TESTS)) \
47	insn_sse3.stdout.exp insn_sse3.stderr.exp insn_sse3.vgtest \
48	insn_ssse3.stdout.exp insn_ssse3.stderr.exp insn_ssse3.vgtest \
49	jcxz.stdout.exp jcxz.stderr.exp jcxz.vgtest \
50	lahf.stdout.exp lahf.stderr.exp lahf.vgtest \
51	looper.stderr.exp looper.stdout.exp looper.vgtest \
52	lzcnt32.stderr.exp lzcnt32.stdout.exp lzcnt32.vgtest \
53	movx.stderr.exp movx.stdout.exp movx.vgtest \
54	pushpopseg.stderr.exp pushpopseg.stdout.exp pushpopseg.vgtest \
55	sbbmisc.stderr.exp sbbmisc.stdout.exp sbbmisc.vgtest \
56	smc1.stderr.exp smc1.stdout.exp smc1.vgtest \
57	ssse3_misaligned.stderr.exp ssse3_misaligned.stdout.exp \
58	ssse3_misaligned.vgtest ssse3_misaligned.c \
59	x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \
60	yield.stderr.exp yield.stdout.exp yield.disabled \
61	xadd.stdout.exp xadd.stderr.exp xadd.vgtest
62
63check_PROGRAMS = \
64	badseg \
65	bt_everything \
66	bt_literal \
67	bug125959-x86 \
68	bug126147-x86 \
69	bug132813-x86 \
70	bug135421-x86 \
71	bug137714-x86 \
72	bug152818-x86 \
73	cmpxchg8b \
74	cpuid \
75	cse_fail \
76	faultstatus \
77	fcmovnu \
78	fpu_lazy_eflags \
79	fxtract \
80	getseg \
81	incdec_alt \
82	$(INSN_TESTS) \
83	int \
84	jcxz \
85	lahf \
86	looper \
87	movx \
88	pushpopseg \
89	sbbmisc \
90	smc1 \
91	x86locked \
92	yield \
93	xadd
94if BUILD_SSSE3_TESTS
95   check_PROGRAMS += ssse3_misaligned
96endif
97if BUILD_LZCNT_TESTS
98 check_PROGRAMS += lzcnt32
99endif
100
101
102AM_CFLAGS    += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
103AM_CXXFLAGS  += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE)
104AM_CCASFLAGS += @FLAG_M32@
105
106if VGCONF_OS_IS_DARWIN
107# Some of the tests (bug125959_x86, bug152818_x86, insn_*) need
108# -mdynamic-no-pic.  I tried setting *_CFLAGS separately for all of them,
109# but it caused problems with the generation of insn_*.c.  So just use this
110# crude approach of setting -mdynamic-no-pic for all tests in this
111# directory.
112AM_CFLAGS += -mdynamic-no-pic
113endif
114
115cpuid_SOURCES 		= cpuid_c.c cpuid_s.S
116# fpu_lazy_eflags must use these flags -- the bug only occurred with them.
117fpu_lazy_eflags_CFLAGS	= $(AM_CFLAGS) -O2 -march=pentiumpro
118fxtract_LDADD		= -lm
119insn_basic_SOURCES	= insn_basic.def
120insn_basic_LDADD	= -lm
121insn_fpu_SOURCES	= insn_fpu.def
122insn_fpu_LDADD		= -lm
123insn_cmov_SOURCES	= insn_cmov.def
124insn_cmov_LDADD		= -lm
125insn_mmx_SOURCES	= insn_mmx.def
126insn_mmx_LDADD		= -lm
127insn_mmxext_SOURCES	= insn_mmxext.def
128insn_mmxext_LDADD	= -lm
129insn_sse_SOURCES	= insn_sse.def
130insn_sse_LDADD		= -lm
131insn_sse2_SOURCES	= insn_sse2.def
132insn_sse2_LDADD		= -lm
133insn_sse3_SOURCES	= insn_sse3.def
134insn_sse3_LDADD		= -lm
135insn_ssse3_SOURCES	= insn_ssse3.def
136insn_ssse3_LDADD	= -lm
137x86locked_CFLAGS	= $(AM_CFLAGS) -O
138yield_LDADD		= -lpthread
139
140.def.c: $(srcdir)/gen_insn_test.pl
141	$(PERL) $(srcdir)/gen_insn_test.pl < $< > $@
142