arm: init
authorBernhard Urban <lewurm@gmail.com>
Sun, 6 Mar 2011 14:46:58 +0000 (14:46 +0000)
committerBernhard Urban <lewurm@gmail.com>
Sun, 6 Mar 2011 14:46:58 +0000 (14:46 +0000)
basically you can use the ppc testcases (since i use 32 bit here as well)

62 files changed:
gesamt_arm/codea_abgabe_a.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_a.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_a.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_aa.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_aa.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_aa.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ab.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ab.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ab.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ac.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ac.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ac.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ad.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ad.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ad.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ae.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ae.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ae.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_af.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_af.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_af.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ag.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ag.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ag.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ah.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ah.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ah.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ai.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ai.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ai.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_aj.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_aj.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_aj.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ak.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ak.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ak.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_al.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_al.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_al.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_am.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_am.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_am.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_an.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_an.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_an.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ao.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ao.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ao.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ap.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ap.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ap.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_aq.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_aq.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_aq.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_ar.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_ar.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_ar.instr [new file with mode: 0644]
gesamt_arm/codea_abgabe_as.0 [new file with mode: 0644]
gesamt_arm/codea_abgabe_as.call [new file with mode: 0644]
gesamt_arm/codea_abgabe_as.instr [new file with mode: 0644]
scripts/callingconvention.o
scripts/modlvatest_gesamt_arm.sh [new file with mode: 0755]

