Loading tests/cris/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -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." Loading tests/cris/sys.c +7 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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; } tests/cris/testutils.inc +4 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ main: .macro fail .data 99: .asciz " checkr3 failed" .asciz " checkr3 failed\n" .text move.d 99b, $r10 jsr _fail Loading @@ -36,7 +36,7 @@ main: nop .data 99: .asciz "checkr3 failed" .asciz "checkr3 failed\n" .text move.d 99b, $r10 jsr _fail Loading Loading @@ -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 Loading Loading @@ -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 Loading Loading
tests/cris/Makefile +2 −2 Original line number Diff line number Diff line Loading @@ -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." Loading
tests/cris/sys.c +7 −4 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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; }
tests/cris/testutils.inc +4 −4 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ main: .macro fail .data 99: .asciz " checkr3 failed" .asciz " checkr3 failed\n" .text move.d 99b, $r10 jsr _fail Loading @@ -36,7 +36,7 @@ main: nop .data 99: .asciz "checkr3 failed" .asciz "checkr3 failed\n" .text move.d 99b, $r10 jsr _fail Loading Loading @@ -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 Loading Loading @@ -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 Loading