qemu

FORK: QEMU emulator
git clone https://git.neptards.moe/neptards/qemu.git
Log | Files | Refs | Submodules | LICENSE

Makefile.target (2921B)


      1 # -*- Mode: makefile -*-
      2 #
      3 # AArch64 specific tweaks
      4 
      5 ARM_SRC=$(SRC_PATH)/tests/tcg/arm
      6 VPATH 		+= $(ARM_SRC)
      7 
      8 AARCH64_SRC=$(SRC_PATH)/tests/tcg/aarch64
      9 VPATH 		+= $(AARCH64_SRC)
     10 
     11 # Base architecture tests
     12 AARCH64_TESTS=fcvt pcalign-a64
     13 
     14 fcvt: LDFLAGS+=-lm
     15 
     16 run-fcvt: fcvt
     17 	$(call run-test,$<,$(QEMU) $<, "$< on $(TARGET_NAME)")
     18 	$(call diff-out,$<,$(AARCH64_SRC)/fcvt.ref)
     19 
     20 config-cc.mak: Makefile
     21 	$(quiet-@)( \
     22 	    $(call cc-option,-march=armv8.1-a+sve,          CROSS_CC_HAS_SVE); \
     23 	    $(call cc-option,-march=armv8.1-a+sve2,         CROSS_CC_HAS_SVE2); \
     24 	    $(call cc-option,-march=armv8.3-a,              CROSS_CC_HAS_ARMV8_3); \
     25 	    $(call cc-option,-mbranch-protection=standard,  CROSS_CC_HAS_ARMV8_BTI); \
     26 	    $(call cc-option,-march=armv8.5-a+memtag,       CROSS_CC_HAS_ARMV8_MTE)) 3> config-cc.mak
     27 -include config-cc.mak
     28 
     29 # Pauth Tests
     30 ifneq ($(CROSS_CC_HAS_ARMV8_3),)
     31 AARCH64_TESTS += pauth-1 pauth-2 pauth-4 pauth-5
     32 pauth-%: CFLAGS += -march=armv8.3-a
     33 run-pauth-%: QEMU_OPTS += -cpu max
     34 run-plugin-pauth-%: QEMU_OPTS += -cpu max
     35 endif
     36 
     37 # BTI Tests
     38 # bti-1 tests the elf notes, so we require special compiler support.
     39 ifneq ($(CROSS_CC_HAS_ARMV8_BTI),)
     40 AARCH64_TESTS += bti-1 bti-3
     41 bti-1 bti-3: CFLAGS += -mbranch-protection=standard
     42 bti-1 bti-3: LDFLAGS += -nostdlib
     43 endif
     44 # bti-2 tests PROT_BTI, so no special compiler support required.
     45 AARCH64_TESTS += bti-2
     46 
     47 # MTE Tests
     48 ifneq ($(CROSS_CC_HAS_ARMV8_MTE),)
     49 AARCH64_TESTS += mte-1 mte-2 mte-3 mte-4 mte-5 mte-6 mte-7
     50 mte-%: CFLAGS += -march=armv8.5-a+memtag
     51 endif
     52 
     53 ifneq ($(CROSS_CC_HAS_SVE),)
     54 # System Registers Tests
     55 AARCH64_TESTS += sysregs
     56 sysregs: CFLAGS+=-march=armv8.1-a+sve
     57 
     58 # SVE ioctl test
     59 AARCH64_TESTS += sve-ioctls
     60 sve-ioctls: CFLAGS+=-march=armv8.1-a+sve
     61 
     62 # Vector SHA1
     63 sha1-vector: CFLAGS=-O3
     64 sha1-vector: sha1.c
     65 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
     66 run-sha1-vector: sha1-vector run-sha1
     67 	$(call run-test, $<, $(QEMU) $(QEMU_OPTS) $<)
     68 	$(call diff-out, sha1-vector, sha1.out)
     69 
     70 TESTS += sha1-vector
     71 
     72 # Vector versions of sha512 (-O3 triggers vectorisation)
     73 sha512-vector: CFLAGS=-O3
     74 sha512-vector: sha512.c
     75 	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
     76 
     77 TESTS += sha512-vector
     78 
     79 ifneq ($(HAVE_GDB_BIN),)
     80 GDB_SCRIPT=$(SRC_PATH)/tests/guest-debug/run-test.py
     81 
     82 run-gdbstub-sysregs: sysregs
     83 	$(call run-test, $@, $(GDB_SCRIPT) \
     84 		--gdb $(HAVE_GDB_BIN) \
     85 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
     86 		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve.py, \
     87 	basic gdbstub SVE support)
     88 
     89 run-gdbstub-sve-ioctls: sve-ioctls
     90 	$(call run-test, $@, $(GDB_SCRIPT) \
     91 		--gdb $(HAVE_GDB_BIN) \
     92 		--qemu $(QEMU) --qargs "$(QEMU_OPTS)" \
     93 		--bin $< --test $(AARCH64_SRC)/gdbstub/test-sve-ioctl.py, \
     94 	basic gdbstub SVE ZLEN support)
     95 
     96 EXTRA_RUNS += run-gdbstub-sysregs run-gdbstub-sve-ioctls
     97 endif
     98 endif
     99 
    100 ifneq ($(CROSS_CC_HAS_SVE2),)
    101 AARCH64_TESTS += test-826
    102 test-826: CFLAGS+=-march=armv8.1-a+sve2
    103 endif
    104 
    105 TESTS += $(AARCH64_TESTS)