2022-07-26 01:37:46 +03:00
|
|
|
S390X_SRC=$(SRC_PATH)/tests/tcg/s390x
|
|
|
|
VPATH+=$(S390X_SRC)
|
2023-05-11 14:46:51 +03:00
|
|
|
QEMU_OPTS=-action panic=exit-failure -nographic -kernel
|
2023-03-16 19:44:28 +03:00
|
|
|
LINK_SCRIPT=$(S390X_SRC)/softmmu.ld
|
2023-05-11 14:46:51 +03:00
|
|
|
CFLAGS+=-ggdb -O0
|
|
|
|
LDFLAGS=-nostdlib -static
|
2022-07-26 01:37:46 +03:00
|
|
|
|
2023-03-16 19:44:28 +03:00
|
|
|
%.o: %.S
|
|
|
|
$(CC) -march=z13 -m64 -c $< -o $@
|
|
|
|
|
2023-05-11 14:46:51 +03:00
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -march=z13 -m64 -c $< -o $@
|
|
|
|
|
|
|
|
%: %.o
|
2023-03-16 19:44:28 +03:00
|
|
|
$(CC) $< -o $@ $(LDFLAGS)
|
2022-07-26 01:37:46 +03:00
|
|
|
|
2023-05-11 14:46:51 +03:00
|
|
|
ASM_TESTS = \
|
|
|
|
bal \
|
2023-07-24 11:16:01 +03:00
|
|
|
cksm \
|
2023-07-24 11:16:03 +03:00
|
|
|
clm \
|
2023-05-11 14:46:51 +03:00
|
|
|
exrl-ssm-early \
|
|
|
|
sam \
|
|
|
|
lpsw \
|
|
|
|
lpswe-early \
|
2023-07-04 11:12:34 +03:00
|
|
|
lra \
|
2023-05-11 14:46:51 +03:00
|
|
|
ssm-early \
|
|
|
|
stosm-early \
|
|
|
|
unaligned-lowcore
|
2023-03-16 19:44:28 +03:00
|
|
|
|
|
|
|
include $(S390X_SRC)/pgm-specification.mak
|
|
|
|
$(PGM_SPECIFICATION_TESTS): pgm-specification-softmmu.o
|
|
|
|
$(PGM_SPECIFICATION_TESTS): LDFLAGS+=pgm-specification-softmmu.o
|
2023-05-11 14:46:51 +03:00
|
|
|
ASM_TESTS += $(PGM_SPECIFICATION_TESTS)
|
|
|
|
|
|
|
|
$(ASM_TESTS): LDFLAGS += -Wl,-T$(LINK_SCRIPT) -Wl,--build-id=none
|
|
|
|
$(ASM_TESTS): $(LINK_SCRIPT)
|
|
|
|
TESTS += $(ASM_TESTS)
|
2023-04-24 12:22:44 +03:00
|
|
|
|
2023-05-11 14:46:51 +03:00
|
|
|
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
|