xref: /openbmc/qemu/tests/tcg/arm/Makefile.target (revision a9a5c473)
1# -*- Mode: makefile -*-
2#
3# ARM - included from tests/tcg/Makefile
4#
5
6ARM_SRC=$(SRC_PATH)/tests/tcg/arm
7
8# Set search path for all sources
9VPATH 		+= $(ARM_SRC)
10
11float_madds: CFLAGS+=-mfpu=neon-vfpv4
12
13# Basic Hello World
14ARM_TESTS = hello-arm
15hello-arm: CFLAGS+=-marm -ffreestanding
16hello-arm: LDFLAGS+=-nostdlib
17
18# IWMXT floating point extensions
19ARM_TESTS += test-arm-iwmmxt
20test-arm-iwmmxt: CFLAGS+=-marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16
21test-arm-iwmmxt: test-arm-iwmmxt.S
22	$(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
23
24# Float-convert Tests
25ARM_TESTS += fcvt
26fcvt: LDFLAGS+=-lm
27# fcvt: CFLAGS+=-march=armv8.2-a+fp16 -mfpu=neon-fp-armv8
28run-fcvt: fcvt
29	$(call run-test,fcvt,$(QEMU) $<,"$< on $(TARGET_NAME)")
30	$(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref)
31
32# Semihosting smoke test for linux-user
33ARM_TESTS += semihosting
34semihosting: CFLAGS += -mthumb
35run-semihosting: semihosting
36	$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
37
38ARM_TESTS += semihosting-arm
39semihosting-arm: CFLAGS += -marm
40semihosting-arm: semihosting.c
41	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
42
43run-semihosting-arm: semihosting-arm
44	$(call run-test,$<,$(QEMU) $< 2> $<.err, "$< on $(TARGET_NAME)")
45
46run-plugin-semihosting-with-%:
47	$(call run-test, $@, $(QEMU) $(QEMU_OPTS) \
48		-plugin $(PLUGIN_DIR)/$(call extract-plugin,$@) \
49		 $(call strip-plugin,$<) 2> $<.err, \
50		"$< on $(TARGET_NAME) with $*")
51
52ARM_TESTS += semiconsole semiconsole-arm
53
54semiconsole: CFLAGS += -mthumb
55run-semiconsole: semiconsole
56	$(call skip-test, $<, "MANUAL ONLY")
57
58run-plugin-semiconsole-with-%:
59	$(call skip-test, $<, "MANUAL ONLY")
60
61semiconsole-arm: CFLAGS += -marm
62semiconsole-arm: semiconsole.c
63	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
64
65run-semiconsole-arm: semiconsole-arm
66	$(call skip-test, $<, "MANUAL ONLY")
67
68run-plugin-semiconsole-arm-with-%:
69	$(call skip-test, $<, "MANUAL ONLY")
70
71TESTS += $(ARM_TESTS)
72
73# On ARM Linux only supports 4k pages
74EXTRA_RUNS+=run-test-mmap-4096
75