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