xref: /openbmc/qemu/tests/tcg/aarch64/Makefile.target (revision 27a4a30e)
1# -*- Mode: makefile -*-
2#
3# AArch64 specific tweaks
4
5ARM_SRC=$(SRC_PATH)/tests/tcg/arm
6VPATH 		+= $(ARM_SRC)
7
8AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
9VPATH 		+= $(AARCH64_SRC)
10
11# Float-convert Tests
12AARCH64_TESTS=fcvt
13
14fcvt: LDFLAGS+=-lm
15
16run-fcvt: fcvt
17	$(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)")
18	$(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
19
20# Pauth Tests
21ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_3),)
22AARCH64_TESTS += pauth-1 pauth-2 pauth-4
23run-pauth-%: QEMU_OPTS += -cpu max
24pauth-%: CFLAGS += -march=armv8.3-a
25endif
26
27# Semihosting smoke test for linux-user
28AARCH64_TESTS += semihosting
29run-semihosting: semihosting
30	$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
31
32run-plugin-semihosting-with-%:
33	$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
34		-plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
35		 $(call strip-plugin,$<) 2> $<.err, \
36		"$< on $(TARGET_NAME) with $*")
37
38AARCH64_TESTS += semiconsole
39run-semiconsole: semiconsole
40	$(call skip-test, $<, "MANUAL ONLY")
41
42run-plugin-semiconsole-with-%:
43	$(call skip-test, $<, "MANUAL ONLY")
44
45ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_SVE),)
46# System Registers Tests
47AARCH64_TESTS += sysregs
48sysregs: CFLAGS+=-march=armv8.1-a+sve
49
50# SVE ioctl test
51AARCH64_TESTS += sve-ioctls
52sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
53
54ifneq ($(HAVE_GDB_BIN),)
55GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
56
57AARCH64_TESTS += gdbstub-sysregs gdbstub-sve-ioctls
58
59.PHONY: gdbstub-sysregs gdbstub-sve-ioctls
60run-gdbstub-sysregs: sysregs
61	$(call run-test, $@, $(GDB_SCRIPT) \
62		--gdb $(HAVE_GDB_BIN) \
63		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
64		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve.py, \
65	"basic gdbstub SVE support")
66
67run-gdbstub-sve-ioctls: sve-ioctls
68	$(call run-test, $@, $(GDB_SCRIPT) \
69		--gdb $(HAVE_GDB_BIN) \
70		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
71		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \
72	"basic gdbstub SVE ZLEN support")
73endif
74
75endif
76
77TESTS += $(AARCH64_TESTS)
78