Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / tests / tcg / s390x / Makefile.target
blob2dab4f458223391f41f5abe020f7869197320d58
1 S390X_SRC=$(SRC_PATH)/tests/tcg/s390x
2 VPATH+=$(S390X_SRC)
3 CFLAGS+=-march=zEC12 -m64
5 %.o: %.c
6         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@
8 config-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
14 TESTS+=hello-s390x
15 TESTS+=csst
16 TESTS+=ipm
17 TESTS+=exrl-trt
18 TESTS+=exrl-trtr
19 TESTS+=pack
20 TESTS+=mie3-compl
21 TESTS+=mie3-mvcrl
22 TESTS+=mie3-sel
23 TESTS+=mvo
24 TESTS+=mvc
25 TESTS+=shift
26 TESTS+=trap
27 TESTS+=signals-s390x
28 TESTS+=branch-relative-long
29 TESTS+=noexec
30 TESTS+=div
31 TESTS+=clst
32 TESTS+=long-double
33 TESTS+=cdsg
34 TESTS+=chrl
35 TESTS+=rxsbg
36 TESTS+=ex-relative-long
37 TESTS+=ex-branch
38 TESTS+=mxdb
39 TESTS+=epsw
40 TESTS+=larl
41 TESTS+=mdeb
42 TESTS+=cgebra
43 TESTS+=clgebr
44 TESTS+=clc
45 TESTS+=laalg
46 TESTS+=add-logical-with-carry
47 TESTS+=lae
48 TESTS+=cvd
49 TESTS+=cvb
50 TESTS+=ts
51 TESTS+=ex-smc
53 cdsg: CFLAGS+=-pthread
54 cdsg: LDFLAGS+=-pthread
56 rxsbg: CFLAGS+=-O2
58 cgebra: LDFLAGS+=-lm
59 clgebr: LDFLAGS+=-lm
61 include $(S390X_SRC)/pgm-specification.mak
62 $(PGM_SPECIFICATION_TESTS): pgm-specification-user.o
63 $(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-user.o
64 TESTS += $(PGM_SPECIFICATION_TESTS)
66 Z13_TESTS=vistr
67 Z13_TESTS+=lcbb
68 Z13_TESTS+=locfhr
69 Z13_TESTS+=vcksm
70 Z13_TESTS+=vstl
71 Z13_TESTS+=vrep
72 Z13_TESTS+=precise-smc-user
73 $(Z13_TESTS): CFLAGS+=-march=z13 -O2
74 TESTS+=$(Z13_TESTS)
76 ifneq ($(CROSS_CC_HAS_Z14),)
77 Z14_TESTS=vfminmax
78 vfminmax: LDFLAGS+=-lm
79 $(Z14_TESTS): CFLAGS+=-march=z14 -O2
80 TESTS+=$(Z14_TESTS)
81 endif
83 ifneq ($(CROSS_CC_HAS_Z15),)
84 Z15_TESTS=vxeh2_vs
85 Z15_TESTS+=vxeh2_vcvt
86 Z15_TESTS+=vxeh2_vlstr
87 Z15_TESTS+=vxeh2_vstrs
88 $(Z15_TESTS): CFLAGS+=-march=z15 -O2
89 TESTS+=$(Z15_TESTS)
90 endif
92 ifneq ($(GDB),)
93 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
95 run-gdbstub-signals-s390x: signals-s390x
96         $(call run-test, $@, $(GDB_SCRIPT) \
97                 --gdb $(GDB) \
98                 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
99                 --bin $< --test $(S390X_SRC)/gdbstub/test-signals-s390x.py, \
100         mixing signals and debugging)
102 hello-s390x-asm: CFLAGS+=-nostdlib
104 run-gdbstub-svc: hello-s390x-asm
105         $(call run-test, $@, $(GDB_SCRIPT) \
106                 --gdb $(GDB) \
107                 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
108                 --bin $< --test $(S390X_SRC)/gdbstub/test-svc.py, \
109         single-stepping svc)
111 EXTRA_RUNS += run-gdbstub-signals-s390x run-gdbstub-svc
112 endif
114 # MVX versions of sha512
115 sha512-mvx: CFLAGS=-march=z13 -mvx -O3
116 sha512-mvx: sha512.c
117         $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
119 TESTS+=sha512-mvx