1 2include $(top_srcdir)/Makefile.tool-tests.am 3 4dist_noinst_SCRIPTS = filter_cpuid filter_inf_nan filter_stderr gen_insn_test.pl 5 6CLEANFILES = $(addsuffix .c,$(INSN_TESTS)) 7 8INSN_TESTS = insn_basic insn_cmov insn_mmx insn_mmxext 9 10if !COMPILER_IS_CLANG 11 INSN_TESTS += insn_sse insn_sse2 12if BUILD_SSSE3_TESTS 13 INSN_TESTS += insn_ssse3 14endif 15if BUILD_SSE3_TESTS 16if !SOLARIS_SUN_STUDIO_AS 17# Sun Studio assembler fails to build some tests (illegal mnemonic). 18 INSN_TESTS += insn_sse3 19endif 20endif 21endif 22 23if !SOLARIS_SUN_STUDIO_AS 24# Sun Studio assembler fails to build some tests (illegal mnemonic). 25 INSN_TESTS += insn_fpu 26endif 27 28# Explicitly include insn_sse3 even if ! BUILD_SSE3_TESTS, 29# to avoid packaging screwups if 'make dist' is run on a machine 30# which failed the BUILD_SSE3_TESTS test in configure.in. 31 32## FIXME: move lzcnt32 to SSE4 conditionalisation, when that happens. 33 34EXTRA_DIST = \ 35 aad_aam.stdout.exp aad_aam.stderr.exp aad_aam.vgtest \ 36 badseg.stderr.exp badseg.stdout.exp badseg.stdout.exp-solaris \ 37 badseg.vgtest \ 38 bt_everything.stderr.exp bt_everything.stdout.exp bt_everything.vgtest \ 39 bt_literal.stderr.exp bt_literal.stdout.exp bt_literal.vgtest \ 40 bug125959-x86.stderr.exp bug125959-x86.stdout.exp bug125959-x86.vgtest \ 41 bug126147-x86.stderr.exp bug126147-x86.stdout.exp bug126147-x86.vgtest \ 42 bug132813-x86.stderr.exp bug132813-x86.stdout.exp bug132813-x86.vgtest \ 43 bug135421-x86.stderr.exp bug135421-x86.stdout.exp bug135421-x86.vgtest \ 44 bug137714-x86.stderr.exp bug137714-x86.stdout.exp bug137714-x86.vgtest \ 45 bug152818-x86.stderr.exp bug152818-x86.stdout.exp bug152818-x86.vgtest \ 46 cmpxchg8b.stderr.exp cmpxchg8b.stdout.exp cmpxchg8b.vgtest \ 47 cpuid.stderr.exp cpuid.stdout.exp cpuid.vgtest \ 48 cse_fail.stderr.exp cse_fail.stdout.exp cse_fail.vgtest \ 49 faultstatus.disabled faultstatus.stderr.exp \ 50 fcmovnu.vgtest fcmovnu.stderr.exp fcmovnu.stdout.exp \ 51 fpu_lazy_eflags.stderr.exp fpu_lazy_eflags.stdout.exp \ 52 fpu_lazy_eflags.vgtest \ 53 fxtract.stdout.exp fxtract.stderr.exp fxtract.vgtest \ 54 fxtract.stdout.exp-older-glibc \ 55 getseg.stdout.exp getseg.stderr.exp getseg.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 x86locked.vgtest x86locked.stdout.exp x86locked.stderr.exp \ 79 x87trigOOR.vgtest x87trigOOR.stdout.exp x87trigOOR.stderr.exp \ 80 yield.stderr.exp yield.stdout.exp yield.disabled \ 81 xadd.stdout.exp xadd.stderr.exp xadd.vgtest 82 83check_PROGRAMS = \ 84 aad_aam \ 85 allexec \ 86 badseg \ 87 bt_everything \ 88 bt_literal \ 89 bug125959-x86 \ 90 bug126147-x86 \ 91 bug132813-x86 \ 92 bug135421-x86 \ 93 bug137714-x86 \ 94 bug152818-x86 \ 95 cmpxchg8b \ 96 cpuid \ 97 cse_fail \ 98 fcmovnu \ 99 fpu_lazy_eflags \ 100 fxtract \ 101 getseg \ 102 incdec_alt \ 103 $(INSN_TESTS) \ 104 int \ 105 jcxz \ 106 lahf \ 107 looper \ 108 movx \ 109 sbbmisc \ 110 shift_ndep \ 111 smc1 \ 112 x86locked \ 113 x87trigOOR \ 114 yield \ 115 xadd 116if BUILD_SSSE3_TESTS 117 check_PROGRAMS += ssse3_misaligned 118endif 119if BUILD_LZCNT_TESTS 120 check_PROGRAMS += lzcnt32 121endif 122if BUILD_MOVBE_TESTS 123 check_PROGRAMS += movbe 124endif 125if !VGCONF_OS_IS_DARWIN 126if !SOLARIS_SUN_STUDIO_AS 127# Sun Studio assembler fails to assemble the bound instruction 128if !COMPILER_IS_CLANG 129# clang errors out complaining that %eax as the 1st operand in the bound 130# insn is an invalid operand. 131 check_PROGRAMS += faultstatus 132endif 133endif 134endif 135if !SOLARIS_SUN_STUDIO_AS 136# Sun Studio assembler fails to assemble pushw %fs, popw %fs 137 check_PROGRAMS += pushpopseg 138endif 139 140 141AM_CFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) 142AM_CXXFLAGS += @FLAG_M32@ $(FLAG_MMMX) $(FLAG_MSSE) 143AM_CCASFLAGS += @FLAG_M32@ 144 145allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ 146 147if VGCONF_OS_IS_DARWIN 148# Some of the tests (bug125959_x86, bug152818_x86, insn_*) need 149# -mdynamic-no-pic. I tried setting *_CFLAGS separately for all of them, 150# but it caused problems with the generation of insn_*.c. So just use this 151# crude approach of setting -mdynamic-no-pic for all tests in this 152# directory. 153AM_CFLAGS += -mdynamic-no-pic 154endif 155 156cpuid_SOURCES = cpuid_c.c cpuid_s.S 157# fpu_lazy_eflags must use these flags -- the bug only occurred with them. 158fpu_lazy_eflags_CFLAGS = $(AM_CFLAGS) -O2 -march=pentiumpro 159fxtract_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_OVERFLOW@ 160fxtract_LDADD = -lm 161insn_basic_SOURCES = insn_basic.def 162insn_basic_LDADD = -lm 163insn_fpu_SOURCES = insn_fpu.def 164insn_fpu_LDADD = -lm 165insn_cmov_SOURCES = insn_cmov.def 166insn_cmov_LDADD = -lm 167insn_mmx_SOURCES = insn_mmx.def 168insn_mmx_LDADD = -lm 169insn_mmxext_SOURCES = insn_mmxext.def 170insn_mmxext_LDADD = -lm 171insn_sse_SOURCES = insn_sse.def 172insn_sse_LDADD = -lm 173insn_sse2_SOURCES = insn_sse2.def 174insn_sse2_LDADD = -lm 175insn_sse3_SOURCES = insn_sse3.def 176insn_sse3_LDADD = -lm 177insn_ssse3_SOURCES = insn_ssse3.def 178insn_ssse3_LDADD = -lm 179x86locked_CFLAGS = $(AM_CFLAGS) -O 180yield_LDADD = -lpthread 181 182.def.c: $(srcdir)/gen_insn_test.pl 183 $(PERL) $(srcdir)/gen_insn_test.pl < $< > $@ 184