Commit a986fcc469cd63d56d7cc52df132c010c1f23a21

Authored by aurel32
1 parent d74e3b12

alpha: improve testsuite

misc tiny patches:
* add a 'check' target to the Makefile
* split code in crt.s to create the _exit syscall; also use the value of
main() as exit status

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5244 c046a42c-6fe2-441c-8c8c-71466251a162
tests/alpha/Makefile
... ... @@ -5,7 +5,7 @@ AS=$(CROSS)as
5 5 SIM=../../alpha-linux-user/qemu-alpha
6 6  
7 7 CFLAGS=-O
8   -LINK=$(CC) -v -o $@ crt.o $< -nostdlib
  8 +LINK=$(CC) -o $@ crt.o $< -nostdlib
9 9  
10 10 TESTS=test-cond test-cmov
11 11  
... ... @@ -23,7 +23,10 @@ test-cmov.o: test-cond.c
23 23 test-cmov: test-cmov.o crt.o
24 24 $(LINK)
25 25  
  26 +check: $(TESTS)
  27 + for f in $(TESTS); do $(SIM) $$f || exit 1; done
  28 +
26 29 clean:
27 30 $(RM) *.o *~ hello-alpha $(TESTS)
28 31  
29   -.PHONY: clean all
  32 +.PHONY: clean all check
... ...
tests/alpha/crt.s
... ... @@ -9,12 +9,15 @@ _start:
9 9 .prologue 0
10 10 ldq $27,main($29) !literal!1
11 11 jsr $26,($27)
  12 + or $0,$0,$16
  13 + .end _start
12 14  
  15 + .globl _exit
  16 +_exit:
13 17 lda $0,1
14 18 callsys
15 19  
16 20 call_pal 0
17   - .end _start
18 21  
19 22 .globl write
20 23 write:
... ...