]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tests/tcg/alpha: add Alpha specific tests
authorAlex Bennée <alex.bennee@linaro.org>
Mon, 23 Apr 2018 14:48:06 +0000 (15:48 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Wed, 20 Jun 2018 19:22:34 +0000 (20:22 +0100)
These tests did use their own crt.o stub however that is a little
stone age so we drop crt.S and just statically link to the cross
compilers libraries.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
tests/tcg/alpha/Makefile [deleted file]
tests/tcg/alpha/Makefile.target
tests/tcg/alpha/crt.s [deleted file]
tests/tcg/alpha/hello-alpha.c
tests/tcg/alpha/test-cond.c
tests/tcg/alpha/test-ovf.c

diff --git a/tests/tcg/alpha/Makefile b/tests/tcg/alpha/Makefile
deleted file mode 100644 (file)
index 2b1f03d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-CROSS=alpha-linux-gnu-
-CC=$(CROSS)gcc
-AS=$(CROSS)as
-
-SIM=../../alpha-linux-user/qemu-alpha
-
-CFLAGS=-O
-LINK=$(CC) -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)
-
-test-ovf: test-ovf.o crt.o
-       $(LINK)
-
-check: $(TESTS)
-       for f in $(TESTS); do $(SIM) $$f || exit 1; done
-
-clean:
-       $(RM) *.o *~ hello-alpha $(TESTS)
-
-.PHONY: clean all check
index bedf1b644420117c832e8c481db3e4f105499243..a58508032822211976c433a8ccd3b49d1cc10df8 100644 (file)
@@ -2,5 +2,17 @@
 #
 # Alpha specific tweaks
 
+ALPHA_SRC=$(SRC_PATH)/tests/tcg/alpha
+VPATH+=$(ALPHA_SRC)
+
+ALPHA_TESTS=hello-alpha test-cond test-cmov test-ovf
+TESTS+=$(ALPHA_TESTS)
+
+test-cmov: EXTRA_CFLAGS=-DTEST_CMOV
+test-cmov: test-cond.c
+       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS)
+
+run-test-cmov: test-cmov
+
 # On Alpha Linux only supports 8k pages
 EXTRA_RUNS+=run-test-mmap-8192
diff --git a/tests/tcg/alpha/crt.s b/tests/tcg/alpha/crt.s
deleted file mode 100644 (file)
index 31af882..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-       .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)
-       or $0,$0,$16
-       .end _start
-
-       .globl _exit
-_exit:
-       lda $0,1
-       callsys
-
-       call_pal 0
-
-       .globl write
-write:
-       lda $0,4
-       callsys
-       ret
index 79892e6522f3df13bfa048e21431953e54f08500..84e43b2fc4a254c82154c6b1168159e3c86578a3 100644 (file)
@@ -1,3 +1,5 @@
+#include <unistd.h>
+
 int main (void)
 {
   write (1, "hello\n", 6);
index 74adffaa695871530ad0ee59d7af261c6c0b93fc..e625313b3e082ff858ab45e3d04f1ddf28b9beb7 100644 (file)
@@ -1,3 +1,4 @@
+#include <unistd.h>
 
 #ifdef TEST_CMOV
 
index 01c80e752584d48b2ad72d2f5a5c5f8e9ebaa79a..17892f1e89ecee533f59d39206a6f8243ea34b79 100644 (file)
@@ -1,3 +1,5 @@
+#include <unistd.h>
+
 static long test_subqv (long a, long b)
 {
   long res;