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 pauth-5 23pauth-%: CFLAGS += -march=armv8.3-a 24run-pauth-%: QEMU_OPTS += -cpu max 25run-plugin-pauth-%: QEMU_OPTS += -cpu max 26endif 27 28# BTI Tests 29# bti-1 tests the elf notes, so we require special compiler support. 30ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_BTI),) 31AARCH64_TESTS += bti-1 32bti-1: CFLAGS += -mbranch-protection=standard 33bti-1: LDFLAGS += -nostdlib 34endif 35# bti-2 tests PROT_BTI, so no special compiler support required. 36AARCH64_TESTS += bti-2 37 38# MTE Tests 39ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_ARMV8_MTE),) 40AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 41mte-%: CFLAGS += -march=armv8.5-a+memtag 42endif 43 44# Semihosting smoke test for linux-user 45AARCH64_TESTS += semihosting 46run-semihosting: semihosting 47 $(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)") 48 49run-plugin-semihosting-with-%: 50 $(call run-test, $@, $(QEMU) $(QEMU_OPTS) \ 51 -plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \ 52 $(call strip-plugin,$<) 2> $<.err, \ 53 "$< on $(TARGET_NAME) with $*") 54 55AARCH64_TESTS += semiconsole 56run-semiconsole: semiconsole 57 $(call skip-test, $<, "MANUAL ONLY") 58 59run-plugin-semiconsole-with-%: 60 $(call skip-test, $<, "MANUAL ONLY") 61 62ifneq ($(DOCKER_IMAGE)$(CROSS_CC_HAS_SVE),) 63# System Registers Tests 64AARCH64_TESTS += sysregs 65sysregs: CFLAGS+=-march=armv8.1-a+sve 66 67# SVE ioctl test 68AARCH64_TESTS += sve-ioctls 69sve-ioctls: CFLAGS+=-march=armv8.1-a+sve 70 71ifneq ($(HAVE_GDB_BIN),) 72GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py 73 74run-gdbstub-sysregs: sysregs 75 $(call run-test, $@, $(GDB_SCRIPT) \ 76 --gdb $(HAVE_GDB_BIN) \ 77 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ 78 --bin $< --test $(AARCH64_SRC)/gdbstub/test-sve.py, \ 79 "basic gdbstub SVE support") 80 81run-gdbstub-sve-ioctls: sve-ioctls 82 $(call run-test, $@, $(GDB_SCRIPT) \ 83 --gdb $(HAVE_GDB_BIN) \ 84 --qemu $(QEMU) --qargs "$(QEMU_OPTS)" \ 85 --bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \ 86 "basic gdbstub SVE ZLEN support") 87 88EXTRA_RUNS += run-gdbstub-sysregs run-gdbstub-sve-ioctls 89endif 90 91endif 92 93TESTS += $(AARCH64_TESTS) 94