* Makefile.in (ULIMIT): New variable.
[deliverable/binutils-gdb.git] / sim / testsuite / sky / Makefile.in
index 3b537c113c3776c8984f861a2749dfd8b9bcff8b..cc14741b3154fbf5d224a79d732ea91b5202821d 100644 (file)
@@ -1,12 +1,12 @@
 # Makefile for regression testing the sky simulator.
 
-
 VPATH = @srcdir@
 srcdir = @srcdir@
 srcroot = $(srcdir)/..
 
 prefix = @prefix@
 exec_prefix = @exec_prefix@
+bindir = $(exec_prefix)/bin
 
 host_alias = @host_alias@
 target_alias = @target_alias@
@@ -40,6 +40,19 @@ RUNTEST_FOR_TARGET = `\
     fi; \
   fi`
 
+DVPAS_FOR_TARGET = `\
+  if [ -x ${bindir}/dvp-elf-as ]; then \
+    echo ${bindir}/dvp-elf-as ; \
+  else \
+    echo $(target_alias)-as ; \
+  fi`
+
+DVPOBJCP_FOR_TARGET = `\
+  if [ -x ${bindir}/dvp-elf-objcopy ]; then \
+    echo ${bindir}/dvp-elf-objcopy ; \
+  else \
+    echo $(target_alias)-objcopy ; \
+  fi`
 
 AS_FOR_TARGET = `\
   if [ -x ../../../gas/as-new ]; then \
@@ -55,6 +68,7 @@ LD_FOR_TARGET = `\
     echo $(target_alias)-ld ; \
   fi`
 
+
 RUNOPTS = 
 
 RUN_FOR_TARGET = `\