diff --git a/gesamt_arm/codea_abgabe_a.0 b/gesamt_arm/codea_abgabe_a.0
new file mode 100644 (file)
index 0000000..8c3fc2a
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return x-this;
+end;
diff --git a/gesamt_arm/codea_abgabe_a.call b/gesamt_arm/codea_abgabe_a.call
new file mode 100644 (file)
index 0000000..dfe2827
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(2,5)==3 && m(7,2)==-5);
diff --git a/gesamt_arm/codea_abgabe_a.instr b/gesamt_arm/codea_abgabe_a.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/gesamt_arm/codea_abgabe_aa.0 b/gesamt_arm/codea_abgabe_aa.0
new file mode 100644 (file)
index 0000000..3ef30f4
--- /dev/null
@@ -0,0 +1,3 @@
+method m()
+  return this;
+end;
diff --git a/gesamt_arm/codea_abgabe_aa.call b/gesamt_arm/codea_abgabe_aa.call
new file mode 100644 (file)
index 0000000..84b8a6d
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long);
+RET(m(5)==5 && m(9)==9);
diff --git a/gesamt_arm/codea_abgabe_aa.instr b/gesamt_arm/codea_abgabe_aa.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_ab.0 b/gesamt_arm/codea_abgabe_ab.0
new file mode 100644 (file)
index 0000000..930c6b4
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x y z)
+  return z;
+end;
diff --git a/gesamt_arm/codea_abgabe_ab.call b/gesamt_arm/codea_abgabe_ab.call
new file mode 100644 (file)
index 0000000..73ec7db
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long,long,long);
+RET(m(1,2,3,5)==5 && m(3,2,1,9)==9);
diff --git a/gesamt_arm/codea_abgabe_ab.instr b/gesamt_arm/codea_abgabe_ab.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_ac.0 b/gesamt_arm/codea_abgabe_ac.0
new file mode 100644 (file)
index 0000000..245811f
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return not this;
+end;
diff --git a/gesamt_arm/codea_abgabe_ac.call b/gesamt_arm/codea_abgabe_ac.call
new file mode 100644 (file)
index 0000000..3a00483
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(0,12)==1 && m(9,13)==0);
diff --git a/gesamt_arm/codea_abgabe_ac.instr b/gesamt_arm/codea_abgabe_ac.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/gesamt_arm/codea_abgabe_ad.0 b/gesamt_arm/codea_abgabe_ad.0
new file mode 100644 (file)
index 0000000..dd86b6e
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return -5;
+end;
diff --git a/gesamt_arm/codea_abgabe_ad.call b/gesamt_arm/codea_abgabe_ad.call
new file mode 100644 (file)
index 0000000..e341dfc
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(0,12)==-5 && m(9,13)==-5);
diff --git a/gesamt_arm/codea_abgabe_ad.instr b/gesamt_arm/codea_abgabe_ad.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_ae.0 b/gesamt_arm/codea_abgabe_ae.0
new file mode 100644 (file)
index 0000000..380147c
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return x--3;
+end;
diff --git a/gesamt_arm/codea_abgabe_ae.call b/gesamt_arm/codea_abgabe_ae.call
new file mode 100644 (file)
index 0000000..248ce1c
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(0,12)==15 && m(9,13)==16);
diff --git a/gesamt_arm/codea_abgabe_ae.instr b/gesamt_arm/codea_abgabe_ae.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_af.0 b/gesamt_arm/codea_abgabe_af.0
new file mode 100644 (file)
index 0000000..500f66a
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return x*this*x*this;
+end;
diff --git a/gesamt_arm/codea_abgabe_af.call b/gesamt_arm/codea_abgabe_af.call
new file mode 100644 (file)
index 0000000..94f6da0
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(2,3)==36 && m(5,-7)==35*35);
diff --git a/gesamt_arm/codea_abgabe_af.instr b/gesamt_arm/codea_abgabe_af.instr
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10
diff --git a/gesamt_arm/codea_abgabe_ag.0 b/gesamt_arm/codea_abgabe_ag.0
new file mode 100644 (file)
index 0000000..3d524dd
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return this or x;
+end;
diff --git a/gesamt_arm/codea_abgabe_ag.call b/gesamt_arm/codea_abgabe_ag.call
new file mode 100644 (file)
index 0000000..85b9ba2
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(3,9)==11 && m(6,13)==15);
diff --git a/gesamt_arm/codea_abgabe_ag.instr b/gesamt_arm/codea_abgabe_ag.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/gesamt_arm/codea_abgabe_ah.0 b/gesamt_arm/codea_abgabe_ah.0
new file mode 100644 (file)
index 0000000..970e37c
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return x<this;
+end;
diff --git a/gesamt_arm/codea_abgabe_ah.call b/gesamt_arm/codea_abgabe_ah.call
new file mode 100644 (file)
index 0000000..4698fe9
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(3,3)==0 && m(3,2)==1 && m(2,3)==0);
diff --git a/gesamt_arm/codea_abgabe_ah.instr b/gesamt_arm/codea_abgabe_ah.instr
new file mode 100644 (file)
index 0000000..48082f7
--- /dev/null
@@ -0,0 +1 @@
+12
diff --git a/gesamt_arm/codea_abgabe_ai.0 b/gesamt_arm/codea_abgabe_ai.0
new file mode 100644 (file)
index 0000000..1fc75db
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return -4<x;
+end;
diff --git a/gesamt_arm/codea_abgabe_ai.call b/gesamt_arm/codea_abgabe_ai.call
new file mode 100644 (file)
index 0000000..08f6d30
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(0,-4)==0 && m(9,-3)==1);
diff --git a/gesamt_arm/codea_abgabe_ai.instr b/gesamt_arm/codea_abgabe_ai.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/gesamt_arm/codea_abgabe_aj.0 b/gesamt_arm/codea_abgabe_aj.0
new file mode 100644 (file)
index 0000000..6d89eca
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return this<-9;
+end;
diff --git a/gesamt_arm/codea_abgabe_aj.call b/gesamt_arm/codea_abgabe_aj.call
new file mode 100644 (file)
index 0000000..f0e4c7b
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(-9,12)==0 && m(-10,13)==1);
diff --git a/gesamt_arm/codea_abgabe_aj.instr b/gesamt_arm/codea_abgabe_aj.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/gesamt_arm/codea_abgabe_ak.0 b/gesamt_arm/codea_abgabe_ak.0
new file mode 100644 (file)
index 0000000..e28cfcd
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return 3=x;
+end;
diff --git a/gesamt_arm/codea_abgabe_ak.call b/gesamt_arm/codea_abgabe_ak.call
new file mode 100644 (file)
index 0000000..471bd6a
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(0,3)==1 && m(9,13)==0);
diff --git a/gesamt_arm/codea_abgabe_ak.instr b/gesamt_arm/codea_abgabe_ak.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/gesamt_arm/codea_abgabe_al.0 b/gesamt_arm/codea_abgabe_al.0
new file mode 100644 (file)
index 0000000..950703a
--- /dev/null
@@ -0,0 +1,6 @@
+struct a b c end;
+struct d e f end;
+
+method m(x)
+  return e;
+end;
diff --git a/gesamt_arm/codea_abgabe_al.call b/gesamt_arm/codea_abgabe_al.call
new file mode 100644 (file)
index 0000000..d1c4997
--- /dev/null
@@ -0,0 +1,3 @@
+long s[]={12,23,34,45,53,61};
+extern long m(long *,long);
+RET(m(s,12)==23 && m(s+3,13)==53);
diff --git a/gesamt_arm/codea_abgabe_al.instr b/gesamt_arm/codea_abgabe_al.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_am.0 b/gesamt_arm/codea_abgabe_am.0
new file mode 100644 (file)
index 0000000..786ebbe
--- /dev/null
@@ -0,0 +1,6 @@
+struct a b c end;
+struct d e f end;
+
+method m(x)
+  return x.c.d;
+end;
diff --git a/gesamt_arm/codea_abgabe_am.call b/gesamt_arm/codea_abgabe_am.call
new file mode 100644 (file)
index 0000000..29212fc
--- /dev/null
@@ -0,0 +1,4 @@
+long s[]={12,23,34,45,53,61};
+long *t[]={s,s+2,s+1,s+3};
+extern long m(long,long **);
+RET(m(1,t)==23 && m(9,t+1)==45);
diff --git a/gesamt_arm/codea_abgabe_am.instr b/gesamt_arm/codea_abgabe_am.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/gesamt_arm/codea_abgabe_an.0 b/gesamt_arm/codea_abgabe_an.0
new file mode 100644 (file)
index 0000000..e1e8850
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return not((not this) or (not x));
+end;
diff --git a/gesamt_arm/codea_abgabe_an.call b/gesamt_arm/codea_abgabe_an.call
new file mode 100644 (file)
index 0000000..4399cdd
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(10,6)==1 && m(0,13)==0 && m(-3,0)==0);
diff --git a/gesamt_arm/codea_abgabe_an.instr b/gesamt_arm/codea_abgabe_an.instr
new file mode 100644 (file)
index 0000000..64bb6b7
--- /dev/null
@@ -0,0 +1 @@
+30
diff --git a/gesamt_arm/codea_abgabe_ao.0 b/gesamt_arm/codea_abgabe_ao.0
new file mode 100644 (file)
index 0000000..f003ce5
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return x-(0-this);
+end;
diff --git a/gesamt_arm/codea_abgabe_ao.call b/gesamt_arm/codea_abgabe_ao.call
new file mode 100644 (file)
index 0000000..42a7da4
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(3,4)==7 && m(-3,5)==2);
diff --git a/gesamt_arm/codea_abgabe_ao.instr b/gesamt_arm/codea_abgabe_ao.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/gesamt_arm/codea_abgabe_ap.0 b/gesamt_arm/codea_abgabe_ap.0
new file mode 100644 (file)
index 0000000..bdee923
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return 5 or x or 9;
+end;
diff --git a/gesamt_arm/codea_abgabe_ap.call b/gesamt_arm/codea_abgabe_ap.call
new file mode 100644 (file)
index 0000000..bb07853
--- /dev/null
@@ -0,0 +1,2 @@
+extern long m(long,long);
+RET(m(3,6)==15 && m(-3,5)==13);
diff --git a/gesamt_arm/codea_abgabe_ap.instr b/gesamt_arm/codea_abgabe_ap.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/gesamt_arm/codea_abgabe_aq.0 b/gesamt_arm/codea_abgabe_aq.0
new file mode 100644 (file)
index 0000000..f41a469
--- /dev/null
@@ -0,0 +1,5 @@
+struct a b c end;
+
+method m(x)
+  return (this-4).c;
+end;
diff --git a/gesamt_arm/codea_abgabe_aq.call b/gesamt_arm/codea_abgabe_aq.call
new file mode 100644 (file)
index 0000000..bbbc716
--- /dev/null
@@ -0,0 +1,3 @@
+long s[]={12,23,34,45,53,61};
+extern long m(long *,long);
+RET(m(s,12)==23 && m(s+2,13)==45);
diff --git a/gesamt_arm/codea_abgabe_aq.instr b/gesamt_arm/codea_abgabe_aq.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_ar.0 b/gesamt_arm/codea_abgabe_ar.0
new file mode 100644 (file)
index 0000000..a474c48
--- /dev/null
@@ -0,0 +1,7 @@
+method m(x y)
+  return y;
+end;
+
+method n(y x)
+  return y;
+end;
diff --git a/gesamt_arm/codea_abgabe_ar.call b/gesamt_arm/codea_abgabe_ar.call
new file mode 100644 (file)
index 0000000..793d7a1
--- /dev/null
@@ -0,0 +1,3 @@
+extern long m(long,long,long);
+extern long n(long,long,long);
+RET(m(1,2,3)==3 && n(4,5,6)==5);
diff --git a/gesamt_arm/codea_abgabe_ar.instr b/gesamt_arm/codea_abgabe_ar.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/gesamt_arm/codea_abgabe_as.0 b/gesamt_arm/codea_abgabe_as.0
new file mode 100644 (file)
index 0000000..785163c
--- /dev/null
@@ -0,0 +1,5 @@
+struct x end;
+
+method m(x)
+  return x;
+end;
diff --git a/gesamt_arm/codea_abgabe_as.call b/gesamt_arm/codea_abgabe_as.call
new file mode 100644 (file)
index 0000000..eca460b
--- /dev/null
@@ -0,0 +1,3 @@
+long s[]={12,23,34,45,53,61};
+extern long m(long *,long);
+RET(m(s,78)==78 && m(s+2,13)==13);
diff --git a/gesamt_arm/codea_abgabe_as.instr b/gesamt_arm/codea_abgabe_as.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
index 42839f6951e9d556e37d615c1b968800e8ffaef1..6174ec7e95b19b066f95ad001d527e12575cb828 100644 (file)
Binary files a/scripts/callingconvention.o and b/scripts/callingconvention.o differ
diff --git a/scripts/modlvatest_gesamt_arm.sh b/scripts/modlvatest_gesamt_arm.sh
new file mode 100755 (executable)
index 0000000..c511e6c
--- /dev/null
@@ -0,0 +1,152 @@
+#! /bin/bash
+
+beispiel=gesamt_arm
+PROGRAM=./$beispiel
+
+errnum=0
+prgnum=0
+
+LOC=~/test/scripts/
+#LOC=/usr/ftp/pub/ubvl/test/$beispiel
+LOC2=~/test/$beispiel
+
+#/usr/ftp/pub/ublu/test/accounttest || exit 1
+allow_null_glob_expansion=1
+
+if [ ! -d ~/abgabe/$beispiel ]; then
+  echo "Fehler: Verzeichnis ~/abgabe/$beispiel existiert nicht."
+  exit 1
+else
+  cd ~/abgabe/$beispiel
+  echo 'Teste "make clean"'
+  make clean
+  #/usr/ftp/pub/ubvl/test/cleantest
+  echo 'Teste "make"'
+  make
+fi
+
+if test ! -x $PROGRAM
+then
+       echo "Fehler: Kein Programm $PROGRAM"
+       exit 1
+fi
+let prgnum=0
+for i in $LOC/*.0 $LOC2/*.0
+do
+       if [ -f $i ]; then
+           let prgnum=prgnum+1
+           let errorfound=0
+           echo "==========> Eingabe von $i:"
+           cat $i
+           echo
+           RESFILE=test${beispiel}out$$
+           $PROGRAM <$i >$RESFILE
+           retval=$?
+           echo -n "Übersetzung: "
+           if test $retval -eq 0
+           then
+                   echo "Status korrekt"
+           else
+                   echo "[Errot] Status=$retval. Erwartet: 0"
+                   let errorfound=1
+           fi
+           echo
+           echo "Ausgabe:"
+               #if [ -f ~/test/scripts/clr.py ]; then
+               #       cat $RESFILE | ~/test/scripts/clr.py
+               #else
+                       cat $RESFILE
+               #fi
+           mv -f $RESFILE $RESFILE.s
+           CALLFILE=${i%.*}.call
+           echo
+           if [ ! -f $CALLFILE ]; then
+               echo "Fehler: Datei $CALLFILE existiert nicht, kann Code nicht ausführen..."
+               exit 1
+           else
+               echo "Übersetze und linke das Testprogramm:"
+               if cc -g -I. -DCALL=\"$CALLFILE\" $LOC/testmain.c $LOC/callingconvention.o $RESFILE.s; then
+                   echo
+                   echo "Rufe folgendes Codefragment auf:"
+                   cat $CALLFILE
+                   echo
+                   ./a.out 
+                   retval=$?
+                   # test callee saved registers
+                   if [ "$retval" -ge 12 ] && [ "$retval" -le 15 ]; then
+                       echo "[Error] Callee-saved register %r$retval modified."
+                        let errorfound=1
+                   elif [ "$retval" -eq 11 ]; then
+                       echo "[Error] Callee-saved register %rbx modified."
+                        let errorfound=1
+                   elif [ "$retval" -eq 16 ]; then
+                       echo "[Error] Callee-saved register %rbp modified."
+                        let errorfound=1
+                   elif [ "$retval" -eq 30 ]; then
+                       echo "[Error] Stack pointer %rsp modified."
+                        let errorfound=1
+                    else
+                        # test signals  
+                       test $retval -gt 127
+                       retsig=$?
+                       test ${i##*.} = xin
+                       expsig=$?
+                       if test $retsig -eq $expsig; then
+                           if test $retval -eq 1; then
+                               echo "[Error] Das Ergebnis des Aufrufs ist falsch."
+                               let errorfound=1
+                           elif test $retval -eq 0; then
+                               echo "Das Ergebnis des Ausdrucks ist korrekt."
+                           else
+                               echo "[Error] Erzeugter Code verhaelt sich bzgl. Signalerzeugung anders als erwartet."
+                               let errorfound=1
+                           fi
+                       else
+                           echo "[Error] Erzeugter Code verhaelt sich bezueglich Signalerzeugung anders als erwartet."
+                           let errorfound=1
+                           echo "Rueckgabewert = $retval";
+                       fi
+                   fi
+                   echo
+               else
+                   echo "[Error] Erzeugter Code konnte nicht assembliert und gelinkt werden."
+                   let errorfound=1
+               fi
+           fi
+           let errnum=errnum+errorfound
+               if [ 1 -eq $errorfound ]; then
+                       rm *.s
+                       rm *.out
+                       exit 3;
+               fi
+           rm -f a.out $RESFILE $RESFILE.s
+       fi
+done
+
+for i in $LOC/*.[123] $LOC2/*.[123]
+do
+       if [ -f $i ]; then
+       let prgnum=prgnum+1
+       echo "==========> Eingabe von $i:"
+       cat $i
+       echo
+       echo "Ausgabe:"
+       $PROGRAM <$i
+       retval=$?
+       if test $retval -eq ${i#*.}
+       then
+               echo "Status: korrekt"
+       else
+               echo "[Error] Status: $retval. Erwartet: ${i#*.}"
+               let errnum=errnum+1
+               exit 3;
+       fi
+       echo
+fi
+done
+let corrnum=prgnum-errnum
+echo "Statistics: "
+echo "==========="
+echo "           $prgnum Tests total"
+echo "           $corrnum Tests passed"
+echo "           $errnum Tests failed"