[5216] alpha: add tests
Revision: 5216
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5216 Author: aurel32 Date: 2008-09-14 17:18:29 +0000 (Sun, 14 Sep 2008)
Log Message:
-----------
alpha: add tests
This patch creates tests/alpha directory and adds an "hello world" program as well as two tests.
Added Paths:
-----------
trunk/tests/alpha/
trunk/tests/alpha/Makefile
trunk/tests/alpha/crt.s
trunk/tests/alpha/hello-alpha.c
trunk/tests/alpha/test-cond.c
Added: trunk/tests/alpha/Makefile
===================================================================
tests/alpha/Makefile +29 -0
@@ -0,0 +1,29 @@ +CROSS=alpha-linux-gnu- +CC=$(CROSS)gcc +AS=$(CROSS)as + +SIM=../../alpha-linux-user/qemu-alpha + +CFLAGS=-O +LINK=$(CC) -v -o $@ crt.o $< -nostdlib + +TESTS=test-cond test-cmov + +all: hello-alpha $(TESTS) + +hello-alpha: hello-alpha.o crt.o + $(LINK) + +test-cond: test-cond.o crt.o + $(LINK) + +test-cmov.o: test-cond.c + $(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $< + +test-cmov: test-cmov.o crt.o + $(LINK) + +clean: + $(RM) *.o *~ hello-alpha $(TESTS) + +.PHONY: clean all
Added: trunk/tests/alpha/crt.s
===================================================================
tests/alpha/crt.s +23 -0
@@ -0,0 +1,23 @@ + .text + + .globl _start + .ent _start,0 +_start: + .frame $15,0,$15 + br $29,1f +1: ldgp $29, 0($29) + .prologue 0 + ldq $27,main($29) !literal!1 + jsr $26,($27) + + lda $0,1 + callsys + + call_pal 0 + .end _start + + .globl write +write: + lda $0,4 + callsys + ret
Added: trunk/tests/alpha/hello-alpha.c
===================================================================
tests/alpha/hello-alpha.c +5 -0
@@ -0,0 +1,5 @@ +int main (void ) +{ +write (1 ,"hello\n" ,6 ); +return 0 ; +}
Added: trunk/tests/alpha/test-cond.c
===================================================================
tests/alpha/test-cond.c +87 -0
87 lines not on this page · raw message