It may be arm-compat-semihosting but more than one architecture uses it so lets move the tests into the multiarch area. We gate it on the feature and split the semicall.h header between the arches. Also clean-up a bit of the Makefile messing about to one common set of runners. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210323165308.15244-6-alex.bennee@linaro.org>
73 lines
1.8 KiB
Makefile
73 lines
1.8 KiB
Makefile
# -*- Mode: makefile -*-
|
|
#
|
|
# ARM - included from tests/tcg/Makefile
|
|
#
|
|
|
|
ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
|
|
|
# Set search path for all sources
|
|
VPATH += $(ARM_SRC)
|
|
|
|
float_madds: CFLAGS+=-mfpu=neon-vfpv4
|
|
|
|
# Basic Hello World
|
|
ARM_TESTS = hello-arm
|
|
hello-arm: CFLAGS+=-marm -ffreestanding
|
|
hello-arm: LDFLAGS+=-nostdlib
|
|
|
|
# IWMXT floating point extensions
|
|
ARM_TESTS += test-arm-iwmmxt
|
|
test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16
|
|
test-arm-iwmmxt: test-arm-iwmmxt.S
|
|
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
# Float-convert Tests
|
|
ARM_TESTS += fcvt
|
|
fcvt: LDFLAGS+=-lm
|
|
# fcvt: CFLAGS+=-march=armv8.2-a+fp16 -mfpu=neon-fp-armv8
|
|
run-fcvt: fcvt
|
|
$(call run-test,fcvt,$(QEMU) $<,"$< on $(TARGET_NAME)")
|
|
$(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref)
|
|
|
|
ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
|
|
|
|
# Semihosting smoke test for linux-user
|
|
semihosting: CFLAGS += -mthumb
|
|
|
|
ARM_TESTS += semihosting-arm
|
|
semihosting-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
|
|
semihosting-arm: semihosting.c
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
run-semihosting-arm: semihosting-arm
|
|
$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
|
|
|
|
run-plugin-semihosting-arm-with-%:
|
|
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
|
|
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
|
|
$(call strip-plugin,$<) 2> $<.err, \
|
|
"$< on $(TARGET_NAME) with $*")
|
|
|
|
ARM_TESTS += semiconsole-arm
|
|
|
|
semiconsole: CFLAGS += -mthumb
|
|
|
|
semiconsole-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
|
|
semiconsole-arm: semihosting.c
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
run-semiconsole-arm: semiconsole-arm
|
|
$(call skip-test, $<, "MANUAL ONLY")
|
|
|
|
run-plugin-semiconsole-arm-with-%:
|
|
$(call skip-test, $<, "MANUAL ONLY")
|
|
|
|
endif
|
|
|
|
ARM_TESTS += commpage
|
|
|
|
TESTS += $(ARM_TESTS)
|
|
|
|
# On ARM Linux only supports 4k pages
|
|
EXTRA_RUNS+=run-test-mmap-4096
|