aboutsummaryrefslogtreecommitdiff
path: root/tests/alpha
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-01-10 13:10:42 -0600
committerAnthony Liguori <aliguori@us.ibm.com>2012-01-12 10:03:28 -0600
commitc09015dd04e14a9b99250ed06fb5a47e2efa387f (patch)
treecc9e2078c44558a7d0e4ee9bd914383c6be130b5 /tests/alpha
parenta0f426109e17d579c2712f5b96a50215e6cc06a4 (diff)
tests: mv tests/* -> tests/tcg
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'tests/alpha')
-rw-r--r--tests/alpha/Makefile35
-rw-r--r--tests/alpha/crt.s26
-rw-r--r--tests/alpha/hello-alpha.c5
-rw-r--r--tests/alpha/test-cond.c87
-rw-r--r--tests/alpha/test-ovf.c29
5 files changed, 0 insertions, 182 deletions
diff --git a/tests/alpha/Makefile b/tests/alpha/Makefile
deleted file mode 100644
index 2b1f03d048..0000000000
--- a/tests/alpha/Makefile
+++ /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
diff --git a/tests/alpha/crt.s b/tests/alpha/crt.s
deleted file mode 100644
index 31af8825bc..0000000000
--- a/tests/alpha/crt.s
+++ /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
diff --git a/tests/alpha/hello-alpha.c b/tests/alpha/hello-alpha.c
deleted file mode 100644
index 79892e6522..0000000000
--- a/tests/alpha/hello-alpha.c
+++ /dev/null
@@ -1,5 +0,0 @@
-int main (void)
-{
- write (1, "hello\n", 6);
- return 0;
-}
diff --git a/tests/alpha/test-cond.c b/tests/alpha/test-cond.c
deleted file mode 100644
index 74adffaa69..0000000000
--- a/tests/alpha/test-cond.c
+++ /dev/null
@@ -1,87 +0,0 @@
-
-#ifdef TEST_CMOV
-
-#define TEST_COND(N) \
-int test_##N (long a) \
-{ \
- int res = 1; \
- \
- asm ("cmov"#N" %1,$31,%0" \
- : "+r" (res) : "r" (a)); \
- return !res; \
-}
-
-#else
-
-#define TEST_COND(N) \
-int test_##N (long a) \
-{ \
- int res = 1; \
- \
- asm ("b"#N" %1,1f\n\t" \
- "addq $31,$31,%0\n\t" \
- "1: unop\n" \
- : "+r" (res) : "r" (a)); \
- return res; \
-}
-
-#endif
-
-TEST_COND(eq)
-TEST_COND(ne)
-TEST_COND(ge)
-TEST_COND(gt)
-TEST_COND(lbc)
-TEST_COND(lbs)
-TEST_COND(le)
-TEST_COND(lt)
-
-static struct {
- int (*func)(long);
- long v;
- int r;
-} vectors[] =
- {
- {test_eq, 0, 1},
- {test_eq, 1, 0},
-
- {test_ne, 0, 0},
- {test_ne, 1, 1},
-
- {test_ge, 0, 1},
- {test_ge, 1, 1},
- {test_ge, -1, 0},
-
- {test_gt, 0, 0},
- {test_gt, 1, 1},
- {test_gt, -1, 0},
-
- {test_lbc, 0, 1},
- {test_lbc, 1, 0},
- {test_lbc, -1, 0},
-
- {test_lbs, 0, 0},
- {test_lbs, 1, 1},
- {test_lbs, -1, 1},
-
- {test_le, 0, 1},
- {test_le, 1, 0},
- {test_le, -1, 1},
-
- {test_lt, 0, 0},
- {test_lt, 1, 0},
- {test_lt, -1, 1},
- };
-
-int main (void)
-{
- int i;
-
- for (i = 0; i < sizeof (vectors)/sizeof(vectors[0]); i++)
- if ((*vectors[i].func)(vectors[i].v) != vectors[i].r) {
- write(1, "Failed\n", 7);
- return 1;
- }
- write(1, "OK\n", 3);
- return 0;
-}
diff --git a/tests/alpha/test-ovf.c b/tests/alpha/test-ovf.c
deleted file mode 100644
index 01c80e7525..0000000000
--- a/tests/alpha/test-ovf.c
+++ /dev/null
@@ -1,29 +0,0 @@
-static long test_subqv (long a, long b)
-{
- long res;
-
- asm ("subq/v %1,%2,%0"
- : "=r" (res) : "r" (a), "r" (b));
- return res;
-}
-static struct {
- long (*func)(long, long);
- long a;
- long b;
- long r;
-} vectors[] =
- {
- {test_subqv, 0, 0x7d54000, 0xfffffffff82ac000L}
- };
-
-int main (void)
-{
- int i;
-
- for (i = 0; i < sizeof (vectors)/sizeof(vectors[0]); i++)
- if ((*vectors[i].func)(vectors[i].a, vectors[i].b) != vectors[i].r) {
- write(1, "Failed\n", 7);
- }
- write(1, "OK\n", 3);
- return 0;
-}