Commit 313281198dc87984fde5cc3aceccbb002beed047
1 parent
9012c2bf
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
Showing
3 changed files
with
13 additions
and
10 deletions
tests/cris/Makefile
... | ... | @@ -140,9 +140,9 @@ build: $(CRT) $(SYS) $(TESTCASES) |
140 | 140 | |
141 | 141 | check: $(CRT) $(SYS) $(TESTCASES) |
142 | 142 | @echo -e "\nQEMU simulator." |
143 | - @for case in $(TESTCASES); do \ | |
143 | + for case in $(TESTCASES); do \ | |
144 | 144 | echo -n "$$case "; \ |
145 | - $(SIM) $$case; \ | |
145 | + $(SIM) ./$$case; \ | |
146 | 146 | done |
147 | 147 | check-g: $(CRT) $(SYS) $(TESTCASES) |
148 | 148 | @echo -e "\nGDB simulator." | ... | ... |
tests/cris/sys.c
... | ... | @@ -16,7 +16,7 @@ void pass(void) { |
16 | 16 | } |
17 | 17 | |
18 | 18 | void _fail(char *reason) { |
19 | - char s[] = "failed: "; | |
19 | + char s[] = "\nfailed: "; | |
20 | 20 | int len = mystrlen(reason); |
21 | 21 | write (1, s, sizeof (s) - 1); |
22 | 22 | write (1, reason, len); |
... | ... | @@ -41,8 +41,11 @@ void exit (int status) { |
41 | 41 | |
42 | 42 | ssize_t write (int fd, const void *buf, size_t count) { |
43 | 43 | int r; |
44 | - asm volatile ("moveq 4, $r9\n" /* NR_write. */ | |
45 | - "break 13\n" : : : "memory"); | |
46 | - asm volatile ("move.d $r10, %0\n" : "=r" (r)); | |
44 | + asm ("move.d %0, $r10\n" | |
45 | + "move.d %1, $r11\n" | |
46 | + "move.d %2, $r12\n" | |
47 | + "moveq 4, $r9\n" /* NR_write. */ | |
48 | + "break 13\n" : : "r" (fd), "r" (buf), "r" (count) : "memory"); | |
49 | + asm ("move.d $r10, %0\n" : "=r" (r)); | |
47 | 50 | return r; |
48 | 51 | } | ... | ... |
tests/cris/testutils.inc
... | ... | @@ -23,7 +23,7 @@ main: |
23 | 23 | .macro fail |
24 | 24 | .data |
25 | 25 | 99: |
26 | - .asciz " checkr3 failed" | |
26 | + .asciz " checkr3 failed\n" | |
27 | 27 | .text |
28 | 28 | move.d 99b, $r10 |
29 | 29 | jsr _fail |
... | ... | @@ -36,7 +36,7 @@ main: |
36 | 36 | nop |
37 | 37 | .data |
38 | 38 | 99: |
39 | - .asciz "checkr3 failed" | |
39 | + .asciz "checkr3 failed\n" | |
40 | 40 | .text |
41 | 41 | move.d 99b, $r10 |
42 | 42 | jsr _fail |
... | ... | @@ -79,7 +79,7 @@ main: |
79 | 79 | 9: |
80 | 80 | .data |
81 | 81 | 99: |
82 | - .asciz "test_move_cc failed" | |
82 | + .asciz "test_move_cc failed\n" | |
83 | 83 | .text |
84 | 84 | move.d 99b, $r10 |
85 | 85 | jsr _fail |
... | ... | @@ -108,7 +108,7 @@ main: |
108 | 108 | 9: |
109 | 109 | .data |
110 | 110 | 99: |
111 | - .asciz "test_move_cc failed" | |
111 | + .asciz "test_move_cc failed\n" | |
112 | 112 | .text |
113 | 113 | move.d 99b, $r10 |
114 | 114 | jsr _fail | ... | ... |