| S390X_SRC=$(SRC_PATH)/tests/tcg/s390x |
| VPATH+=$(S390X_SRC) |
| # EXTFLAGS can be passed by the user, e.g. to override the --accel |
| QEMU_OPTS+=-action panic=exit-failure -nographic -serial chardev:output $(EXTFLAGS) -kernel |
| LINK_SCRIPT=$(S390X_SRC)/softmmu.ld |
| CFLAGS+=-ggdb -O0 -I$(SRC_PATH)/include/hw/s390x/ipl/ |
| LDFLAGS=-nostdlib -static |
| |
| %.o: %.S |
| $(CC) -march=z13 -m64 -Wa,--noexecstack -c $< -o $@ |
| |
| %.o: %.c |
| $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=z13 -m64 -c $< -o $@ |
| |
| %: %.o |
| $(CC) $< -o $@ $(LDFLAGS) |
| |
| ASM_TESTS = \ |
| bal \ |
| cksm \ |
| clm \ |
| exrl-ssm-early \ |
| icm \ |
| sam \ |
| lpsw \ |
| lpswe-early \ |
| lra \ |
| mc \ |
| per \ |
| precise-smc-softmmu \ |
| ssm-early \ |
| stosm-early \ |
| stpq \ |
| unaligned-lowcore |
| |
| include $(S390X_SRC)/pgm-specification.mak |
| $(PGM_SPECIFICATION_TESTS): pgm-specification-softmmu.o |
| $(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-softmmu.o |
| ASM_TESTS += $(PGM_SPECIFICATION_TESTS) |
| |
| $(ASM_TESTS): LDFLAGS += -Wl,-T$(LINK_SCRIPT) -Wl,--build-id=none |
| $(ASM_TESTS): $(LINK_SCRIPT) |
| TESTS += $(ASM_TESTS) |
| |
| S390X_MULTIARCH_RUNTIME_OBJS = head64.o console.o $(MINILIB_OBJS) |
| $(MULTIARCH_TESTS): $(S390X_MULTIARCH_RUNTIME_OBJS) |
| $(MULTIARCH_TESTS): LDFLAGS += $(S390X_MULTIARCH_RUNTIME_OBJS) |
| $(MULTIARCH_TESTS): CFLAGS += $(MINILIB_INC) |
| memory: CFLAGS += -DCHECK_UNALIGNED=0 |
| |
| # s390x clears the BSS section so we need to account for that |
| run-plugin-memory-with-libmem.so: \ |
| CHECK_PLUGIN_OUTPUT_COMMAND=$(MULTIARCH_SYSTEM_SRC)/validate-memory-counts.py \ |
| --bss-cleared $@.out |