xref: /openbmc/qemu/tests/tcg/s390x/Makefile.target (revision 6eece7f5)
1S390X_SRC=$(SRC_PATH)/tests/tcg/s390x
2VPATH+=$(S390X_SRC)
3CFLAGS+=-march=zEC12 -m64
4
5%.o: %.c
6	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
7
8config-cc.mak: Makefile
9	$(quiet-@)( \
10	    $(call cc-option,-march=z14, CROSS_CC_HAS_Z14); \
11	    $(call cc-option,-march=z15, CROSS_CC_HAS_Z15)) 3> config-cc.mak
12-include config-cc.mak
13
14TESTS+=hello-s390x
15TESTS+=csst
16TESTS+=ipm
17TESTS+=exrl-trt
18TESTS+=exrl-trtr
19TESTS+=pack
20TESTS+=mie3-compl
21TESTS+=mie3-mvcrl
22TESTS+=mie3-sel
23TESTS+=mvo
24TESTS+=mvc
25TESTS+=shift
26TESTS+=trap
27TESTS+=signals-s390x
28TESTS+=branch-relative-long
29TESTS+=noexec
30TESTS+=div
31TESTS+=clst
32TESTS+=long-double
33TESTS+=cdsg
34TESTS+=chrl
35TESTS+=rxsbg
36TESTS+=ex-relative-long
37
38cdsg: CFLAGS+=-pthread
39cdsg: LDFLAGS+=-pthread
40
41rxsbg: CFLAGS+=-O2
42
43include $(S390X_SRC)/pgm-specification.mak
44$(PGM_SPECIFICATION_TESTS): pgm-specification-user.o
45$(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-user.o
46TESTS += $(PGM_SPECIFICATION_TESTS)
47
48Z13_TESTS=vistr
49$(Z13_TESTS): CFLAGS+=-march=z13 -O2
50TESTS+=$(Z13_TESTS)
51
52ifneq ($(CROSS_CC_HAS_Z14),)
53Z14_TESTS=vfminmax
54vfminmax: LDFLAGS+=-lm
55$(Z14_TESTS): CFLAGS+=-march=z14 -O2
56TESTS+=$(Z14_TESTS)
57endif
58
59ifneq ($(CROSS_CC_HAS_Z15),)
60Z15_TESTS=vxeh2_vs
61Z15_TESTS+=vxeh2_vcvt
62Z15_TESTS+=vxeh2_vlstr
63$(Z15_TESTS): CFLAGS+=-march=z15 -O2
64TESTS+=$(Z15_TESTS)
65endif
66
67ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
68GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
69
70run-gdbstub-signals-s390x: signals-s390x
71	$(call run-test, $@, $(GDB_SCRIPT) \
72		--gdb $(HAVE_GDB_BIN) \
73		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
74		--bin $< --test $(S390X_SRC)/gdbstub/test-signals-s390x.py, \
75	mixing signals and debugging)
76
77EXTRA_RUNS += run-gdbstub-signals-s390x
78endif
79
80# MVX versions of sha512
81sha512-mvx: CFLAGS=-march=z13 -mvx -O3
82sha512-mvx: sha512.c
83	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
84
85TESTS+=sha512-mvx
86