2018-04-05 16:45:32 +02:00
|
|
|
# -*- Mode: makefile -*-
|
|
|
|
#
|
2018-05-07 22:53:43 +02:00
|
|
|
# ARM - included from tests/tcg/Makefile
|
2018-04-05 16:45:32 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
ARM_SRC=$(SRC_PATH)/tests/tcg/arm
|
|
|
|
|
|
|
|
# Set search path for all sources
|
|
|
|
VPATH += $(ARM_SRC)
|
|
|
|
|
2019-09-13 13:12:17 +02:00
|
|
|
float_madds: CFLAGS+=-mfpu=neon-vfpv4
|
|
|
|
|
2019-09-11 18:49:55 +02:00
|
|
|
# Basic Hello World
|
|
|
|
ARM_TESTS = hello-arm
|
2018-04-05 16:45:32 +02:00
|
|
|
hello-arm: CFLAGS+=-marm -ffreestanding
|
|
|
|
hello-arm: LDFLAGS+=-nostdlib
|
2018-05-07 22:53:43 +02:00
|
|
|
|
2019-09-11 18:49:55 +02:00
|
|
|
# IWMXT floating point extensions
|
|
|
|
ARM_TESTS += test-arm-iwmmxt
|
2018-04-13 15:56:17 +02:00
|
|
|
test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16
|
|
|
|
test-arm-iwmmxt: test-arm-iwmmxt.S
|
|
|
|
$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
|
2019-09-11 18:49:55 +02:00
|
|
|
# Float-convert Tests
|
|
|
|
ARM_TESTS += fcvt
|
2018-04-13 18:08:26 +02:00
|
|
|
fcvt: LDFLAGS+=-lm
|
|
|
|
# fcvt: CFLAGS+=-march=armv8.2-a+fp16 -mfpu=neon-fp-armv8
|
|
|
|
run-fcvt: fcvt
|
2018-05-21 11:38:37 +02:00
|
|
|
$(call run-test,fcvt,$(QEMU) $<,"$< on $(TARGET_NAME)")
|
|
|
|
$(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref)
|
2019-09-11 18:49:55 +02:00
|
|
|
|
2021-03-23 17:52:51 +01:00
|
|
|
ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
|
|
|
|
|
2019-09-19 15:18:41 +02:00
|
|
|
# Semihosting smoke test for linux-user
|
2020-01-08 13:24:38 +01:00
|
|
|
semihosting: CFLAGS += -mthumb
|
2019-09-19 15:18:41 +02:00
|
|
|
|
2020-01-08 13:24:38 +01:00
|
|
|
ARM_TESTS += semihosting-arm
|
2021-03-23 17:52:51 +01:00
|
|
|
semihosting-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
|
2020-01-08 13:24:38 +01:00
|
|
|
semihosting-arm: semihosting.c
|
|
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
|
|
|
|
|
|
|
|
run-semihosting-arm: semihosting-arm
|
|
|
|
$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
|
|
|
|
|
2021-03-23 17:52:51 +01:00
|
|
|
run-plugin-semihosting-arm-with-%:
|
2019-05-17 18:09:48 +02:00
|
|
|
$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
|
2020-06-15 16:19:21 +02:00
|
|
|
-plugin $(PLUGIN_LIB)/$(call extract-plugin,$@) \
|
2019-05-17 18:09:48 +02:00
|
|
|
$(call strip-plugin,$<) 2> $<.err, \
|
|
|
|
"$< on $(TARGET_NAME) with $*")
|
|
|
|
|
2021-03-23 17:52:51 +01:00
|
|
|
ARM_TESTS += semiconsole-arm
|
2019-12-19 13:13:44 +01:00
|
|
|
|
|
|
|
semiconsole: CFLAGS += -mthumb
|
|
|
|
|
2021-03-23 17:52:51 +01:00
|
|
|
semiconsole-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
|
|
|
|
semiconsole-arm: semihosting.c
|
2019-12-19 13:13:44 +01:00
|
|
|
$(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")
|
|
|
|
|
2021-03-23 17:52:51 +01:00
|
|
|
endif
|
|
|
|
|
2020-06-05 17:49:28 +02:00
|
|
|
ARM_TESTS += commpage
|
|
|
|
|
2019-09-11 18:49:55 +02:00
|
|
|
TESTS += $(ARM_TESTS)
|
2018-04-13 18:08:26 +02:00
|
|
|
|
2018-05-07 22:53:43 +02:00
|
|
|
# On ARM Linux only supports 4k pages
|
|
|
|
EXTRA_RUNS+=run-test-mmap-4096
|