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