2012-01-13 14:09:56 +04:00
|
|
|
-include ../../../config-host.mak
|
2007-10-08 17:32:20 +04:00
|
|
|
|
|
|
|
CROSS=crisv32-axis-linux-gnu-
|
2012-01-13 14:09:56 +04:00
|
|
|
SIM=../../../cris-linux-user/qemu-cris -L ./
|
2007-10-08 17:32:20 +04:00
|
|
|
SIMG=cris-axis-linux-gnu-run --sysroot=./
|
|
|
|
|
|
|
|
CC = $(CROSS)gcc
|
|
|
|
#AS = $(CROSS)as
|
|
|
|
AS = $(CC) -x assembler-with-cpp
|
|
|
|
SIZE = $(CROSS)size
|
|
|
|
LD = $(CC)
|
|
|
|
OBJCOPY = $(CROSS)objcopy
|
|
|
|
|
|
|
|
# we rely on GCC inline:ing the stuff we tell it to in many places here.
|
|
|
|
CFLAGS = -Winline -Wall -g -O2 -static
|
|
|
|
NOSTDFLAGS = -nostartfiles -nostdlib
|
2012-01-13 14:09:56 +04:00
|
|
|
ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/tcg/cris/
|
2007-10-08 17:32:20 +04:00
|
|
|
LDLIBS =
|
|
|
|
NOSTDLIBS = -lgcc
|
|
|
|
|
|
|
|
CRT = crt.o
|
|
|
|
SYS = sys.o
|
|
|
|
TESTCASES += check_abs.tst
|
|
|
|
TESTCASES += check_addc.tst
|
|
|
|
TESTCASES += check_addcm.tst
|
2016-08-24 11:42:16 +03:00
|
|
|
TESTCASES += check_addcv17.tst
|
2007-10-08 17:32:20 +04:00
|
|
|
TESTCASES += check_addo.tst
|
|
|
|
TESTCASES += check_addoq.tst
|
|
|
|
TESTCASES += check_addi.tst
|
|
|
|
TESTCASES += check_addiv32.tst
|
|
|
|
TESTCASES += check_addm.tst
|
|
|
|
TESTCASES += check_addr.tst
|
|
|
|
TESTCASES += check_addq.tst
|
|
|
|
TESTCASES += check_addxc.tst
|
|
|
|
TESTCASES += check_addxm.tst
|
|
|
|
TESTCASES += check_addxr.tst
|
|
|
|
TESTCASES += check_andc.tst
|
|
|
|
TESTCASES += check_andm.tst
|
|
|
|
TESTCASES += check_andr.tst
|
|
|
|
TESTCASES += check_andq.tst
|
|
|
|
TESTCASES += check_asr.tst
|
|
|
|
TESTCASES += check_ba.tst
|
|
|
|
TESTCASES += check_bas.tst
|
|
|
|
TESTCASES += check_bcc.tst
|
|
|
|
TESTCASES += check_bound.tst
|
|
|
|
TESTCASES += check_boundc.tst
|
|
|
|
TESTCASES += check_boundr.tst
|
|
|
|
TESTCASES += check_btst.tst
|
|
|
|
TESTCASES += check_clearfv32.tst
|
|
|
|
TESTCASES += check_cmpc.tst
|
|
|
|
TESTCASES += check_cmpr.tst
|
|
|
|
TESTCASES += check_cmpq.tst
|
|
|
|
TESTCASES += check_cmpm.tst
|
|
|
|
TESTCASES += check_cmpxc.tst
|
|
|
|
TESTCASES += check_cmpxm.tst
|
|
|
|
TESTCASES += check_cmp-2.tst
|
|
|
|
TESTCASES += check_clrjmp1.tst
|
|
|
|
TESTCASES += check_dstep.tst
|
2008-02-25 13:00:07 +03:00
|
|
|
TESTCASES += check_ftag.tst
|
2007-10-08 17:32:20 +04:00
|
|
|
TESTCASES += check_int64.tst
|
|
|
|
# check_jsr is broken.
|
|
|
|
#TESTCASES += check_jsr.tst
|
|
|
|
TESTCASES += check_mcp.tst
|
|
|
|
TESTCASES += check_movei.tst
|
|
|
|
TESTCASES += check_mover.tst
|
|
|
|
TESTCASES += check_moverm.tst
|
|
|
|
TESTCASES += check_moveq.tst
|
|
|
|
TESTCASES += check_movemr.tst
|
|
|
|
TESTCASES += check_movemrv32.tst
|
|
|
|
TESTCASES += check_movecr.tst
|
|
|
|
TESTCASES += check_movmp.tst
|
|
|
|
TESTCASES += check_movpr.tst
|
|
|
|
TESTCASES += check_movprv32.tst
|
|
|
|
TESTCASES += check_movdelsr1.tst
|
|
|
|
TESTCASES += check_movpmv32.tst
|
|
|
|
TESTCASES += check_movsr.tst
|
|
|
|
TESTCASES += check_movsm.tst
|
|
|
|
TESTCASES += check_movscr.tst
|
|
|
|
TESTCASES += check_movur.tst
|
|
|
|
TESTCASES += check_movum.tst
|
|
|
|
TESTCASES += check_movucr.tst
|
|
|
|
TESTCASES += check_mulx.tst
|
|
|
|
TESTCASES += check_mulv32.tst
|
|
|
|
TESTCASES += check_neg.tst
|
|
|
|
TESTCASES += check_not.tst
|
|
|
|
TESTCASES += check_lz.tst
|
|
|
|
TESTCASES += check_lapc.tst
|
|
|
|
TESTCASES += check_lsl.tst
|
|
|
|
TESTCASES += check_lsr.tst
|
|
|
|
TESTCASES += check_orc.tst
|
|
|
|
TESTCASES += check_orm.tst
|
|
|
|
TESTCASES += check_orr.tst
|
|
|
|
TESTCASES += check_orq.tst
|
|
|
|
TESTCASES += check_ret.tst
|
|
|
|
TESTCASES += check_swap.tst
|
|
|
|
TESTCASES += check_scc.tst
|
|
|
|
TESTCASES += check_subc.tst
|
|
|
|
TESTCASES += check_subq.tst
|
|
|
|
TESTCASES += check_subr.tst
|
|
|
|
TESTCASES += check_subm.tst
|
|
|
|
TESTCASES += check_glibc_kernelversion.tst
|
|
|
|
TESTCASES += check_xarith.tst
|
|
|
|
|
|
|
|
TESTCASES += check_hello.ctst
|
|
|
|
TESTCASES += check_stat1.ctst
|
|
|
|
TESTCASES += check_stat2.ctst
|
|
|
|
TESTCASES += check_stat3.ctst
|
|
|
|
TESTCASES += check_stat4.ctst
|
|
|
|
TESTCASES += check_openpf1.ctst
|
|
|
|
TESTCASES += check_openpf2.ctst
|
|
|
|
TESTCASES += check_openpf3.ctst
|
|
|
|
TESTCASES += check_openpf5.ctst
|
|
|
|
TESTCASES += check_mapbrk.ctst
|
|
|
|
TESTCASES += check_mmap1.ctst
|
|
|
|
TESTCASES += check_mmap2.ctst
|
|
|
|
TESTCASES += check_mmap3.ctst
|
2008-02-28 14:23:20 +03:00
|
|
|
TESTCASES += check_sigalrm.ctst
|
2007-10-08 17:32:20 +04:00
|
|
|
TESTCASES += check_time2.ctst
|
2009-01-07 17:19:38 +03:00
|
|
|
TESTCASES += check_settls1.ctst
|
2007-10-08 17:32:20 +04:00
|
|
|
|
|
|
|
TESTCASES += check_gcctorture_pr28634-1.ctst
|
|
|
|
#TESTCASES += check_gcctorture_pr28634.ctst
|
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2012-01-13 14:09:56 +04:00
|
|
|
%.o: $(SRC_PATH)/tests/tcg/cris/%.c
|
2007-10-08 17:32:20 +04:00
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
2012-01-13 14:09:56 +04:00
|
|
|
%.o: $(SRC_PATH)/tests/tcg/cris/%.s
|
2007-10-08 17:32:20 +04:00
|
|
|
$(AS) $(ASFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
%.tst: %.o
|
|
|
|
$(CC) $(CFLAGS) $(NOSTDFLAGS) $(LDLIBS) $(NOSTDLIBS) $(CRT) $< $(SYS) -o $@
|
|
|
|
|
|
|
|
%.ctst: %.o
|
|
|
|
$(CC) $(CFLAGS) $(LDLIBS) $< -o $@
|
|
|
|
|
2016-08-24 11:42:16 +03:00
|
|
|
|
|
|
|
sysv10.o: sys.c
|
|
|
|
$(CC) $(CFLAGS) -mcpu=v10 -c $< -o $@
|
|
|
|
|
|
|
|
crtv10.o: crt.s
|
|
|
|
$(AS) $(ASFLAGS) -mcpu=v10 -c $< -o $@
|
|
|
|
|
|
|
|
check_addcv17.tst: ASFLAGS += -mcpu=v10
|
|
|
|
check_addcv17.tst: CRT := crtv10.o
|
|
|
|
check_addcv17.tst: SYS := sysv10.o
|
|
|
|
check_addcv17.tst: crtv10.o sysv10.o
|
|
|
|
|
2007-10-08 17:32:20 +04:00
|
|
|
build: $(CRT) $(SYS) $(TESTCASES)
|
|
|
|
|
|
|
|
check: $(CRT) $(SYS) $(TESTCASES)
|
tests: Avoid non-portable 'echo -ARG'
POSIX says that backslashes in the arguments to 'echo', as well as
any use of 'echo -n' and 'echo -e', are non-portable; it recommends
people should favor 'printf' instead. This is definitely true where
we do not control which shell is running (such as in makefile snippets
or in documentation examples). But even for scripts where we
require bash (and therefore, where echo does what we want by default),
it is still possible to use 'shopt -s xpg_echo' to change bash's
behavior of echo. And setting a good example never hurts when we are
not sure if a snippet will be copied from a bash-only script to a
general shell script (although I don't change the use of non-portable
\e for ESC when we know the running shell is bash).
Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
with 'printf %b "...\n"', with the optimization that the %s/%b
argument can be omitted if the string being printed is a strict
literal with no '%', '$', or '`' (we could technically also make
this optimization when there are $ or `` substitutions but where
we can prove their results will not be problematic, but proving
that such substitutions are safe makes the patch less trivial
compared to just being consistent).
In the qemu-iotests check script, fix unusual shell quoting
that would result in word-splitting if 'date' outputs a space.
In test 051, take an opportunity to shorten the line.
In test 068, get rid of a pointless second invocation of bash.
CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id: 20170703180950.9895-1-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-03 21:09:50 +03:00
|
|
|
@printf "\nQEMU simulator.\n"
|
2008-06-06 15:07:50 +04:00
|
|
|
for case in $(TESTCASES); do \
|
tests: Avoid non-portable 'echo -ARG'
POSIX says that backslashes in the arguments to 'echo', as well as
any use of 'echo -n' and 'echo -e', are non-portable; it recommends
people should favor 'printf' instead. This is definitely true where
we do not control which shell is running (such as in makefile snippets
or in documentation examples). But even for scripts where we
require bash (and therefore, where echo does what we want by default),
it is still possible to use 'shopt -s xpg_echo' to change bash's
behavior of echo. And setting a good example never hurts when we are
not sure if a snippet will be copied from a bash-only script to a
general shell script (although I don't change the use of non-portable
\e for ESC when we know the running shell is bash).
Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
with 'printf %b "...\n"', with the optimization that the %s/%b
argument can be omitted if the string being printed is a strict
literal with no '%', '$', or '`' (we could technically also make
this optimization when there are $ or `` substitutions but where
we can prove their results will not be problematic, but proving
that such substitutions are safe makes the patch less trivial
compared to just being consistent).
In the qemu-iotests check script, fix unusual shell quoting
that would result in word-splitting if 'date' outputs a space.
In test 051, take an opportunity to shorten the line.
In test 068, get rid of a pointless second invocation of bash.
CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id: 20170703180950.9895-1-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-03 21:09:50 +03:00
|
|
|
printf %s "$$case "; \
|
2016-08-24 11:42:16 +03:00
|
|
|
SIMARGS=; \
|
|
|
|
case $$case in *v17*) SIMARGS="-cpu crisv17";; esac; \
|
|
|
|
$(SIM) $$SIMARGS ./$$case; \
|
2007-10-08 17:32:20 +04:00
|
|
|
done
|
|
|
|
check-g: $(CRT) $(SYS) $(TESTCASES)
|
tests: Avoid non-portable 'echo -ARG'
POSIX says that backslashes in the arguments to 'echo', as well as
any use of 'echo -n' and 'echo -e', are non-portable; it recommends
people should favor 'printf' instead. This is definitely true where
we do not control which shell is running (such as in makefile snippets
or in documentation examples). But even for scripts where we
require bash (and therefore, where echo does what we want by default),
it is still possible to use 'shopt -s xpg_echo' to change bash's
behavior of echo. And setting a good example never hurts when we are
not sure if a snippet will be copied from a bash-only script to a
general shell script (although I don't change the use of non-portable
\e for ESC when we know the running shell is bash).
Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
with 'printf %b "...\n"', with the optimization that the %s/%b
argument can be omitted if the string being printed is a strict
literal with no '%', '$', or '`' (we could technically also make
this optimization when there are $ or `` substitutions but where
we can prove their results will not be problematic, but proving
that such substitutions are safe makes the patch less trivial
compared to just being consistent).
In the qemu-iotests check script, fix unusual shell quoting
that would result in word-splitting if 'date' outputs a space.
In test 051, take an opportunity to shorten the line.
In test 068, get rid of a pointless second invocation of bash.
CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id: 20170703180950.9895-1-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-03 21:09:50 +03:00
|
|
|
@printf "\nGDB simulator.\n"
|
2007-10-08 17:32:20 +04:00
|
|
|
@for case in $(TESTCASES); do \
|
tests: Avoid non-portable 'echo -ARG'
POSIX says that backslashes in the arguments to 'echo', as well as
any use of 'echo -n' and 'echo -e', are non-portable; it recommends
people should favor 'printf' instead. This is definitely true where
we do not control which shell is running (such as in makefile snippets
or in documentation examples). But even for scripts where we
require bash (and therefore, where echo does what we want by default),
it is still possible to use 'shopt -s xpg_echo' to change bash's
behavior of echo. And setting a good example never hurts when we are
not sure if a snippet will be copied from a bash-only script to a
general shell script (although I don't change the use of non-portable
\e for ESC when we know the running shell is bash).
Replace 'echo -n "..."' with 'printf %s "..."', and 'echo -e "..."'
with 'printf %b "...\n"', with the optimization that the %s/%b
argument can be omitted if the string being printed is a strict
literal with no '%', '$', or '`' (we could technically also make
this optimization when there are $ or `` substitutions but where
we can prove their results will not be problematic, but proving
that such substitutions are safe makes the patch less trivial
compared to just being consistent).
In the qemu-iotests check script, fix unusual shell quoting
that would result in word-splitting if 'date' outputs a space.
In test 051, take an opportunity to shorten the line.
In test 068, get rid of a pointless second invocation of bash.
CC: qemu-trivial@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-id: 20170703180950.9895-1-eblake@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
2017-07-03 21:09:50 +03:00
|
|
|
printf %s "$$case "; \
|
2007-10-08 17:32:20 +04:00
|
|
|
$(SIMG) $$case; \
|
|
|
|
done
|
|
|
|
|
|
|
|
clean:
|
2016-08-24 11:42:16 +03:00
|
|
|
$(RM) -fr $(TESTCASES) *.o
|