diff options
author | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-06 11:07:50 +0000 |
---|---|---|
committer | edgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-06-06 11:07:50 +0000 |
commit | 313281198dc87984fde5cc3aceccbb002beed047 (patch) | |
tree | f9a265fdd6392c8763a6f278a67cf99c57d954f8 /tests/cris | |
parent | 9012c2bf32aaf34a5ee12c3d9c8718af1530eeec (diff) |
Make the tests run when built with experimental gcc-cris 4.4. Prettify the logs.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4682 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'tests/cris')
-rw-r--r-- | tests/cris/Makefile | 4 | ||||
-rw-r--r-- | tests/cris/sys.c | 11 | ||||
-rw-r--r-- | tests/cris/testutils.inc | 8 |
3 files changed, 13 insertions, 10 deletions
diff --git a/tests/cris/Makefile b/tests/cris/Makefile index 69068996f7..cfe494c3ad 100644 --- a/tests/cris/Makefile +++ b/tests/cris/Makefile @@ -140,9 +140,9 @@ build: $(CRT) $(SYS) $(TESTCASES) check: $(CRT) $(SYS) $(TESTCASES) @echo -e "\nQEMU simulator." - @for case in $(TESTCASES); do \ + for case in $(TESTCASES); do \ echo -n "$$case "; \ - $(SIM) $$case; \ + $(SIM) ./$$case; \ done check-g: $(CRT) $(SYS) $(TESTCASES) @echo -e "\nGDB simulator." diff --git a/tests/cris/sys.c b/tests/cris/sys.c index 264ec06f3e..551c5dd7cb 100644 --- a/tests/cris/sys.c +++ b/tests/cris/sys.c @@ -16,7 +16,7 @@ void pass(void) { } void _fail(char *reason) { - char s[] = "failed: "; + char s[] = "\nfailed: "; int len = mystrlen(reason); write (1, s, sizeof (s) - 1); write (1, reason, len); @@ -41,8 +41,11 @@ void exit (int status) { ssize_t write (int fd, const void *buf, size_t count) { int r; - asm volatile ("moveq 4, $r9\n" /* NR_write. */ - "break 13\n" : : : "memory"); - asm volatile ("move.d $r10, %0\n" : "=r" (r)); + asm ("move.d %0, $r10\n" + "move.d %1, $r11\n" + "move.d %2, $r12\n" + "moveq 4, $r9\n" /* NR_write. */ + "break 13\n" : : "r" (fd), "r" (buf), "r" (count) : "memory"); + asm ("move.d $r10, %0\n" : "=r" (r)); return r; } diff --git a/tests/cris/testutils.inc b/tests/cris/testutils.inc index 4f434e1e4b..aa1641b2e6 100644 --- a/tests/cris/testutils.inc +++ b/tests/cris/testutils.inc @@ -23,7 +23,7 @@ main: .macro fail .data 99: - .asciz " checkr3 failed" + .asciz " checkr3 failed\n" .text move.d 99b, $r10 jsr _fail @@ -36,7 +36,7 @@ main: nop .data 99: - .asciz "checkr3 failed" + .asciz "checkr3 failed\n" .text move.d 99b, $r10 jsr _fail @@ -79,7 +79,7 @@ main: 9: .data 99: - .asciz "test_move_cc failed" + .asciz "test_move_cc failed\n" .text move.d 99b, $r10 jsr _fail @@ -108,7 +108,7 @@ main: 9: .data 99: - .asciz "test_move_cc failed" + .asciz "test_move_cc failed\n" .text move.d 99b, $r10 jsr _fail |