@@ -73,58 +87,116 @@ GCC_FOR_TARGET = `\
 
 C_GEN = perl $(srcdir)/c_gen.pl
 
-.SUFFIXES: .trc .c .run .ok .vif0out .vif0ok .vif0expect .vif1out .vif1ok .vif1expect .uu
+# cpu time limit (in seconds)
+ULIMIT = 30
+
+.SUFFIXES: .trc .c .run .ok \
+           .vif0out .vif0ok .vif0expect \
+          .vif1out .vif1ok .vif1expect \
+          .vuout .vuok .vuexpect \
+          .uu  \
+          .dvpasm .vuasm 
 
 TESTS = \
-       t-pke1.vif0ok \
-       t-pke2.vif1ok \
-       t-pke3.ok \
-       t-pke4.vif0ok \
-       tss08_0.ok \
-       tss08_1.ok \
-       tss16_0.ok \
-       tss16_1.ok \
-       tss32_0.ok \
-       tss32_1.ok \
-       tsv208_0.ok \
-       tsv208_1.ok \
-       tsv216_0.ok \
-       tsv216_1.ok \
-       tsv232_0.ok \
-       tsv232_1.ok \
-       tsv308_0.ok \
-       tsv308_1.ok \
-       tsv316_0.ok \
-       tsv316_1.ok \
-       tsv332_0.ok \
-       tsv332_1.ok \
-       tsv408_0.ok \
-       tsv408_1.ok \
-       tsv416_0.ok \
-       tsv416_1.ok \
-       tsv432_0.ok \
-       tsv432_1.ok
-
-
-check: sanity 
-       -$(MAKE) -k $(TESTS)
+       t-dma.ok \
+       t-pke2.vif1ok t-pke3.ok t-pke4.vif0ok \
+       tss08_0.ok tss08_1.ok \
+       tss16_0.ok tss16_1.ok \
+       tss32_0.ok tss32_1.ok \
+       tsv208_0.ok tsv208_1.ok \
+       tsv216_0.ok tsv216_1.ok \
+       tsv232_0.ok tsv232_1.ok \
+       tsv308_0.ok tsv308_1.ok \
+       tsv316_0.ok tsv316_1.ok \
+       tsv332_0.ok tsv332_1.ok \
+       tsv408_0.ok tsv408_1.ok \
+       tsv416_0.ok tsv416_1.ok \
+       tsv432_0.ok tsv432_1.ok \
+       t-cop2.vuok t-cop2b.ok
+
+#SCE_TESTS := $(patsubst %.dvpasm, %.ok, $(wildcard sce*.dvpasm))
+SCE_TESTS = \
+        sce_test1.ok  sce_test2.ok  sce_test3.ok  sce_test4.ok  \
+        sce_test5.ok  sce_test6.ok  sce_test7.ok  sce_test8.ok  \
+        sce_test9.ok  sce_test10.ok sce2_test11.ok sce2_test12.ok  \
+        sce_test13.ok sce_test14.ok sce_test15.ok sce_test16.ok  \
+        sce_test17.ok sce_test18.ok sce_test19.ok sce_test20.ok  \
+        sce_test21.ok sce_test22.ok sce2_test23.ok sce_test24.ok  \
+        sce_test25.ok sce_test26.ok sce_test27.ok sce_test28.ok  \
+        sce_test29.ok sce_test30.ok sce_test31.ok sce_test32.ok  \
+        sce_test33.ok sce_test34.ok sce_test35.ok sce_test36.ok  \
+        sce_test37.ok sce_test38.ok sce_test39.ok sce_test40.ok  \
+        sce_test41.ok sce_test42.ok sce_test43.ok sce_test44.ok  \
+        sce_test45.ok sce_test46.ok sce_test47.ok sce_test48.ok  \
+        sce_test49.ok sce_test50.ok sce_test51.ok sce_test52.ok  \
+        sce_test53.ok sce_test54.ok sce_test55.ok sce_test56.ok  \
+        sce_test57.ok sce_test58.ok sce_test59.ok 
+
+check: sanity $(TESTS) 
+check_sce: sanity $(SCE_TESTS)
+
 sanity:
        @eval echo AS_FOR_TARGET = $(AS_FOR_TARGET)
        @eval echo LD_FOR_TARGET = $(LD_FOR_TARGET)
        @eval echo RUN_FOR_TARGET = $(RUN_FOR_TARGET)
        @eval echo GCC_FOR_TARGET = $(GCC_FOR_TARGET)
+       @eval echo DVPAS_FOR_TARGET = $(DVPAS_FOR_TARGET)
+       @eval echo DVPOBJCP_FOR_TARGET = $(DVPOBJCP_FOR_TARGET)
+
+#------------------------------------
+# Rules for building and running the SCE tests :
+#------------------------------------
+
+LDFLAGS=-T$(srcdir)/sky.ld
+CFLAGS += -g -I$(srcdir)
+ASFLAGS = -I$(srcdir)
+
+sce%.exe: sce%.o sce_main.o refresh.o
+       $(GCC_FOR_TARGET) $(CFLAGS) $(LDFLAGS) sce_main.o refresh.o -o $@ $<
 
+sce_main.o: sce_main.c
+       $(GCC_FOR_TARGET) -c $(CFLAGS) -o $@ $<
 
-# Rules for running the tests
+refresh.o: refresh.s
+       $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
+
+sce_%.o: sce_%.dvpasm sce_%.vuasm
+       $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
+
+sce2_%.o: sce2_%.dvpasm sce2_%.vubin
+       $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
+
+sce2_%.vubin: sce2_%.vu.o
+       $(DVPOBJCP_FOR_TARGET) -O binary $<  $@
+
+sce2_%.vu.o: sce2_%.vuasm
+       $(DVPAS_FOR_TARGET) $(ASFLAGS) -o $@ $<
+
+sce%.ok: sce%.exe
+       rm -f sce$*.ok 
+       ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $<  > sce$*_our_gif.dat; \
+        if [ $$? -ne 0 ];  then \
+          touch sce$*.ok; \
+       else \
+          echo Running sce$*.exe returns $$? > sce$*.ok ;\
+       fi
+          
+#      else                                               \
+#         diff -bitw sce$*_out_dif.dat sce$*_our_gif.dat > sce$*.ok; \
+#        fi
+
+#------------------------
+# Rules for running tests
+#------------------------
 
 .run.ok:
        rm -f tmp-$* $*.hi
-       ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$*
+       ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $< > tmp-$*
        mv tmp-$* $*.ok
 .run.ko:
        rm -f tmp-$* $*.ko
        set +e ; \
-       ulimit -t 30 ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
+       ulimit -t $(ULIMIT) ; $(RUN_FOR_TARGET) $< > tmp-$* ; \
        if [ $$? -ne 0 ] ; then \
          exit 0 ; \
        else \
@@ -137,13 +209,18 @@ sanity:
 .vif1out.vif1ok:
        diff $(srcdir)/$*.vif1expect $<
        touch $@
+.vuout.vuok:
+       diff $(srcdir)/$*.vuexpect $<
+
 
-# Rules for building all the tests
+#------------------------------------
+# Rules for building the TESTS
+#------------------------------------
 
 .trc.c:
        $(C_GEN) $< $@
 .c.run:
-       $(GCC_FOR_TARGET) -Tr5900.ld -o $@ $<
+       $(GCC_FOR_TARGET) $(CFLAGS) $(LDFLAGS) -o $@ $<
 .uu.run:
        uudecode $< > $@
 .run.vif0out:
@@ -152,7 +229,14 @@ sanity:
 .run.vif1out:
        rm -f $@
        -env VIF1_TRACE_FILE=$@ $(RUN_FOR_TARGET) $<
-
+.run.vuout:
+       rm -f $@
+       -env SKY_DEBUG=inst_trace $(RUN_FOR_TARGET) $< > $@
+.s.run:
+       rm -f $@
+       $(AS_FOR_TARGET) -mcpu=r5900 -o $@ $<
+.c.s:
+       $(GCC_FOR_TARGET) -S -o $@ $<
 
 
 #
@@ -161,7 +245,8 @@ sanity:
 clean mostlyclean:
        -rm -f *~ core *.o a.out *.x *.grt
        -rm -f *.vif*out *.ok tmp-*
-       rm -f $(TESTS)
+       rm -f $(TESTS) 
+       rm -f $(SCE_TESTS) sce*our_gif.dat sce*.exe *.vubin a.raw
 #      if [ x"${SUBDIRS}" != x ] ; then \
 #          for dir in ${SUBDIRS}; \
 #          do \
@@ -176,6 +261,7 @@ distclean maintainer-clean realclean: clean
        -rm -f *~ core
        -rm -f Makefile config.status *-init.exp
        -rm -fr *.log summary detail *.plog *.sum *.psum site.*
+       -rm -f a.raw
 #      if [ x"${SUBDIRS}" != x ] ; then \
 #          for dir in ${SUBDIRS}; \
 #          do \
This page took 0.030753 seconds and 4 git commands to generate.