1 # -*- Mode: makefile -*-
3 # ARM - included from tests/tcg/Makefile
6 ARM_SRC=$(SRC_PATH)/tests/tcg/arm
8 # Set search path for all sources
11 config-cc.mak: Makefile
13 $(call cc-option,-fno-integrated-as, CROSS_CC_HAS_FNIA)) 3> config-cc.mak
14 -include config-cc.mak
16 float_madds: CFLAGS+=-mfpu=neon-vfpv4
20 hello-arm: CFLAGS+=-marm -ffreestanding -fno-stack-protector
21 hello-arm: LDFLAGS+=-nostdlib
23 # IWMXT floating point extensions
24 ARM_TESTS += test-arm-iwmmxt
25 # Clang assembler does not support IWMXT, so use the external assembler.
26 test-arm-iwmmxt: CFLAGS += -marm -march=iwmmxt -mabi=aapcs -mfpu=fpv4-sp-d16 $(CROSS_CC_HAS_FNIA)
27 test-arm-iwmmxt: test-arm-iwmmxt.S
28 $(CC) $(CFLAGS) -Wa,--noexecstack $< -o $@ $(LDFLAGS)
33 fcvt: CFLAGS += -march=armv8.2-a+fp16 -mfpu=neon-fp-armv8
35 $(call run-test,fcvt,$(QEMU) $<)
36 $(call diff-out,fcvt,$(ARM_SRC)/fcvt.ref)
39 ARM_TESTS += pcalign-a32
40 pcalign-a32: CFLAGS+=-marm
42 ifeq ($(CONFIG_ARM_COMPATIBLE_SEMIHOSTING),y)
44 # Semihosting smoke test for linux-user
45 semihosting: CFLAGS += -mthumb
47 ARM_TESTS += semihosting-arm
48 semihosting-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
49 semihosting-arm: semihosting.c
50 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
52 run-semihosting-arm: semihosting-arm
53 $(call run-test,$<,$(QEMU) $< 2> $<.err)
55 ARM_TESTS += semiconsole-arm
57 semiconsole: CFLAGS += -mthumb
59 semiconsole-arm: CFLAGS += -marm -I$(SRC_PATH)/tests/tcg/$(TARGET_NAME)
60 semiconsole-arm: semihosting.c
61 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
63 run-semiconsole-arm: semiconsole-arm
64 $(call skip-test, $<, "MANUAL ONLY")
71 sha1-vector: CFLAGS=-O3
73 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
74 run-sha1-vector: sha1-vector run-sha1
75 $(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)
76 $(call diff-out, sha1-vector, sha1.out)
78 ARM_TESTS += sha1-vector
80 # Vector versions of sha512 (-O3 triggers vectorisation)
81 sha512-vector: CFLAGS=-O3
82 sha512-vector: sha512.c
83 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
85 ARM_TESTS += sha512-vector