xref: /openbmc/qemu/tests/tcg/ppc64/Makefile.target (revision 14bd0f38)
1# -*- Mode: makefile -*-
2#
3# ppc64 specific tweaks
4
5VPATH += $(SRC_PATH)/tests/tcg/ppc64
6
7config-cc.mak: Makefile
8	$(quiet-@)( \
9	    $(call cc-option,-mpower8-vector,   CROSS_CC_HAS_POWER8_VECTOR); \
10	    $(call cc-option,-mpower10,         CROSS_CC_HAS_POWER10)) 3> config-cc.mak
11
12-include config-cc.mak
13
14# multi-threaded tests are known to fail (e.g., clang-user CI job)
15# See: https://gitlab.com/qemu-project/qemu/-/issues/2456
16run-signals: signals
17	$(call skip-test, $<, "BROKEN (flaky with clang) ")
18run-plugin-signals-with-%:
19	$(call skip-test, $<, "BROKEN (flaky with clang) ")
20
21run-threadcount: threadcount
22	$(call skip-test, $<, "BROKEN (flaky with clang) ")
23run-plugin-threadcount-with-%:
24	$(call skip-test, $<, "BROKEN (flaky with clang) ")
25
26ifneq ($(CROSS_CC_HAS_POWER8_VECTOR),)
27PPC64_TESTS=bcdsub non_signalling_xscv
28endif
29$(PPC64_TESTS): CFLAGS += -mpower8-vector
30
31ifneq ($(CROSS_CC_HAS_POWER8_VECTOR),)
32PPC64_TESTS += vsx_f2i_nan
33endif
34vsx_f2i_nan: CFLAGS += -mpower8-vector -I$(SRC_PATH)/include
35
36PPC64_TESTS += mtfsf
37PPC64_TESTS += mffsce
38
39ifneq ($(CROSS_CC_HAS_POWER10),)
40PPC64_TESTS += byte_reverse sha512-vector vector
41endif
42byte_reverse: CFLAGS += -mcpu=power10
43run-byte_reverse: QEMU_OPTS+=-cpu POWER10
44
45sha512-vector: CFLAGS +=-mcpu=power10 -O3
46sha512-vector: sha512.c
47	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
48
49run-sha512-vector: QEMU_OPTS+=-cpu POWER10
50
51vector: CFLAGS += -mcpu=power10 -I$(SRC_PATH)/include
52run-vector: QEMU_OPTS += -cpu POWER10
53
54PPC64_TESTS += signal_save_restore_xer
55PPC64_TESTS += xxspltw
56PPC64_TESTS += test-aes
57
58# ppc64 ABI uses function descriptors, and thus, QEMU can't find symbol for a
59# given instruction. Thus, we don't check output of mem-access plugin.
60run-plugin-test-plugin-mem-access-with-libmem.so: \
61 CHECK_PLUGIN_OUTPUT_COMMAND=
62
63TESTS += $(PPC64_TESTS)
64