xref: /openbmc/qemu/tests/tcg/s390x/Makefile.target (revision 1141159c)
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
37TESTS+=ex-branch
38
39cdsg: CFLAGS+=-pthread
40cdsg: LDFLAGS+=-pthread
41
42rxsbg: CFLAGS+=-O2
43
44include $(S390X_SRC)/pgm-specification.mak
45$(PGM_SPECIFICATION_TESTS): pgm-specification-user.o
46$(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-user.o
47TESTS += $(PGM_SPECIFICATION_TESTS)
48
49Z13_TESTS=vistr
50$(Z13_TESTS): CFLAGS+=-march=z13 -O2
51TESTS+=$(Z13_TESTS)
52
53ifneq ($(CROSS_CC_HAS_Z14),)
54Z14_TESTS=vfminmax
55vfminmax: LDFLAGS+=-lm
56$(Z14_TESTS): CFLAGS+=-march=z14 -O2
57TESTS+=$(Z14_TESTS)
58endif
59
60ifneq ($(CROSS_CC_HAS_Z15),)
61Z15_TESTS=vxeh2_vs
62Z15_TESTS+=vxeh2_vcvt
63Z15_TESTS+=vxeh2_vlstr
64$(Z15_TESTS): CFLAGS+=-march=z15 -O2
65TESTS+=$(Z15_TESTS)
66endif
67
68ifeq ($(HOST_GDB_SUPPORTS_ARCH),y)
69GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
70
71run-gdbstub-signals-s390x: signals-s390x
72	$(call run-test, $@, $(GDB_SCRIPT) \
73		--gdb $(HAVE_GDB_BIN) \
74		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
75		--bin $< --test $(S390X_SRC)/gdbstub/test-signals-s390x.py, \
76	mixing signals and debugging)
77
78EXTRA_RUNS += run-gdbstub-signals-s390x
79endif
80
81# MVX versions of sha512
82sha512-mvx: CFLAGS=-march=z13 -mvx -O3
83sha512-mvx: sha512.c
84	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
85
86TESTS+=sha512-mvx
87