summaryrefslogtreecommitdiffstats
path: root/tests/tcg/arm/Makefile.target
blob: 2f815120a59705b1092a6f25821936fd0fd5408f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# -*- 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)

# PC alignment test
ARM_TESTS += pcalign-a32
pcalign-a32: CFLAGS+=-marm

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

# Vector SHA1
sha1-vector: CFLAGS=-O3
sha1-vector: sha1.c
	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
run-sha1-vector: sha1-vector run-sha1
	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<, "$< on $(TARGET_NAME)")
	$(call diff-out, sha1-vector, sha1.out)

ARM_TESTS += sha1-vector

# 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

TESTS += $(ARM_TESTS)

# On ARM Linux only supports 4k pages
EXTRA_RUNS+=run-test-mmap-4096