Merge branch 'master' of git://github.com/skinner33/testub10
authorBernhard Urban <lewurm@gmail.com>
Wed, 19 May 2010 20:38:11 +0000 (22:38 +0200)
committerBernhard Urban <lewurm@gmail.com>
Wed, 19 May 2010 20:38:11 +0000 (22:38 +0200)
261 files changed:
codeb/codea_ag_abgabe_x0.1 [new file with mode: 0644]
codeb/codea_ag_abgabe_x1.1 [new file with mode: 0644]
codeb/codea_ag_abgabe_x2.1 [new file with mode: 0644]
codeb/codea_ag_abgabe_x3.1 [new file with mode: 0644]
codeb/codea_ag_abgabe_y0.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y1.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y2.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y3.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y4.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y5.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y6.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y7.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y8.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_y9.2 [new file with mode: 0644]
codeb/codea_ag_abgabe_z0.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_za.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zb.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zc.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zd.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_ze.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zf.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zg.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zh.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zi.3 [new file with mode: 0644]
codeb/codea_ag_abgabe_zj.3 [new file with mode: 0644]
codeb/codea_ag_adrixan_00.3 [new file with mode: 0644]
codeb/codea_ag_bschussek_00.3 [new file with mode: 0644]
codeb/codea_ag_bschussek_01.3 [new file with mode: 0644]
codeb/codea_ag_fieselschweif_00.3 [new file with mode: 0644]
codeb/codea_ag_fieselschweif_01.3 [new file with mode: 0644]
codeb/codea_ag_fieselschweif_02.3 [new file with mode: 0644]
codeb/codea_ag_lewurm_00.3 [new file with mode: 0644]
codeb/codea_ag_lewurm_01.3 [new file with mode: 0644]
codeb/codea_ag_lewurm_02.3 [new file with mode: 0644]
codeb/codea_ag_lewurm_06.3 [new file with mode: 0644]
codeb/codea_ag_nax_03.2 [new file with mode: 0644]
codeb/codea_ag_nax_05.2 [new file with mode: 0644]
codeb/codea_ag_nax_09.3 [new file with mode: 0644]
codeb/codea_ag_nax_12.3 [new file with mode: 0644]
codeb/codea_ag_nax_14.3 [new file with mode: 0644]
codeb/codea_ag_snafu_01.3 [new file with mode: 0644]
codeb/codea_ag_snafu_02.3 [new file with mode: 0644]
codeb/codea_ag_snafu_03.3 [new file with mode: 0644]
codeb/codea_ag_snafu_04.3 [new file with mode: 0644]
codeb/codea_ag_snafu_06.3 [new file with mode: 0644]
codeb/codea_ag_snafu_07.3 [new file with mode: 0644]
codeb/codea_ag_snafu_10.3 [new file with mode: 0644]
codeb/codea_ag_snafu_11.3 [new file with mode: 0644]
codeb/codea_ag_torotil_01.3 [new file with mode: 0644]
codeb/codea_ag_zzbsm17_01.3 [new file with mode: 0644]
codeb/codea_ag_zzbsm17_02.3 [new file with mode: 0644]
codeb/codea_ag_zzbsm17_03.3 [new file with mode: 0644]
codeb/codea_ag_zzbsm17_04.3 [new file with mode: 0644]
codeb/codea_ag_zzbsm17_06.3 [new file with mode: 0644]
codeb/codea_intelli_00.0 [new file with mode: 0644]
codeb/codea_intelli_00.call [new file with mode: 0644]
codeb/codea_intelli_00.instr [new file with mode: 0644]
codeb/codea_intelli_01.0 [new file with mode: 0644]
codeb/codea_intelli_01.call [new file with mode: 0644]
codeb/codea_intelli_01.instr [new file with mode: 0644]
codeb/codea_intelli_02.0 [new file with mode: 0644]
codeb/codea_intelli_02.call [new file with mode: 0644]
codeb/codea_intelli_02.instr [new file with mode: 0644]
codeb/codea_intelli_03.0 [new file with mode: 0644]
codeb/codea_intelli_03.call [new file with mode: 0644]
codeb/codea_intelli_03.instr [new file with mode: 0644]
codeb/codea_intelli_04.0 [new file with mode: 0644]
codeb/codea_intelli_04.call [new file with mode: 0644]
codeb/codea_intelli_04.instr [new file with mode: 0644]
codeb/codea_intelli_05.0 [new file with mode: 0644]
codeb/codea_intelli_05.call [new file with mode: 0644]
codeb/codea_intelli_05.instr [new file with mode: 0644]
codeb/codea_intelli_06.0 [new file with mode: 0644]
codeb/codea_intelli_06.call [new file with mode: 0644]
codeb/codea_intelli_06.instr [new file with mode: 0644]
codeb/codea_intelli_07.0 [new file with mode: 0644]
codeb/codea_intelli_07.call [new file with mode: 0644]
codeb/codea_intelli_07.instr [new file with mode: 0644]
codeb/codea_intelli_08.0 [new file with mode: 0644]
codeb/codea_intelli_08.call [new file with mode: 0644]
codeb/codea_intelli_08.instr [new file with mode: 0644]
codeb/codea_lewurm_00.0 [new file with mode: 0644]
codeb/codea_lewurm_00.call [new file with mode: 0644]
codeb/codea_lewurm_00.instr [new file with mode: 0644]
codeb/codea_lewurm_01.0 [new file with mode: 0644]
codeb/codea_lewurm_01.call [new file with mode: 0644]
codeb/codea_lewurm_01.instr [new file with mode: 0644]
codeb/codea_lewurm_02.0 [new file with mode: 0644]
codeb/codea_lewurm_02.call [new file with mode: 0644]
codeb/codea_lewurm_02.instr [new file with mode: 0644]
codeb/codea_lewurm_03.0 [new file with mode: 0644]
codeb/codea_lewurm_03.call [new file with mode: 0644]
codeb/codea_lewurm_03.instr [new file with mode: 0644]
codeb/codea_lewurm_04.0 [new file with mode: 0644]
codeb/codea_lewurm_04.call [new file with mode: 0644]
codeb/codea_lewurm_04.instr [new file with mode: 0644]
codeb/codea_lewurm_05.0 [new file with mode: 0644]
codeb/codea_lewurm_05.call [new file with mode: 0644]
codeb/codea_lewurm_05.instr [new file with mode: 0644]
codeb/codea_lewurm_06.0 [new file with mode: 0644]
codeb/codea_lewurm_06.call [new file with mode: 0644]
codeb/codea_lewurm_06.instr [new file with mode: 0644]
codeb/codea_lewurm_07.0 [new file with mode: 0644]
codeb/codea_lewurm_07.call [new file with mode: 0644]
codeb/codea_lewurm_07.instr [new file with mode: 0644]
codeb/codea_lewurm_08.0 [new file with mode: 0644]
codeb/codea_lewurm_08.call [new file with mode: 0644]
codeb/codea_lewurm_08.instr [new file with mode: 0644]
codeb/codea_lewurm_09.0 [new file with mode: 0644]
codeb/codea_lewurm_09.call [new file with mode: 0644]
codeb/codea_lewurm_09.instr [new file with mode: 0644]
codeb/codea_lewurm_10.0 [new file with mode: 0644]
codeb/codea_lewurm_10.call [new file with mode: 0644]
codeb/codea_lewurm_10.instr [new file with mode: 0644]
codeb/codea_lewurm_11.0 [new file with mode: 0644]
codeb/codea_lewurm_11.call [new file with mode: 0644]
codeb/codea_lewurm_11.instr [new file with mode: 0644]
codeb/codea_lewurm_12.0 [new file with mode: 0644]
codeb/codea_lewurm_12.call [new file with mode: 0644]
codeb/codea_lewurm_12.instr [new file with mode: 0644]
codeb/codea_lewurm_13.0 [new file with mode: 0644]
codeb/codea_lewurm_13.call [new file with mode: 0644]
codeb/codea_lewurm_13.instr [new file with mode: 0644]
codeb/codea_lewurm_14.0 [new file with mode: 0644]
codeb/codea_lewurm_14.call [new file with mode: 0644]
codeb/codea_lewurm_14.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_00.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_00.call [new file with mode: 0644]
codeb/codea_mrstrcmp_00.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_01.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_01.call [new file with mode: 0644]
codeb/codea_mrstrcmp_01.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_02.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_02.call [new file with mode: 0644]
codeb/codea_mrstrcmp_02.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_03.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_03.call [new file with mode: 0644]
codeb/codea_mrstrcmp_03.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_04.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_04.call [new file with mode: 0644]
codeb/codea_mrstrcmp_04.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_05.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_05.call [new file with mode: 0644]
codeb/codea_mrstrcmp_05.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_06.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_06.call [new file with mode: 0644]
codeb/codea_mrstrcmp_06.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_07.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_07.call [new file with mode: 0644]
codeb/codea_mrstrcmp_07.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_08.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_08.call [new file with mode: 0644]
codeb/codea_mrstrcmp_08.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_09.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_09.call [new file with mode: 0644]
codeb/codea_mrstrcmp_09.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_10.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_10.call [new file with mode: 0644]
codeb/codea_mrstrcmp_10.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_11.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_11.call [new file with mode: 0644]
codeb/codea_mrstrcmp_11.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_12.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_12.call [new file with mode: 0644]
codeb/codea_mrstrcmp_12.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_13.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_13.call [new file with mode: 0644]
codeb/codea_mrstrcmp_13.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_14.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_14.call [new file with mode: 0644]
codeb/codea_mrstrcmp_14.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_15.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_15.call [new file with mode: 0644]
codeb/codea_mrstrcmp_15.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_16.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_16.call [new file with mode: 0644]
codeb/codea_mrstrcmp_16.instr [new file with mode: 0644]
codeb/codea_mrstrcmp_17.0 [new file with mode: 0644]
codeb/codea_mrstrcmp_17.call [new file with mode: 0644]
codeb/codea_mrstrcmp_17.instr [new file with mode: 0644]
codeb/codea_skinner33_00.0 [new file with mode: 0644]
codeb/codea_skinner33_00.call [new file with mode: 0644]
codeb/codea_skinner33_00.instr [new file with mode: 0644]
codeb/codea_skinner33_01.0 [new file with mode: 0644]
codeb/codea_skinner33_01.call [new file with mode: 0644]
codeb/codea_skinner33_01.instr [new file with mode: 0644]
codeb/codea_skinner33_02.0 [new file with mode: 0644]
codeb/codea_skinner33_02.call [new file with mode: 0644]
codeb/codea_skinner33_02.instr [new file with mode: 0644]
codeb/codea_skinner33_03.0 [new file with mode: 0644]
codeb/codea_skinner33_03.call [new file with mode: 0644]
codeb/codea_skinner33_03.instr [new file with mode: 0644]
codeb/codea_skinner33_04.0 [new file with mode: 0644]
codeb/codea_skinner33_04.call [new file with mode: 0644]
codeb/codea_skinner33_04.instr [new file with mode: 0644]
codeb/codea_skinner33_05.0 [new file with mode: 0644]
codeb/codea_skinner33_05.call [new file with mode: 0644]
codeb/codea_skinner33_05.instr [new file with mode: 0644]
codeb/codea_skinner33_06.0 [new file with mode: 0644]
codeb/codea_skinner33_06.call [new file with mode: 0644]
codeb/codea_skinner33_06.instr [new file with mode: 0644]
codeb/codea_skinner33_07.0 [new file with mode: 0644]
codeb/codea_skinner33_07.call [new file with mode: 0644]
codeb/codea_skinner33_07.instr [new file with mode: 0644]
codeb/codea_skinner33_08.0 [new file with mode: 0644]
codeb/codea_skinner33_08.call [new file with mode: 0644]
codeb/codea_skinner33_08.instr [new file with mode: 0644]
codeb/codea_skinner33_09.0 [new file with mode: 0644]
codeb/codea_skinner33_09.call [new file with mode: 0644]
codeb/codea_skinner33_09.instr [new file with mode: 0644]
codeb/codea_skinner33_10.0 [new file with mode: 0644]
codeb/codea_skinner33_10.call [new file with mode: 0644]
codeb/codea_skinner33_10.instr [new file with mode: 0644]
codeb/codea_skinner33_11.0 [new file with mode: 0644]
codeb/codea_skinner33_11.call [new file with mode: 0644]
codeb/codea_skinner33_11.instr [new file with mode: 0644]
codeb/codea_skinner33_12.0 [new file with mode: 0644]
codeb/codea_skinner33_12.call [new file with mode: 0644]
codeb/codea_skinner33_12.instr [new file with mode: 0644]
codeb/codea_skinner33_13.0 [new file with mode: 0644]
codeb/codea_skinner33_13.call [new file with mode: 0644]
codeb/codea_skinner33_13.instr [new file with mode: 0644]
codeb/codea_skinner33_14.0 [new file with mode: 0644]
codeb/codea_skinner33_14.call [new file with mode: 0644]
codeb/codea_skinner33_14.instr [new file with mode: 0644]
codeb/codea_skinner33_15.0 [new file with mode: 0644]
codeb/codea_skinner33_15.call [new file with mode: 0644]
codeb/codea_skinner33_15.instr [new file with mode: 0644]
codeb/codea_skinner33_16.0 [new file with mode: 0644]
codeb/codea_skinner33_16.call [new file with mode: 0644]
codeb/codea_skinner33_16.instr [new file with mode: 0644]
codeb/codea_skinner33_17.0 [new file with mode: 0644]
codeb/codea_skinner33_17.call [new file with mode: 0644]
codeb/codea_skinner33_17.instr [new file with mode: 0644]
codeb/codea_skinner33_18.0 [new file with mode: 0644]
codeb/codea_skinner33_18.call [new file with mode: 0644]
codeb/codea_skinner33_18.instr [new file with mode: 0644]
codeb/codea_skinner33_19.0 [new file with mode: 0644]
codeb/codea_skinner33_19.call [new file with mode: 0644]
codeb/codea_skinner33_19.instr [new file with mode: 0644]
codeb/codea_snafu_00.0 [new file with mode: 0644]
codeb/codea_snafu_00.call [new file with mode: 0644]
codeb/codea_snafu_00.instr [new file with mode: 0644]
codeb/codea_snafu_01.0 [new file with mode: 0644]
codeb/codea_snafu_01.call [new file with mode: 0644]
codeb/codea_snafu_01.instr [new file with mode: 0644]
codeb/codea_snafu_02.0 [new file with mode: 0644]
codeb/codea_snafu_02.call [new file with mode: 0644]
codeb/codea_snafu_02.instr [new file with mode: 0644]
codeb/codea_snafu_03.0 [new file with mode: 0644]
codeb/codea_snafu_03.call [new file with mode: 0644]
codeb/codea_snafu_03.instr [new file with mode: 0644]
codeb/codea_snafu_04.0 [new file with mode: 0644]
codeb/codea_snafu_04.call [new file with mode: 0644]
codeb/codea_snafu_04.instr [new file with mode: 0644]
codeb/codea_snafu_05.0 [new file with mode: 0644]
codeb/codea_snafu_05.call [new file with mode: 0644]
codeb/codea_snafu_05.instr [new file with mode: 0644]
codeb/codea_snafu_06.0 [new file with mode: 0644]
codeb/codea_snafu_06.call [new file with mode: 0644]
codeb/codea_snafu_06.instr [new file with mode: 0644]

diff --git a/codeb/codea_ag_abgabe_x0.1 b/codeb/codea_ag_abgabe_x0.1
new file mode 100644 (file)
index 0000000..397db75
--- /dev/null
@@ -0,0 +1 @@
+:
diff --git a/codeb/codea_ag_abgabe_x1.1 b/codeb/codea_ag_abgabe_x1.1
new file mode 100644 (file)
index 0000000..314d73b
--- /dev/null
@@ -0,0 +1 @@
+%
diff --git a/codeb/codea_ag_abgabe_x2.1 b/codeb/codea_ag_abgabe_x2.1
new file mode 100644 (file)
index 0000000..e931977
--- /dev/null
@@ -0,0 +1 @@
+/* unvollendet
diff --git a/codeb/codea_ag_abgabe_x3.1 b/codeb/codea_ag_abgabe_x3.1
new file mode 100644 (file)
index 0000000..5242dd2
--- /dev/null
@@ -0,0 +1 @@
+: =
diff --git a/codeb/codea_ag_abgabe_y0.2 b/codeb/codea_ag_abgabe_y0.2
new file mode 100644 (file)
index 0000000..1a59e1e
--- /dev/null
@@ -0,0 +1,2 @@
+method foo(x,y)
+end;
diff --git a/codeb/codea_ag_abgabe_y1.2 b/codeb/codea_ag_abgabe_y1.2
new file mode 100644 (file)
index 0000000..47588a5
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  this:=x;
+end;
diff --git a/codeb/codea_ag_abgabe_y2.2 b/codeb/codea_ag_abgabe_y2.2
new file mode 100644 (file)
index 0000000..2d17a51
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  x:=x-x*x;
+end;
diff --git a/codeb/codea_ag_abgabe_y3.2 b/codeb/codea_ag_abgabe_y3.2
new file mode 100644 (file)
index 0000000..9055bd9
--- /dev/null
@@ -0,0 +1,4 @@
+method x()
+  if x<x or x=x then
+  end;
+end;
diff --git a/codeb/codea_ag_abgabe_y4.2 b/codeb/codea_ag_abgabe_y4.2
new file mode 100644 (file)
index 0000000..f557d66
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  x := x < x < x;
+end;
diff --git a/codeb/codea_ag_abgabe_y5.2 b/codeb/codea_ag_abgabe_y5.2
new file mode 100644 (file)
index 0000000..e310325
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  x:=x(,x);
+end;
diff --git a/codeb/codea_ag_abgabe_y6.2 b/codeb/codea_ag_abgabe_y6.2
new file mode 100644 (file)
index 0000000..aeefe39
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  var x.x:=x;
+end;
diff --git a/codeb/codea_ag_abgabe_y7.2 b/codeb/codea_ag_abgabe_y7.2
new file mode 100644 (file)
index 0000000..90dc0fc
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  ;
+end;
diff --git a/codeb/codea_ag_abgabe_y8.2 b/codeb/codea_ag_abgabe_y8.2
new file mode 100644 (file)
index 0000000..81fc2fd
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  x(x,,);
+end;
diff --git a/codeb/codea_ag_abgabe_y9.2 b/codeb/codea_ag_abgabe_y9.2
new file mode 100644 (file)
index 0000000..4860d8f
--- /dev/null
@@ -0,0 +1,3 @@
+method x()
+  x.this = x;
+end;
diff --git a/codeb/codea_ag_abgabe_z0.3 b/codeb/codea_ag_abgabe_z0.3
new file mode 100644 (file)
index 0000000..fd683e3
--- /dev/null
@@ -0,0 +1,3 @@
+method m()
+  return x;
+end;
diff --git a/codeb/codea_ag_abgabe_za.3 b/codeb/codea_ag_abgabe_za.3
new file mode 100644 (file)
index 0000000..2c63ceb
--- /dev/null
@@ -0,0 +1,2 @@
+method m(x x)
+end;
diff --git a/codeb/codea_ag_abgabe_zb.3 b/codeb/codea_ag_abgabe_zb.3
new file mode 100644 (file)
index 0000000..89447ea
--- /dev/null
@@ -0,0 +1,5 @@
+method m(x)
+  if x then
+    var x:=0;
+  end;
+end;
diff --git a/codeb/codea_ag_abgabe_zc.3 b/codeb/codea_ag_abgabe_zc.3
new file mode 100644 (file)
index 0000000..62b6d5c
--- /dev/null
@@ -0,0 +1,10 @@
+method m()
+  while this do
+    var x:=this;
+    if this then
+    else
+      var x:=this;
+    end;
+  end;
+end;
+
diff --git a/codeb/codea_ag_abgabe_zd.3 b/codeb/codea_ag_abgabe_zd.3
new file mode 100644 (file)
index 0000000..0a7b327
--- /dev/null
@@ -0,0 +1,4 @@
+struct
+  a
+  a
+end;
diff --git a/codeb/codea_ag_abgabe_ze.3 b/codeb/codea_ag_abgabe_ze.3
new file mode 100644 (file)
index 0000000..5a33a8b
--- /dev/null
@@ -0,0 +1,7 @@
+struct
+  a
+end;
+
+struct
+  a
+end;
diff --git a/codeb/codea_ag_abgabe_zf.3 b/codeb/codea_ag_abgabe_zf.3
new file mode 100644 (file)
index 0000000..b98f794
--- /dev/null
@@ -0,0 +1,7 @@
+method m()
+  if this then
+    var x:=this;
+  else
+    return x;
+  end;
+end;
diff --git a/codeb/codea_ag_abgabe_zg.3 b/codeb/codea_ag_abgabe_zg.3
new file mode 100644 (file)
index 0000000..16c09e1
--- /dev/null
@@ -0,0 +1,4 @@
+method m()
+  x:=this;
+  var x:=0;
+end;
diff --git a/codeb/codea_ag_abgabe_zh.3 b/codeb/codea_ag_abgabe_zh.3
new file mode 100644 (file)
index 0000000..d5109fc
--- /dev/null
@@ -0,0 +1,7 @@
+method m()
+  a:=this;
+end;
+
+struct
+  a
+end;
diff --git a/codeb/codea_ag_abgabe_zi.3 b/codeb/codea_ag_abgabe_zi.3
new file mode 100644 (file)
index 0000000..e78de1a
--- /dev/null
@@ -0,0 +1,3 @@
+method m()
+  var x:=x;
+end;
diff --git a/codeb/codea_ag_abgabe_zj.3 b/codeb/codea_ag_abgabe_zj.3
new file mode 100644 (file)
index 0000000..1ce58c2
--- /dev/null
@@ -0,0 +1,3 @@
+method m(x)
+  return this.x;
+end;
diff --git a/codeb/codea_ag_adrixan_00.3 b/codeb/codea_ag_adrixan_00.3
new file mode 100644 (file)
index 0000000..d38991d
--- /dev/null
@@ -0,0 +1,10 @@
+struct a d end;
+method f(b c s)
+       var t := 0;
+       /* lesender feldzugriff */
+       b := c*(s.a - 1);
+       b := c*(s.d - 1);
+       b := c*(t.a - 1);
+       /* Zusatz zu lewurm_05.0: ungültig, da c keine Feldvariable ist */
+       b := c*(t.c - 1);
+end;
diff --git a/codeb/codea_ag_bschussek_00.3 b/codeb/codea_ag_bschussek_00.3
new file mode 100644 (file)
index 0000000..fc50d8c
--- /dev/null
@@ -0,0 +1,5 @@
+method test(arg1)
+    arg1.a := 10; /* undefined field */
+end;
+
+struct a end;
diff --git a/codeb/codea_ag_bschussek_01.3 b/codeb/codea_ag_bschussek_01.3
new file mode 100644 (file)
index 0000000..86b8caa
--- /dev/null
@@ -0,0 +1,5 @@
+method test(arg1)
+       var b := arg1.a; /* undefined field */
+end;
+
+struct a end;
diff --git a/codeb/codea_ag_fieselschweif_00.3 b/codeb/codea_ag_fieselschweif_00.3
new file mode 100644 (file)
index 0000000..63e264b
--- /dev/null
@@ -0,0 +1,5 @@
+/* multiple field definition on "doubletrouble" here */
+struct doubletrouble foo end;
+method test(a b c)
+end;
+struct bar doubletrouble end;
diff --git a/codeb/codea_ag_fieselschweif_01.3 b/codeb/codea_ag_fieselschweif_01.3
new file mode 100644 (file)
index 0000000..2c126cf
--- /dev/null
@@ -0,0 +1,3 @@
+/* multiple variable definition in param list */
+method test(a b c a)
+end;
diff --git a/codeb/codea_ag_fieselschweif_02.3 b/codeb/codea_ag_fieselschweif_02.3
new file mode 100644 (file)
index 0000000..8b0c25d
--- /dev/null
@@ -0,0 +1,6 @@
+/* fieldnames are NOT visible everywhere, but only after their definition */
+method foobar(a)
+       a.youdontseemeyet := 31337;
+end;
+
+struct youdontseemeyet end;
diff --git a/codeb/codea_ag_lewurm_00.3 b/codeb/codea_ag_lewurm_00.3
new file mode 100644 (file)
index 0000000..25e8e2f
--- /dev/null
@@ -0,0 +1,6 @@
+method f(a b c)
+       /* x nicht deklariert */
+       if a < x then
+               c := 0x1;
+       end;
+end;
diff --git a/codeb/codea_ag_lewurm_01.3 b/codeb/codea_ag_lewurm_01.3
new file mode 100644 (file)
index 0000000..eda05e0
--- /dev/null
@@ -0,0 +1,8 @@
+method f(a b c)
+       if a < b then
+               var x := 0;
+               c := 1;
+       end;
+       /* x ist nicht im scope */
+       x := x - 1;
+end;
diff --git a/codeb/codea_ag_lewurm_02.3 b/codeb/codea_ag_lewurm_02.3
new file mode 100644 (file)
index 0000000..c5fc09a
--- /dev/null
@@ -0,0 +1,4 @@
+method f(a b c)
+       /* x ist (noch) nicht im scope */
+       var x := x - 1;
+end;
diff --git a/codeb/codea_ag_lewurm_06.3 b/codeb/codea_ag_lewurm_06.3
new file mode 100644 (file)
index 0000000..2b44db2
--- /dev/null
@@ -0,0 +1,5 @@
+method f(b)
+       var t := 0;
+       /* identifier doppelt vorhanden */
+       var b := 0;
+end;
diff --git a/codeb/codea_ag_nax_03.2 b/codeb/codea_ag_nax_03.2
new file mode 100644 (file)
index 0000000..9a78b21
--- /dev/null
@@ -0,0 +1,2 @@
+struct mystruct
+end
diff --git a/codeb/codea_ag_nax_05.2 b/codeb/codea_ag_nax_05.2
new file mode 100644 (file)
index 0000000..fc6fb9e
--- /dev/null
@@ -0,0 +1,3 @@
+method testit()
+    var b := 10 - d * 20;       /* should raise an error, since '(' ')' are missing */
+end;
diff --git a/codeb/codea_ag_nax_09.3 b/codeb/codea_ag_nax_09.3
new file mode 100644 (file)
index 0000000..f78e9ec
--- /dev/null
@@ -0,0 +1,7 @@
+method abc(arg1 arg2)
+    if arg1 = arg2 then
+        var a := 42;
+    end;
+    
+    var b := a - -1;
+end;
diff --git a/codeb/codea_ag_nax_12.3 b/codeb/codea_ag_nax_12.3
new file mode 100644 (file)
index 0000000..4ee7a1b
--- /dev/null
@@ -0,0 +1,6 @@
+struct a b c end;
+method test(arg1 arg2)
+    arg1.a := 10;
+end;
+
+struct c d e end;
diff --git a/codeb/codea_ag_nax_14.3 b/codeb/codea_ag_nax_14.3
new file mode 100644 (file)
index 0000000..7174855
--- /dev/null
@@ -0,0 +1,3 @@
+method abc(arg1 arg2)
+    var arg2 := 10; /* detect duplicates and fail */
+end;
diff --git a/codeb/codea_ag_snafu_01.3 b/codeb/codea_ag_snafu_01.3
new file mode 100644 (file)
index 0000000..17ab765
--- /dev/null
@@ -0,0 +1,32 @@
+struct
+       a b c
+end;
+
+method bar(d e f)
+       var foo := a;
+       foo := b - c;
+       var bar := d - (e * f);
+       
+       if(4 = 2) then
+               var x := 1;
+               var hiho := 0;
+       else
+               var hiho := 0x1f;
+       end;
+
+       var hiho := 2;
+
+       while 0 < hiho do
+               if (42) then
+                       var hiho := 0xff; /* hiho existiert bereits */
+                       hiho := hiho - 1;
+               end;
+       end;
+       
+       return 0;
+end;
+
+struct
+       g
+       h
+end;
diff --git a/codeb/codea_ag_snafu_02.3 b/codeb/codea_ag_snafu_02.3
new file mode 100644 (file)
index 0000000..a114c97
--- /dev/null
@@ -0,0 +1,33 @@
+struct
+       a b c
+end;
+
+method bar(d e f)
+       var foo := a;
+       foo := b - c;
+       var bar := d - (e * f);
+       
+       if(4 = 2) then
+               var x := 1;
+               var hiho := 0;
+       else
+               var hiho := 0x1f;
+       end;
+
+       var hiho := 2;
+
+       while 0 < hiho do
+               if (42) then
+                       hiho := hiho - 1;
+               else
+                       hiho := hiho - (0 - g); /* g existiert noch nicht */
+               end;
+       end;
+       
+       return 0;
+end;
+
+struct
+       g
+       h
+end;
diff --git a/codeb/codea_ag_snafu_03.3 b/codeb/codea_ag_snafu_03.3
new file mode 100644 (file)
index 0000000..fd67059
--- /dev/null
@@ -0,0 +1,34 @@
+struct
+       a b c
+end;
+
+method bar(d e f)
+       var foo := a;
+       foo := b - c;
+       var bar := d - (e * f);
+       
+       if(4 = 2) then
+               var x := 1;
+               var hiho := 0;
+       else
+               var hiho := 0x1f;
+       end;
+
+       var hiho := 2;
+
+       while 0 < hiho do
+               if (42) then
+                       hiho := hiho - 1;
+               else
+                       hiho := hiho - (0 - a);
+               end;
+       end;
+
+       var e := 22; /* e existiert bereits */  
+       return 0;
+end;
+
+struct
+       g
+       h
+end;
diff --git a/codeb/codea_ag_snafu_04.3 b/codeb/codea_ag_snafu_04.3
new file mode 100644 (file)
index 0000000..ea5c6a8
--- /dev/null
@@ -0,0 +1,30 @@
+struct
+       a b c
+end;
+
+method bar(d e f)
+       var foo := a;
+       foo := b - c;
+       var bar := d - (e * f);
+       
+       if(4 = 2) then
+               var x := 1;
+               var hiho := 0;
+       else
+               var hiho := 0x1f;
+       end;
+
+       if(9 < 8) then
+               var hohi := 12;
+       else
+               var hiho := 2;
+       end;
+
+
+       return hiho; /* hiho existiert nicht */
+end;
+
+struct
+       g
+       h
+end;
diff --git a/codeb/codea_ag_snafu_06.3 b/codeb/codea_ag_snafu_06.3
new file mode 100644 (file)
index 0000000..e4fa6e8
--- /dev/null
@@ -0,0 +1,9 @@
+struct g1 g2 g3 g4 end;
+struct g5 g6 end;
+
+method foo(p1 p2 p3)
+       var l1 := 0;
+       var l2 := g6;
+
+       g1.g2.l1 := 0xDEAD; /* l1 kein feld */
+end;
diff --git a/codeb/codea_ag_snafu_07.3 b/codeb/codea_ag_snafu_07.3
new file mode 100644 (file)
index 0000000..8de0724
--- /dev/null
@@ -0,0 +1,9 @@
+struct g1 g2 g3 g4 end;
+struct g5 g6 end;
+
+method foo(p1 p2 p3)
+       var l1 := 0;
+       var l2 := g6;
+
+       g1.g2.p1 := 0xDEAD; /* p1 kein feld */
+end;
diff --git a/codeb/codea_ag_snafu_10.3 b/codeb/codea_ag_snafu_10.3
new file mode 100644 (file)
index 0000000..fa7e897
--- /dev/null
@@ -0,0 +1,9 @@
+struct g1 g2 g3 g4 end;
+struct g5 g6 end;
+
+method foo(p1 p2 p3)
+       var l1 := 0;
+       var l2 := g6;
+
+       g1.l2.g2 := 0xDEAD; /* l2 kein feld */
+end;
diff --git a/codeb/codea_ag_snafu_11.3 b/codeb/codea_ag_snafu_11.3
new file mode 100644 (file)
index 0000000..6456a50
--- /dev/null
@@ -0,0 +1,9 @@
+struct g1 g2 g3 g4 end;
+struct g5 g6 end;
+
+method foo(p1 p2 p3)
+       var l1 := 0;
+       var l2 := g6;
+
+       g1.p3.g6:= 0xDEAD; /* p3 kein feld */
+end;
diff --git a/codeb/codea_ag_torotil_01.3 b/codeb/codea_ag_torotil_01.3
new file mode 100644 (file)
index 0000000..84d6480
--- /dev/null
@@ -0,0 +1,9 @@
+struct 
+    one struct_not defined
+end;
+
+method main(a b)
+   var something := 0x42;
+   var the := 0x42;
+   the.one.missing_struct := something;
+end;
diff --git a/codeb/codea_ag_zzbsm17_01.3 b/codeb/codea_ag_zzbsm17_01.3
new file mode 100644 (file)
index 0000000..7ce046a
--- /dev/null
@@ -0,0 +1,7 @@
+method foo ( )
+    if 1 then
+        var v1 := 1;
+    else
+        v1 := 2;
+    end;
+end;
diff --git a/codeb/codea_ag_zzbsm17_02.3 b/codeb/codea_ag_zzbsm17_02.3
new file mode 100644 (file)
index 0000000..791203d
--- /dev/null
@@ -0,0 +1,3 @@
+method foo ( p1 )
+    var p1 := 1;
+end;
diff --git a/codeb/codea_ag_zzbsm17_03.3 b/codeb/codea_ag_zzbsm17_03.3
new file mode 100644 (file)
index 0000000..23be7ba
--- /dev/null
@@ -0,0 +1,7 @@
+method foo ( )
+    if 1 then
+        var v1 := 1;
+    end;
+
+    return v1;
+end;
diff --git a/codeb/codea_ag_zzbsm17_04.3 b/codeb/codea_ag_zzbsm17_04.3
new file mode 100644 (file)
index 0000000..5b021fc
--- /dev/null
@@ -0,0 +1,5 @@
+method foo ( )
+    v1 := 1;
+    var v1 := 1;
+    return v1;
+end;
diff --git a/codeb/codea_ag_zzbsm17_06.3 b/codeb/codea_ag_zzbsm17_06.3
new file mode 100644 (file)
index 0000000..6d17fd3
--- /dev/null
@@ -0,0 +1,16 @@
+struct f1 end;
+
+method foo ( )
+    
+    var v1 := 1;
+
+    /* Bei einem Variablen/Feldzugriff muss eine Variable oder ein Feld mit dem Namen sichtbar sein */
+    f1 := f1;
+    v1 := v1;
+
+    /* Bei einem Feldzugriff muss ein Feld mit dem Namen sichtbar sein */
+    this.f1 := this.f1;
+    this.v1 := this.v1;
+
+    return v1;
+end;
diff --git a/codeb/codea_intelli_00.0 b/codeb/codea_intelli_00.0
new file mode 100644 (file)
index 0000000..526ed51
--- /dev/null
@@ -0,0 +1,8 @@
+method f(a b c)
+       return (a*5) - (b*c) - this;
+end;
+
+/*verschachtelte mult*/
+method g(a b)
+       return (a * (b * (-4))) - this;
+end;
diff --git a/codeb/codea_intelli_00.call b/codeb/codea_intelli_00.call
new file mode 100644 (file)
index 0000000..5008bf5
--- /dev/null
@@ -0,0 +1,4 @@
+long f(long, long, long, long);
+long g(long, long, long);
+
+RET(f(1, 100, 10, 5)==449 && g(5, -2, 7) == 51);
diff --git a/codeb/codea_intelli_00.instr b/codeb/codea_intelli_00.instr
new file mode 100644 (file)
index 0000000..f599e28
--- /dev/null
@@ -0,0 +1 @@
+10
diff --git a/codeb/codea_intelli_01.0 b/codeb/codea_intelli_01.0
new file mode 100644 (file)
index 0000000..f0da467
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a)
+       return (a*a) * (2-3)  * this * (3 * (2-3));
+end;
diff --git a/codeb/codea_intelli_01.call b/codeb/codea_intelli_01.call
new file mode 100644 (file)
index 0000000..f9bb040
--- /dev/null
@@ -0,0 +1,9 @@
+long f(long, long);
+
+
+
+
+
+RET(f(9, 15) == 6075);
+
+
diff --git a/codeb/codea_intelli_01.instr b/codeb/codea_intelli_01.instr
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/codeb/codea_intelli_02.0 b/codeb/codea_intelli_02.0
new file mode 100644 (file)
index 0000000..2741b2a
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return ((this or 2) or (a or b)) - 10;
+end;
\ No newline at end of file
diff --git a/codeb/codea_intelli_02.call b/codeb/codea_intelli_02.call
new file mode 100644 (file)
index 0000000..90c4be2
--- /dev/null
@@ -0,0 +1,4 @@
+long f(long, long, long);
+
+RET(f(1, 8, 16) == 17);
+
diff --git a/codeb/codea_intelli_02.instr b/codeb/codea_intelli_02.instr
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/codeb/codea_intelli_03.0 b/codeb/codea_intelli_03.0
new file mode 100644 (file)
index 0000000..2cb9197
--- /dev/null
@@ -0,0 +1,4 @@
+method f(a b c)
+       return (a < (b  < c)) * this; 
+end;
+
diff --git a/codeb/codea_intelli_03.call b/codeb/codea_intelli_03.call
new file mode 100644 (file)
index 0000000..961b937
--- /dev/null
@@ -0,0 +1,7 @@
+long f(long, long, long, long);
+
+
+RET(f(3, -2, 0, 15) == 3);
+
+
+
diff --git a/codeb/codea_intelli_03.instr b/codeb/codea_intelli_03.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_intelli_04.0 b/codeb/codea_intelli_04.0
new file mode 100644 (file)
index 0000000..170550d
--- /dev/null
@@ -0,0 +1,3 @@
+method g(a b)
+       return a = b;
+end;
diff --git a/codeb/codea_intelli_04.call b/codeb/codea_intelli_04.call
new file mode 100644 (file)
index 0000000..8e6894c
--- /dev/null
@@ -0,0 +1,3 @@
+long g(long, long, long);
+
+RET(g(0, -2, -2) == 1 && g(0, 1, 3) == 0);
diff --git a/codeb/codea_intelli_04.instr b/codeb/codea_intelli_04.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_intelli_05.0 b/codeb/codea_intelli_05.0
new file mode 100644 (file)
index 0000000..a072dd1
--- /dev/null
@@ -0,0 +1,11 @@
+struct x y z b end;
+
+method f(a b)
+       return b;
+end;
+
+struct u v end;
+
+method g(a)
+       return u * a.v;
+end;
diff --git a/codeb/codea_intelli_05.call b/codeb/codea_intelli_05.call
new file mode 100644 (file)
index 0000000..6e296ea
--- /dev/null
@@ -0,0 +1,13 @@
+extern long long f(long long*, long long*, long long);
+extern long long g(long long*, long long*);
+
+
+long long ar[10];
+long long ar2[10];
+int i = 1;
+for(; i <= 10; i++)
+       ar[i-1] = i;
+for (i = 1; i <= 10; i++)
+       ar2[i-1] = i * 10;
+
+RET(f(ar, ar, 4711) == 4711 && g(ar, ar2) == 20);
diff --git a/codeb/codea_intelli_05.instr b/codeb/codea_intelli_05.instr
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/codeb/codea_intelli_06.0 b/codeb/codea_intelli_06.0
new file mode 100644 (file)
index 0000000..62d9d7e
--- /dev/null
@@ -0,0 +1,5 @@
+struct x y z end;
+
+method f()
+          return (x - y) * z;
+end;
diff --git a/codeb/codea_intelli_06.call b/codeb/codea_intelli_06.call
new file mode 100644 (file)
index 0000000..42435f0
--- /dev/null
@@ -0,0 +1,9 @@
+extern long long f(long long*);
+
+
+long long ar[10];
+int i = 1;
+for(; i <= 10; i++)
+       ar[i-1] = i;
+
+RET(f(ar) == -3);
diff --git a/codeb/codea_intelli_06.instr b/codeb/codea_intelli_06.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/codeb/codea_intelli_07.0 b/codeb/codea_intelli_07.0
new file mode 100644 (file)
index 0000000..0394e3c
--- /dev/null
@@ -0,0 +1,5 @@
+struct x y z end;
+
+method f(a)
+       return (a - (-3*8)).y;
+end;
diff --git a/codeb/codea_intelli_07.call b/codeb/codea_intelli_07.call
new file mode 100644 (file)
index 0000000..1c49d3f
--- /dev/null
@@ -0,0 +1,8 @@
+extern long long f(long long*, long long*);
+
+long long ar[10];
+int i = 1;
+for(; i <= 10; i++)
+       ar[i-1] = i;
+
+RET(f(ar, ar) == 5);
diff --git a/codeb/codea_intelli_07.instr b/codeb/codea_intelli_07.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/codeb/codea_intelli_08.0 b/codeb/codea_intelli_08.0
new file mode 100644 (file)
index 0000000..ca5e813
--- /dev/null
@@ -0,0 +1,5 @@
+struct x y z end;
+
+method f(a)
+       return a.y - a.x - a.z;
+end;
diff --git a/codeb/codea_intelli_08.call b/codeb/codea_intelli_08.call
new file mode 100644 (file)
index 0000000..2153dc3
--- /dev/null
@@ -0,0 +1,8 @@
+extern long long f(long long*, long long*);
+
+long long ar[10];
+int i = 1;
+for(; i <= 10; i++)
+       ar[i-1] = i;
+
+RET(f(ar, ar) == -2);
diff --git a/codeb/codea_intelli_08.instr b/codeb/codea_intelli_08.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/codeb/codea_lewurm_00.0 b/codeb/codea_lewurm_00.0
new file mode 100644 (file)
index 0000000..297740c
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b c)
+       return (a-5) - (b-c) - this;
+end;
diff --git a/codeb/codea_lewurm_00.call b/codeb/codea_lewurm_00.call
new file mode 100644 (file)
index 0000000..d32445c
--- /dev/null
@@ -0,0 +1,3 @@
+long f(long, long, long, long);
+
+RET(f(1, 100, 10, 5) == 89);
diff --git a/codeb/codea_lewurm_00.instr b/codeb/codea_lewurm_00.instr
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/codeb/codea_lewurm_01.0 b/codeb/codea_lewurm_01.0
new file mode 100644 (file)
index 0000000..c6fd5ac
--- /dev/null
@@ -0,0 +1,3 @@
+method f(x)
+  return x;
+end;
diff --git a/codeb/codea_lewurm_01.call b/codeb/codea_lewurm_01.call
new file mode 100644 (file)
index 0000000..7102d60
--- /dev/null
@@ -0,0 +1,2 @@
+extern long f(long, long);
+RET((f(0xDEAD, 5)==5) && (f(0xDEAD, -3)==-3));
diff --git a/codeb/codea_lewurm_01.instr b/codeb/codea_lewurm_01.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/codeb/codea_lewurm_02.0 b/codeb/codea_lewurm_02.0
new file mode 100644 (file)
index 0000000..10a2205
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b c d)
+  return this-(a-b-c-d);
+end;
diff --git a/codeb/codea_lewurm_02.call b/codeb/codea_lewurm_02.call
new file mode 100644 (file)
index 0000000..2dcfbe9
--- /dev/null
@@ -0,0 +1,2 @@
+extern long f(long,long,long,long,long);
+RET(f(100,50,15,10,5)==80);
diff --git a/codeb/codea_lewurm_02.instr b/codeb/codea_lewurm_02.instr
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/codeb/codea_lewurm_03.0 b/codeb/codea_lewurm_03.0
new file mode 100644 (file)
index 0000000..33170d8
--- /dev/null
@@ -0,0 +1,3 @@
+method f()
+  return this;
+end;
diff --git a/codeb/codea_lewurm_03.call b/codeb/codea_lewurm_03.call
new file mode 100644 (file)
index 0000000..aba4bb3
--- /dev/null
@@ -0,0 +1,2 @@
+extern long f(long);
+RET(f(-1337)==-1337);
diff --git a/codeb/codea_lewurm_03.instr b/codeb/codea_lewurm_03.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_lewurm_04.0 b/codeb/codea_lewurm_04.0
new file mode 100644 (file)
index 0000000..b43a1a7
--- /dev/null
@@ -0,0 +1,3 @@
+method f()
+  return 666-this;
+end;
diff --git a/codeb/codea_lewurm_04.call b/codeb/codea_lewurm_04.call
new file mode 100644 (file)
index 0000000..bc992d7
--- /dev/null
@@ -0,0 +1,2 @@
+extern long f(long);
+RET(f(111)==555);
diff --git a/codeb/codea_lewurm_04.instr b/codeb/codea_lewurm_04.instr
new file mode 100644 (file)
index 0000000..00750ed
--- /dev/null
@@ -0,0 +1 @@
+3
diff --git a/codeb/codea_lewurm_05.0 b/codeb/codea_lewurm_05.0
new file mode 100644 (file)
index 0000000..a14beea
--- /dev/null
@@ -0,0 +1,3 @@
+method Long(a b c d e)
+       return e - d - c - b - a - this;
+end;
diff --git a/codeb/codea_lewurm_05.call b/codeb/codea_lewurm_05.call
new file mode 100644 (file)
index 0000000..d791072
--- /dev/null
@@ -0,0 +1,3 @@
+long Long(long, long, long, long, long, long);
+
+RET( Long(2, 6, 12, 25, 50, 100) == 5);
diff --git a/codeb/codea_lewurm_05.instr b/codeb/codea_lewurm_05.instr
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/codeb/codea_lewurm_06.0 b/codeb/codea_lewurm_06.0
new file mode 100644 (file)
index 0000000..83e538d
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return a - ( b * -1 * a * -1 * b * -1 * -4 );
+end;
diff --git a/codeb/codea_lewurm_06.call b/codeb/codea_lewurm_06.call
new file mode 100644 (file)
index 0000000..26ffaf9
--- /dev/null
@@ -0,0 +1,2 @@
+long f(long, long, long);
+RET(f(0xCAFEBABE, 20, 10)==-7980);
diff --git a/codeb/codea_lewurm_06.instr b/codeb/codea_lewurm_06.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_lewurm_07.0 b/codeb/codea_lewurm_07.0
new file mode 100644 (file)
index 0000000..156ef51
--- /dev/null
@@ -0,0 +1,19 @@
+method w(a)
+       return this < a;
+end;
+
+method x()
+       return this < 3;
+end;
+
+method y()
+       return 3 < this;
+end;
+
+method z()
+       return 3 < 3;
+end;
+
+method override()
+       return 0x55555;
+end;
diff --git a/codeb/codea_lewurm_07.call b/codeb/codea_lewurm_07.call
new file mode 100644 (file)
index 0000000..5df2bd6
--- /dev/null
@@ -0,0 +1,7 @@
+long w(long,long);
+long x(long);
+long y(long);
+long z(long);
+long override(long);
+
+RET(w(20,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(400)==1 && override(0x1)==0x55555 && z(400)==0 && override(0x1)==0x55555);
diff --git a/codeb/codea_lewurm_07.instr b/codeb/codea_lewurm_07.instr
new file mode 100644 (file)
index 0000000..9902f17
--- /dev/null
@@ -0,0 +1 @@
+28
diff --git a/codeb/codea_lewurm_08.0 b/codeb/codea_lewurm_08.0
new file mode 100644 (file)
index 0000000..69e5dd9
--- /dev/null
@@ -0,0 +1,19 @@
+method w(a)
+       return this = a;
+end;
+
+method x()
+       return this = 3;
+end;
+
+method y()
+       return 3 = this;
+end;
+
+method z()
+       return -13 = -13;
+end;
+
+method override()
+       return 0x55555;
+end;
diff --git a/codeb/codea_lewurm_08.call b/codeb/codea_lewurm_08.call
new file mode 100644 (file)
index 0000000..e1de119
--- /dev/null
@@ -0,0 +1,7 @@
+long w(long,long);
+long x(long);
+long y(long);
+long z(long);
+long override(long);
+
+RET(w(30,30)==1 && override(0x1)==0x55555 && w(30,20)==0 && override(1)==0x55555 && x(400)==0 && override(0x1)==0x55555 && y(3)==1 && override(0x1)==0x55555 && z(400)==1 && override(0x1)==0x55555);
diff --git a/codeb/codea_lewurm_08.instr b/codeb/codea_lewurm_08.instr
new file mode 100644 (file)
index 0000000..9902f17
--- /dev/null
@@ -0,0 +1 @@
+28
diff --git a/codeb/codea_lewurm_09.0 b/codeb/codea_lewurm_09.0
new file mode 100644 (file)
index 0000000..b42b238
--- /dev/null
@@ -0,0 +1,12 @@
+struct j k l end;
+method w()
+       return this.k;
+end;
+
+method x()
+       return l;
+end;
+
+method y()
+       return (this-8).k;
+end;
diff --git a/codeb/codea_lewurm_09.call b/codeb/codea_lewurm_09.call
new file mode 100644 (file)
index 0000000..c16667e
--- /dev/null
@@ -0,0 +1,6 @@
+long w(long);
+long x(long);
+long y(long);
+
+long t[3] = {5,6,7};
+RET(w((long)t)==6 && x((long)t)==7 && y((long)t)==5);
diff --git a/codeb/codea_lewurm_09.instr b/codeb/codea_lewurm_09.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_lewurm_10.0 b/codeb/codea_lewurm_10.0
new file mode 100644 (file)
index 0000000..b8ed559
--- /dev/null
@@ -0,0 +1,11 @@
+method w()
+       return not this;
+end;
+
+method x()
+       return not (not this);
+end;
+
+method y()
+       return not (not (not this));
+end;
diff --git a/codeb/codea_lewurm_10.call b/codeb/codea_lewurm_10.call
new file mode 100644 (file)
index 0000000..fff444f
--- /dev/null
@@ -0,0 +1,5 @@
+long w(long);
+long x(long);
+long y(long);
+
+RET(w(0)==1 && x(0)==0 && y(1)==0);
diff --git a/codeb/codea_lewurm_10.instr b/codeb/codea_lewurm_10.instr
new file mode 100644 (file)
index 0000000..48082f7
--- /dev/null
@@ -0,0 +1 @@
+12
diff --git a/codeb/codea_lewurm_11.0 b/codeb/codea_lewurm_11.0
new file mode 100644 (file)
index 0000000..ac14b1a
--- /dev/null
@@ -0,0 +1,13 @@
+struct a b c end;
+
+method try0()
+       return 0x00100000.c;
+end;
+
+method try1()
+       return 0x01000000.c;
+end;
+
+method try2()
+       return 0xA0000000.c;
+end;
diff --git a/codeb/codea_lewurm_11.call b/codeb/codea_lewurm_11.call
new file mode 100644 (file)
index 0000000..067edca
--- /dev/null
@@ -0,0 +1,46 @@
+#define TRIES 3
+
+/* ugly. copied from 'bits/mman.h' */
+#define PROT_READ      0x1
+#define PROT_WRITE     0x2
+#define MAP_PRIVATE    0x02
+#define MAP_FIXED      0x10
+#define MAP_ANONYMOUS  0x20
+
+void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+
+long try0(long);
+long try1(long);
+long try2(long);
+
+/* try these adresses until one is free */
+long *tries[TRIES] = {
+       (long *)0x00100000,
+       (long *)0x01000000,
+       (long *)0xA0000000
+};
+
+int   t    = 0;
+long *addr = NULL;
+
+for (t = 0; t < TRIES; t++) {
+       addr = mmap(tries[t], 4096, PROT_READ | PROT_WRITE,
+                   MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
+
+       if (tries[t] == addr)
+               break;
+}
+
+if ((void *)-1 == addr) {
+       puts("unable to map memory");
+       RET(1); /* keep the statistic clean */
+}
+
+addr[2] = 1337;
+
+switch (t) {
+case 0:        RET(try0(0xcafebabe) == 1337);
+case 1:        RET(try1(0xcafebabe) == 1337);
+case 2:        RET(try2(0xcafebabe) == 1337);
+}
+
diff --git a/codeb/codea_lewurm_11.instr b/codeb/codea_lewurm_11.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_lewurm_12.0 b/codeb/codea_lewurm_12.0
new file mode 100644 (file)
index 0000000..78f2b1c
--- /dev/null
@@ -0,0 +1,12 @@
+method f1()
+       return (this*2*3)*1;
+end;
+method f2()
+       return (this)*1;
+end;
+method f3()
+       return this*1;
+end;
+method f4()
+       return (this*1)*(this*1)*1;
+end;
diff --git a/codeb/codea_lewurm_12.call b/codeb/codea_lewurm_12.call
new file mode 100644 (file)
index 0000000..e8615de
--- /dev/null
@@ -0,0 +1,7 @@
+long f1(long);
+long f2(long);
+long f3(long);
+long f4(long);
+RET((f1(4) == 24) &&
+       (f2(4) == 4) &&
+       (f3(4) == 4));
diff --git a/codeb/codea_lewurm_12.instr b/codeb/codea_lewurm_12.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/codeb/codea_lewurm_13.0 b/codeb/codea_lewurm_13.0
new file mode 100644 (file)
index 0000000..a190acd
--- /dev/null
@@ -0,0 +1,9 @@
+method f1()
+       return (this-0-0)-0-0-6;
+end;
+method f2()
+       return (this)-0;
+end;
+method f3()
+       return this-0;
+end;
diff --git a/codeb/codea_lewurm_13.call b/codeb/codea_lewurm_13.call
new file mode 100644 (file)
index 0000000..f1a4291
--- /dev/null
@@ -0,0 +1,6 @@
+long f1(long);
+long f2(long);
+long f3(long);
+RET((f1(4) == -2) &&
+       (f2(4) == 4) &&
+       (f3(4) == 4));
diff --git a/codeb/codea_lewurm_13.instr b/codeb/codea_lewurm_13.instr
new file mode 100644 (file)
index 0000000..7f8f011
--- /dev/null
@@ -0,0 +1 @@
+7
diff --git a/codeb/codea_lewurm_14.0 b/codeb/codea_lewurm_14.0
new file mode 100644 (file)
index 0000000..83e59da
--- /dev/null
@@ -0,0 +1,21 @@
+struct foo bar end;
+
+method f1(a b)
+       return a.foo * 5;
+end;
+
+method f2(a b)
+       return b.foo - (100 - a.foo);
+end;
+
+method f3(a b)
+       return b.foo - (100 - 50 - a.foo);
+end;
+
+method f4(a b)
+       return a.foo * a.bar;
+end;
+
+method f5(a b)
+       return b.foo - (100 - a.foo - b.foo);
+end;
diff --git a/codeb/codea_lewurm_14.call b/codeb/codea_lewurm_14.call
new file mode 100644 (file)
index 0000000..7288b0a
--- /dev/null
@@ -0,0 +1,15 @@
+long f1(long, long*, long*);
+long f2(long, long*, long*);
+long f3(long, long*, long*);
+long f4(long, long*, long*);
+long f5(long, long*, long*);
+
+long muh[] = {0x05f05f, 0x223344};
+long kuh[] = {0x00AACC, 0x563425};
+
+RET(f1(0, muh, kuh) == muh[0] * 5 &&
+       f2(0, muh, kuh) == kuh[0] - (100 - muh[0]) &&
+       f3(0, muh, kuh) == kuh[0] - (100 - 50 - muh[0]) &&
+       f5(0, muh, kuh) == kuh[0] - (100 - muh[0] - kuh[0]) &&
+       f4(0, muh, kuh) == muh[0] * muh[1]
+       );
diff --git a/codeb/codea_lewurm_14.instr b/codeb/codea_lewurm_14.instr
new file mode 100644 (file)
index 0000000..aabe6ec
--- /dev/null
@@ -0,0 +1 @@
+21
diff --git a/codeb/codea_mrstrcmp_00.0 b/codeb/codea_mrstrcmp_00.0
new file mode 100644 (file)
index 0000000..ce70add
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return u;
+end;
+
diff --git a/codeb/codea_mrstrcmp_00.call b/codeb/codea_mrstrcmp_00.call
new file mode 100644 (file)
index 0000000..95aa118
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[0]);
+
diff --git a/codeb/codea_mrstrcmp_00.instr b/codeb/codea_mrstrcmp_00.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_01.0 b/codeb/codea_mrstrcmp_01.0
new file mode 100644 (file)
index 0000000..6892b27
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return this.u;
+end;
+
diff --git a/codeb/codea_mrstrcmp_01.call b/codeb/codea_mrstrcmp_01.call
new file mode 100644 (file)
index 0000000..95aa118
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[0]);
+
diff --git a/codeb/codea_mrstrcmp_01.instr b/codeb/codea_mrstrcmp_01.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_02.0 b/codeb/codea_mrstrcmp_02.0
new file mode 100644 (file)
index 0000000..1c4c7f2
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return v;
+end;
+
diff --git a/codeb/codea_mrstrcmp_02.call b/codeb/codea_mrstrcmp_02.call
new file mode 100644 (file)
index 0000000..c57834a
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[1]);
+
diff --git a/codeb/codea_mrstrcmp_02.instr b/codeb/codea_mrstrcmp_02.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_03.0 b/codeb/codea_mrstrcmp_03.0
new file mode 100644 (file)
index 0000000..ac311d3
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return w;
+end;
+
diff --git a/codeb/codea_mrstrcmp_03.call b/codeb/codea_mrstrcmp_03.call
new file mode 100644 (file)
index 0000000..227a120
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[2]);
+
diff --git a/codeb/codea_mrstrcmp_03.instr b/codeb/codea_mrstrcmp_03.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_04.0 b/codeb/codea_mrstrcmp_04.0
new file mode 100644 (file)
index 0000000..c600cab
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return x;
+end;
+
diff --git a/codeb/codea_mrstrcmp_04.call b/codeb/codea_mrstrcmp_04.call
new file mode 100644 (file)
index 0000000..685043f
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[3]);
+
diff --git a/codeb/codea_mrstrcmp_04.instr b/codeb/codea_mrstrcmp_04.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_05.0 b/codeb/codea_mrstrcmp_05.0
new file mode 100644 (file)
index 0000000..ad12c0b
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return this.x;
+end;
+
diff --git a/codeb/codea_mrstrcmp_05.call b/codeb/codea_mrstrcmp_05.call
new file mode 100644 (file)
index 0000000..685043f
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(v, NULL) == v[3]);
+
diff --git a/codeb/codea_mrstrcmp_05.instr b/codeb/codea_mrstrcmp_05.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_06.0 b/codeb/codea_mrstrcmp_06.0
new file mode 100644 (file)
index 0000000..112dc7a
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return a.v;
+end;
+
diff --git a/codeb/codea_mrstrcmp_06.call b/codeb/codea_mrstrcmp_06.call
new file mode 100644 (file)
index 0000000..fec17fd
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(NULL, v) == v[1]);
+
diff --git a/codeb/codea_mrstrcmp_06.instr b/codeb/codea_mrstrcmp_06.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_07.0 b/codeb/codea_mrstrcmp_07.0
new file mode 100644 (file)
index 0000000..59fefe2
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return a.w;
+end;
+
diff --git a/codeb/codea_mrstrcmp_07.call b/codeb/codea_mrstrcmp_07.call
new file mode 100644 (file)
index 0000000..8b9f053
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(NULL, v) == v[2]);
+
diff --git a/codeb/codea_mrstrcmp_07.instr b/codeb/codea_mrstrcmp_07.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_mrstrcmp_08.0 b/codeb/codea_mrstrcmp_08.0
new file mode 100644 (file)
index 0000000..63d2815
--- /dev/null
@@ -0,0 +1,8 @@
+struct
+       u v w x y z
+end;
+
+method f(a)
+       return (a - (-8 * 4) ).v;
+end;
+
diff --git a/codeb/codea_mrstrcmp_08.call b/codeb/codea_mrstrcmp_08.call
new file mode 100644 (file)
index 0000000..ee3ad06
--- /dev/null
@@ -0,0 +1,6 @@
+long f(long *, long *);
+
+long v[] = { 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF };
+
+RET(f(NULL, v) == v[5]);
+
diff --git a/codeb/codea_mrstrcmp_08.instr b/codeb/codea_mrstrcmp_08.instr
new file mode 100644 (file)
index 0000000..b8626c4
--- /dev/null
@@ -0,0 +1 @@
+4
diff --git a/codeb/codea_mrstrcmp_09.0 b/codeb/codea_mrstrcmp_09.0
new file mode 100644 (file)
index 0000000..cc32430
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return a - b;
+end;
diff --git a/codeb/codea_mrstrcmp_09.call b/codeb/codea_mrstrcmp_09.call
new file mode 100644 (file)
index 0000000..27d2e6f
--- /dev/null
@@ -0,0 +1,4 @@
+long f(long, long, long);
+
+RET(f(0, 20, 10) ==  10 &&
+    f(0, 10, 20) == -10);
diff --git a/codeb/codea_mrstrcmp_09.instr b/codeb/codea_mrstrcmp_09.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/codeb/codea_mrstrcmp_10.0 b/codeb/codea_mrstrcmp_10.0
new file mode 100644 (file)
index 0000000..f01fa2b
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return 20 - b;
+end;
diff --git a/codeb/codea_mrstrcmp_10.call b/codeb/codea_mrstrcmp_10.call
new file mode 100644 (file)
index 0000000..0b6c75e
--- /dev/null
@@ -0,0 +1,5 @@
+long f(long, long, long);
+
+RET(f(0, 0, 10) ==  10 &&
+    f(0, 0, 20) ==   0 &&
+    f(0, 0, 30) == -10);
diff --git a/codeb/codea_mrstrcmp_10.instr b/codeb/codea_mrstrcmp_10.instr
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/codeb/codea_mrstrcmp_11.0 b/codeb/codea_mrstrcmp_11.0
new file mode 100644 (file)
index 0000000..0beb6dc
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return b - 20;
+end;
diff --git a/codeb/codea_mrstrcmp_11.call b/codeb/codea_mrstrcmp_11.call
new file mode 100644 (file)
index 0000000..995bbed
--- /dev/null
@@ -0,0 +1,5 @@
+long f(long, long, long);
+
+RET(f(0, 0, 10) == -10 &&
+    f(0, 0, 20) ==   0 &&
+    f(0, 0, 30) ==  10);
diff --git a/codeb/codea_mrstrcmp_11.instr b/codeb/codea_mrstrcmp_11.instr
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
@@ -0,0 +1 @@
+9
diff --git a/codeb/codea_mrstrcmp_12.0 b/codeb/codea_mrstrcmp_12.0
new file mode 100644 (file)
index 0000000..3104add
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return a - (10 - b) - 20;
+end;
diff --git a/codeb/codea_mrstrcmp_12.call b/codeb/codea_mrstrcmp_12.call
new file mode 100644 (file)
index 0000000..ff29661
--- /dev/null
@@ -0,0 +1,5 @@
+long f(long, long, long);
+
+RET(f(0, 10, 20) == (10 - (10 - 20) - 20) &&
+    f(0, 40, 20) == (40 - (10 - 20) - 20) &&
+    f(0,  0, 30) == ( 0 - (10 - 30) - 20));
diff --git a/codeb/codea_mrstrcmp_12.instr b/codeb/codea_mrstrcmp_12.instr
new file mode 100644 (file)
index 0000000..60d3b2f
--- /dev/null
@@ -0,0 +1 @@
+15
diff --git a/codeb/codea_mrstrcmp_13.0 b/codeb/codea_mrstrcmp_13.0
new file mode 100644 (file)
index 0000000..84dfd8c
--- /dev/null
@@ -0,0 +1,19 @@
+method f1(a b)
+       return a - (-1 * b);
+end;
+
+method f2(a b)
+       return a - (-2 * b);
+end;
+
+method f4(a b)
+       return a - (-4 * b);
+end;
+
+method f8(a b)
+       return a - (-8 * b);
+end;
+
+method  f(a b c d)
+       return a - (-8 * (b - (-4 * (c - (-2 * d)))));
+end;
diff --git a/codeb/codea_mrstrcmp_13.call b/codeb/codea_mrstrcmp_13.call
new file mode 100644 (file)
index 0000000..91ca672
--- /dev/null
@@ -0,0 +1,55 @@
+#define F1(a,b)     ((long)(a) - (-1UL * (long)(b)))
+#define F2(a,b)     ((long)(a) - (-2UL * (long)(b)))
+#define F4(a,b)     ((long)(a) - (-4UL * (long)(b)))
+#define F8(a,b)     ((long)(a) - (-8UL * (long)(b)))
+#define  F(a,b,c,d) ((long)(a) - (-8UL * ((long)(b) - (-4UL * ((long)(c) - (-2UL * (long)(d)))))))
+
+long f1(long, long, long);
+long f2(long, long, long);
+long f4(long, long, long);
+long f8(long, long, long);
+long  f(long, long, long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f4(0,    3,  20) == F4(   3,  20) &&
+    f4(0, -100,  80) == F4(-100,  80) &&
+    f4(0,   50,  -9) == F4(  50,  -9) &&
+    f4(0,  -77, -50) == F4( -77, -50) &&
+
+    f8(0,    3,  20) == F8(   3,  20) &&
+    f8(0, -100,  80) == F8(-100,  80) &&
+    f8(0,   50,  -9) == F8(  50,  -9) &&
+    f8(0,  -77, -50) == F8( -77, -50) &&
+
+     f(0,  10,  20,  30,  40) == F( 10,  20,  30,  40) &&
+     f(0, -10,  20, -30,  40) == F(-10,  20, -30,  40) &&
+     f(0,  10, -20,  30, -40) == F( 10, -20,  30, -40) &&
+     f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f4(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F4(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f8(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F8(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f4(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F4(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f8(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F8(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL));
+
diff --git a/codeb/codea_mrstrcmp_13.instr b/codeb/codea_mrstrcmp_13.instr
new file mode 100644 (file)
index 0000000..900731f
--- /dev/null
@@ -0,0 +1 @@
+64
diff --git a/codeb/codea_mrstrcmp_14.0 b/codeb/codea_mrstrcmp_14.0
new file mode 100644 (file)
index 0000000..0d0c4d5
--- /dev/null
@@ -0,0 +1,19 @@
+method f1(a b)
+       return a - (b * -1);
+end;
+
+method f2(a b)
+       return a - (b * -2);
+end;
+
+method f4(a b)
+       return a - (b * -4);
+end;
+
+method f8(a b)
+       return a - (b * -8);
+end;
+
+method  f(a b c d)
+       return a - ((b - ((c - (d * -2)) * -4)) * -8);
+end;
diff --git a/codeb/codea_mrstrcmp_14.call b/codeb/codea_mrstrcmp_14.call
new file mode 100644 (file)
index 0000000..91ca672
--- /dev/null
@@ -0,0 +1,55 @@
+#define F1(a,b)     ((long)(a) - (-1UL * (long)(b)))
+#define F2(a,b)     ((long)(a) - (-2UL * (long)(b)))
+#define F4(a,b)     ((long)(a) - (-4UL * (long)(b)))
+#define F8(a,b)     ((long)(a) - (-8UL * (long)(b)))
+#define  F(a,b,c,d) ((long)(a) - (-8UL * ((long)(b) - (-4UL * ((long)(c) - (-2UL * (long)(d)))))))
+
+long f1(long, long, long);
+long f2(long, long, long);
+long f4(long, long, long);
+long f8(long, long, long);
+long  f(long, long, long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f4(0,    3,  20) == F4(   3,  20) &&
+    f4(0, -100,  80) == F4(-100,  80) &&
+    f4(0,   50,  -9) == F4(  50,  -9) &&
+    f4(0,  -77, -50) == F4( -77, -50) &&
+
+    f8(0,    3,  20) == F8(   3,  20) &&
+    f8(0, -100,  80) == F8(-100,  80) &&
+    f8(0,   50,  -9) == F8(  50,  -9) &&
+    f8(0,  -77, -50) == F8( -77, -50) &&
+
+     f(0,  10,  20,  30,  40) == F( 10,  20,  30,  40) &&
+     f(0, -10,  20, -30,  40) == F(-10,  20, -30,  40) &&
+     f(0,  10, -20,  30, -40) == F( 10, -20,  30, -40) &&
+     f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f4(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F4(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f8(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F8(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f4(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F4(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f8(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F8(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL));
+
diff --git a/codeb/codea_mrstrcmp_14.instr b/codeb/codea_mrstrcmp_14.instr
new file mode 100644 (file)
index 0000000..900731f
--- /dev/null
@@ -0,0 +1 @@
+64
diff --git a/codeb/codea_mrstrcmp_15.0 b/codeb/codea_mrstrcmp_15.0
new file mode 100644 (file)
index 0000000..f175bdc
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return (a or 0x0A) or (0x50 or b);
+end;
diff --git a/codeb/codea_mrstrcmp_15.call b/codeb/codea_mrstrcmp_15.call
new file mode 100644 (file)
index 0000000..f61301e
--- /dev/null
@@ -0,0 +1,4 @@
+long f(long, long, long);
+
+RET(f(0, 0x00, 0x00) == 0x5A);
+
diff --git a/codeb/codea_mrstrcmp_15.instr b/codeb/codea_mrstrcmp_15.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/codeb/codea_mrstrcmp_16.0 b/codeb/codea_mrstrcmp_16.0
new file mode 100644 (file)
index 0000000..ec04302
--- /dev/null
@@ -0,0 +1,3 @@
+method f(a b)
+       return (a = 0x0A) = (0x50 = b);
+end;
diff --git a/codeb/codea_mrstrcmp_16.call b/codeb/codea_mrstrcmp_16.call
new file mode 100644 (file)
index 0000000..723a087
--- /dev/null
@@ -0,0 +1,7 @@
+long f(long, long, long);
+
+RET(f(0, 0x00, 0x00) == 1 &&
+    f(0, 0x0A, 0xFF) == 0 &&
+    f(0, 0xFF, 0x50) == 0 &&
+    f(0, 0x0A, 0x50) == 1);
+
diff --git a/codeb/codea_mrstrcmp_16.instr b/codeb/codea_mrstrcmp_16.instr
new file mode 100644 (file)
index 0000000..425151f
--- /dev/null
@@ -0,0 +1 @@
+40
diff --git a/codeb/codea_mrstrcmp_17.0 b/codeb/codea_mrstrcmp_17.0
new file mode 100644 (file)
index 0000000..209c6f5
--- /dev/null
@@ -0,0 +1,16 @@
+method f(a)
+       return (a < 0x0A);
+end;
+
+method g(a)
+       return (0x0A < a);
+end;
+
+method h()
+       return (0x0A < 0x09);
+end;
+
+method i()
+       return (0x0A < 0x0B);
+end;
+
diff --git a/codeb/codea_mrstrcmp_17.call b/codeb/codea_mrstrcmp_17.call
new file mode 100644 (file)
index 0000000..df80c78
--- /dev/null
@@ -0,0 +1,18 @@
+long f(long, long);
+long g(long, long);
+long h(long);
+long i(long);
+
+RET(f(0,  0x05) == 1 &&
+    f(0, -0x05) == 1 &&
+    f(0,  0x0A) == 0 &&
+    f(0,  0x0B) == 0 &&
+
+    g(0,  0x05) == 0 &&
+    g(0, -0x05) == 0 &&
+    g(0,  0x0A) == 0 &&
+    g(0,  0x0B) == 1 &&
+
+    h(0)        == 0 &&
+    i(0)        == 1);
+
diff --git a/codeb/codea_mrstrcmp_17.instr b/codeb/codea_mrstrcmp_17.instr
new file mode 100644 (file)
index 0000000..7facc89
--- /dev/null
@@ -0,0 +1 @@
+36
diff --git a/codeb/codea_skinner33_00.0 b/codeb/codea_skinner33_00.0
new file mode 100644 (file)
index 0000000..b8ed559
--- /dev/null
@@ -0,0 +1,11 @@
+method w()
+       return not this;
+end;
+
+method x()
+       return not (not this);
+end;
+
+method y()
+       return not (not (not this));
+end;
diff --git a/codeb/codea_skinner33_00.call b/codeb/codea_skinner33_00.call
new file mode 100644 (file)
index 0000000..bc046a1
--- /dev/null
@@ -0,0 +1,5 @@
+long w(long);
+long x(long);
+long y(long);
+
+RET(w(6)==0 && x(4)==1 && y(8)==0 && w(5) == 0 && x(3) == 1 && y(7) == 0 && w(0) == 1 && x(0) == 0 && y(0) == 1);
diff --git a/codeb/codea_skinner33_00.instr b/codeb/codea_skinner33_00.instr
new file mode 100644 (file)
index 0000000..7facc89
--- /dev/null
@@ -0,0 +1 @@
+36
diff --git a/codeb/codea_skinner33_01.0 b/codeb/codea_skinner33_01.0
new file mode 100644 (file)
index 0000000..25fab69
--- /dev/null
@@ -0,0 +1,23 @@
+method w()
+       return not 0;
+end;
+
+method x()
+       return not (not 0);
+end;
+
+method y()
+       return not 3;
+end;
+
+method z()
+       return not (not 3);
+end;
+
+method aa()
+       return not (not (not 0));
+end;
+
+method ab()
+       return not (not (not 3));
+end;
diff --git a/codeb/codea_skinner33_01.call b/codeb/codea_skinner33_01.call
new file mode 100644 (file)
index 0000000..af3f291
--- /dev/null
@@ -0,0 +1,8 @@
+long w(long);
+long x(long);
+long y(long);
+long z(long);
+long aa(long);
+long ab(long);
+
+RET(w(0xDEAD)==1 && x(1337)==0 && y(42)==0 && z(3141) == 1 && aa(0xabc) == 1 && ab(0xdef) == 0);
diff --git a/codeb/codea_skinner33_01.instr b/codeb/codea_skinner33_01.instr
new file mode 100644 (file)
index 0000000..48082f7
--- /dev/null
@@ -0,0 +1 @@
+12
diff --git a/codeb/codea_skinner33_02.0 b/codeb/codea_skinner33_02.0
new file mode 100644 (file)
index 0000000..03a1db6
--- /dev/null
@@ -0,0 +1,11 @@
+method w(a)
+       return not a;
+end;
+
+method x(a)
+       return not (not a);
+end;
+
+method y(a)
+       return not (not (not a));
+end;
diff --git a/codeb/codea_skinner33_02.call b/codeb/codea_skinner33_02.call
new file mode 100644 (file)
index 0000000..0af1b55
--- /dev/null
@@ -0,0 +1,5 @@
+long w(long,long);
+long x(long,long);
+long y(long,long);
+
+RET(w(6,6)==0 && x(4,4)==1 && y(8,8)==0 && w(5,5) == 0 && x(3,3) == 1 && y(7,7) == 0 && w(0,0) == 1 && x(0,0) == 0 && y(0,0) == 1);
diff --git a/codeb/codea_skinner33_02.instr b/codeb/codea_skinner33_02.instr
new file mode 100644 (file)
index 0000000..7facc89
--- /dev/null
@@ -0,0 +1 @@
+36
diff --git a/codeb/codea_skinner33_03.0 b/codeb/codea_skinner33_03.0
new file mode 100644 (file)
index 0000000..126a981
--- /dev/null
@@ -0,0 +1,13 @@
+struct a b c end;
+
+method try0()
+       return (0x000FFFFB - -5).c;
+end;
+
+method try1()
+       return (0x00FFFFFD - -3).c;
+end;
+
+method try2()
+       return (0x9FFFFFFB - -5).c;
+end;
diff --git a/codeb/codea_skinner33_03.call b/codeb/codea_skinner33_03.call
new file mode 100644 (file)
index 0000000..60973c5
--- /dev/null
@@ -0,0 +1,48 @@
+#define TRIES 3
+
+/* ugly. copied from 'bits/mman.h' */
+#define PROT_READ      0x1
+#define PROT_WRITE     0x2
+#define MAP_PRIVATE    0x02
+#define MAP_FIXED      0x10
+#define MAP_ANONYMOUS  0x20
+
+void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+
+long try0(long);
+long try1(long);
+long try2(long);
+
+/* try these adresses until one is free */
+long *tries[TRIES] = {
+       (long *)0x00100000,
+       (long *)0x01000000,
+       (long *)0xA0000000
+};
+
+int   t    = 0;
+long *addr = NULL;
+
+for (t = 0; t < TRIES; t++) {
+       addr = mmap(tries[t], 4096, PROT_READ | PROT_WRITE,
+                   MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0);
+
+       if (tries[t] == addr)
+               break;
+}
+
+if ((void *)-1 == addr) {
+       puts("unable to map memory");
+       RET(1); /* keep the statistic clean */
+}
+
+addr[2] = 1337;
+
+printf("try %d\n", t);
+
+switch (t) {
+case 0:        RET(try0(0xcafebabe) == 1337);
+case 1:        RET(try1(0xcafebabe) == 1337);
+case 2:        RET(try2(0xcafebabe) == 1337);
+}
+
diff --git a/codeb/codea_skinner33_03.instr b/codeb/codea_skinner33_03.instr
new file mode 100644 (file)
index 0000000..0cfbf08
--- /dev/null
@@ -0,0 +1 @@
+2
diff --git a/codeb/codea_skinner33_04.0 b/codeb/codea_skinner33_04.0
new file mode 100644 (file)
index 0000000..10b8940
--- /dev/null
@@ -0,0 +1,15 @@
+method f1(a b)
+       return a - (-3 * b);
+end;
+
+method f2(a b)
+       return a - (2 * b);
+end;
+
+method f3(a b)
+       return a - (5 * b);
+end;
+
+method  f(a b c d)
+        return a - (8 * (b - (-4 * (c - (-3 * d)))));
+end;
diff --git a/codeb/codea_skinner33_04.call b/codeb/codea_skinner33_04.call
new file mode 100644 (file)
index 0000000..d83320d
--- /dev/null
@@ -0,0 +1,50 @@
+#define F1(a,b)     ((long)(a) - (-3UL * (long)(b)))
+#define F2(a,b)     ((long)(a) - (2UL * (long)(b)))
+#define F3(a,b)     ((long)(a) - (5UL * (long)(b)))
+#define  F(a,b,c,d) ((long)(a) - (8UL * ((long)(b) - (-4UL * ((long)(c) - (-3UL * (long)(d)))))))
+
+/* based on mrstrcmp_13
+   in our language the lea opts are only possible for -1, -2, -4 and -8
+   this testcase tests other constants
+*/
+
+long f1(long, long, long);
+long f2(long, long, long);
+long f3(long, long, long);
+long f(long, long, long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f3(0,    3,  20) == F3(   3,  20) &&
+    f3(0, -100,  80) == F3(-100,  80) &&
+    f3(0,   50,  -9) == F3(  50,  -9) &&
+    f3(0,  -77, -50) == F3( -77, -50) &&
+
+    f(0,  10,  20,  30,  40) == F( 10,  20,  30,  40) &&
+    f(0, -10,  20, -30,  40) == F(-10,  20, -30,  40) &&
+    f(0,  10, -20,  30, -40) == F( 10, -20,  30, -40) &&
+    f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_04.instr b/codeb/codea_skinner33_04.instr
new file mode 100644 (file)
index 0000000..b16e5f7
--- /dev/null
@@ -0,0 +1 @@
+104
diff --git a/codeb/codea_skinner33_05.0 b/codeb/codea_skinner33_05.0
new file mode 100644 (file)
index 0000000..e680181
--- /dev/null
@@ -0,0 +1,11 @@
+method f1(a b)
+       return (-3 * b) - a;
+end;
+
+method f2(a b)
+       return (2 * b) - a;
+end;
+
+method f3(a b)
+       return (5 * b) - a;
+end;
diff --git a/codeb/codea_skinner33_05.call b/codeb/codea_skinner33_05.call
new file mode 100644 (file)
index 0000000..5c88f7a
--- /dev/null
@@ -0,0 +1,43 @@
+#define F1(a,b)     ((-3UL * (long)(b)) - (long)(a))
+#define F2(a,b)     ((2UL * (long)(b)) - (long)(a))
+#define F3(a,b)     ((5UL * (long)(b)) - (long)(a))
+
+
+/* based on mrstrcmp_13
+   this testcase tests an other order of ops where no lea is possible
+*/
+
+long f1(long, long, long);
+long f2(long, long, long);
+long f3(long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f3(0,    3,  20) == F3(   3,  20) &&
+    f3(0, -100,  80) == F3(-100,  80) &&
+    f3(0,   50,  -9) == F3(  50,  -9) &&
+    f3(0,  -77, -50) == F3( -77, -50) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_05.instr b/codeb/codea_skinner33_05.instr
new file mode 100644 (file)
index 0000000..fb1e7bc
--- /dev/null
@@ -0,0 +1 @@
+54
diff --git a/codeb/codea_skinner33_06.0 b/codeb/codea_skinner33_06.0
new file mode 100644 (file)
index 0000000..cc943e1
--- /dev/null
@@ -0,0 +1,15 @@
+method f1(a b)
+       return a - (b * -3);
+end;
+
+method f2(a b)
+       return a - (b * 2);
+end;
+
+method f3(a b)
+       return a - (b * 5);
+end;
+
+method  f(a b c d)
+        return a - ((b - ((c - (d * -3)) * -4)) * 8);
+end;
diff --git a/codeb/codea_skinner33_06.call b/codeb/codea_skinner33_06.call
new file mode 100644 (file)
index 0000000..7ea7701
--- /dev/null
@@ -0,0 +1,50 @@
+#define F1(a,b)     ((long)(a) - ((long)(b) * -3UL))
+#define F2(a,b)     ((long)(a) - ((long)(b) * 2UL))
+#define F3(a,b)     ((long)(a) - ((long)(b) * 5UL))
+#define  F(a,b,c,d) ((long)(a) - (8UL * ((long)(b) - (-4UL * ((long)(c) - (-3UL * (long)(d)))))))
+
+
+/* based on mrstrcmp_14
+   in our language the lea opts are only possible for -1, -2, -4 and -8
+   this testcase tests other constants and other op order in mul
+*/
+
+long f1(long, long, long);
+long f2(long, long, long);
+long f3(long, long, long);
+long f(long, long, long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f3(0,    3,  20) == F3(   3,  20) &&
+    f3(0, -100,  80) == F3(-100,  80) &&
+    f3(0,   50,  -9) == F3(  50,  -9) &&
+    f3(0,  -77, -50) == F3( -77, -50) &&
+
+    f(0,  10,  20,  30,  40) == F( 10,  20,  30,  40) &&
+    f(0, -10,  20, -30,  40) == F(-10,  20, -30,  40) &&
+    f(0,  10, -20,  30, -40) == F( 10, -20,  30, -40) &&
+    f(0, -10, -20, -30, -40) == F(-10, -20, -30, -40) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F3(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f3(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F3(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) 
+   );
diff --git a/codeb/codea_skinner33_06.instr b/codeb/codea_skinner33_06.instr
new file mode 100644 (file)
index 0000000..b16e5f7
--- /dev/null
@@ -0,0 +1 @@
+104
diff --git a/codeb/codea_skinner33_07.0 b/codeb/codea_skinner33_07.0
new file mode 100644 (file)
index 0000000..3191ec2
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b c)
+       return a - ((b - c) * -2);
+end;
+
+method f2(a b c)
+       return a - ((b - c) * -3);
+end;
diff --git a/codeb/codea_skinner33_07.call b/codeb/codea_skinner33_07.call
new file mode 100644 (file)
index 0000000..62902cc
--- /dev/null
@@ -0,0 +1,28 @@
+#define F1(a,b,c)     ((long)(a) -(((long)(b) - (long)(c)) * -2UL))
+#define F2(a,b,c)     ((long)(a) -(((long)(b) - (long)(c)) * -3UL))
+
+
+long f1(long, long, long, long);
+long f2(long, long, long, long);
+
+RET(f1(0,    3,  20, 15) == F1(   3,  20, 15) &&
+    f1(0, -100,  80, 23) == F1(-100,  80, 23) &&
+    f1(0,   50,  -9, -5) == F1(  50,  -9, -5) &&
+    f1(0,  -77, -50, 87) == F1( -77, -50, 87) &&
+
+       f2(0,    3,  20, 15) == F2(   3,  20, 15) &&
+    f2(0, -100,  80, 23) == F2(-100,  80, 23) &&
+    f2(0,   50,  -9, -5) == F2(  50,  -9, -5) &&
+    f2(0,  -77, -50, 87) == F2( -77, -50, 87) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_07.instr b/codeb/codea_skinner33_07.instr
new file mode 100644 (file)
index 0000000..abdfb05
--- /dev/null
@@ -0,0 +1 @@
+60
diff --git a/codeb/codea_skinner33_08.0 b/codeb/codea_skinner33_08.0
new file mode 100644 (file)
index 0000000..55a4687
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b c)
+       return a - (-2 * (b - c));
+end;
+
+method f2(a b c)
+       return a - (-3 * (b - c));
+end;
diff --git a/codeb/codea_skinner33_08.call b/codeb/codea_skinner33_08.call
new file mode 100644 (file)
index 0000000..2fbb006
--- /dev/null
@@ -0,0 +1,28 @@
+#define F1(a,b,c)     ((long)(a) -(-2UL * ((long)(b) - (long)(c))))
+#define F2(a,b,c)     ((long)(a) -(-3UL * ((long)(b) - (long)(c))))
+
+
+long f1(long, long, long, long);
+long f2(long, long, long, long);
+
+RET(f1(0,    3,  20, 15) == F1(   3,  20, 15) &&
+    f1(0, -100,  80, 23) == F1(-100,  80, 23) &&
+    f1(0,   50,  -9, -5) == F1(  50,  -9, -5) &&
+    f1(0,  -77, -50, 87) == F1( -77, -50, 87) &&
+
+       f2(0,    3,  20, 15) == F2(   3,  20, 15) &&
+    f2(0, -100,  80, 23) == F2(-100,  80, 23) &&
+    f2(0,   50,  -9, -5) == F2(  50,  -9, -5) &&
+    f2(0,  -77, -50, 87) == F2( -77, -50, 87) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_08.instr b/codeb/codea_skinner33_08.instr
new file mode 100644 (file)
index 0000000..abdfb05
--- /dev/null
@@ -0,0 +1 @@
+60
diff --git a/codeb/codea_skinner33_09.0 b/codeb/codea_skinner33_09.0
new file mode 100644 (file)
index 0000000..ae8403d
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b c)
+       return ((b - c) * -2) - a;
+end;
+
+method f2(a b c)
+       return ((b - c) * -3) - a;
+end;
diff --git a/codeb/codea_skinner33_09.call b/codeb/codea_skinner33_09.call
new file mode 100644 (file)
index 0000000..224059c
--- /dev/null
@@ -0,0 +1,28 @@
+#define F1(a,b,c)     ((((long)(b) - (long)(c)) * -2UL) - (long)(a))
+#define F2(a,b,c)     ((((long)(b) - (long)(c)) * -3UL) - (long)(a))
+
+
+long f1(long, long, long, long);
+long f2(long, long, long, long);
+
+RET(f1(0,    3,  20, 15) == F1(   3,  20, 15) &&
+    f1(0, -100,  80, 23) == F1(-100,  80, 23) &&
+    f1(0,   50,  -9, -5) == F1(  50,  -9, -5) &&
+    f1(0,  -77, -50, 87) == F1( -77, -50, 87) &&
+
+       f2(0,    3,  20, 15) == F2(   3,  20, 15) &&
+    f2(0, -100,  80, 23) == F2(-100,  80, 23) &&
+    f2(0,   50,  -9, -5) == F2(  50,  -9, -5) &&
+    f2(0,  -77, -50, 87) == F2( -77, -50, 87) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_09.instr b/codeb/codea_skinner33_09.instr
new file mode 100644 (file)
index 0000000..abdfb05
--- /dev/null
@@ -0,0 +1 @@
+60
diff --git a/codeb/codea_skinner33_10.0 b/codeb/codea_skinner33_10.0
new file mode 100644 (file)
index 0000000..6c08195
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b c)
+       return (-2 * (b - c)) - a;
+end;
+
+method f2(a b c)
+       return (-3 * (b - c)) - a;
+end;
diff --git a/codeb/codea_skinner33_10.call b/codeb/codea_skinner33_10.call
new file mode 100644 (file)
index 0000000..a2eb7e9
--- /dev/null
@@ -0,0 +1,28 @@
+#define F1(a,b,c)     ((-2UL * ((long)(b) - (long)(c))) - (long)(a))
+#define F2(a,b,c)     ((-3UL * ((long)(b) - (long)(c))) - (long)(a))
+
+
+long f1(long, long, long, long);
+long f2(long, long, long, long);
+
+RET(f1(0,    3,  20, 15) == F1(   3,  20, 15) &&
+    f1(0, -100,  80, 23) == F1(-100,  80, 23) &&
+    f1(0,   50,  -9, -5) == F1(  50,  -9, -5) &&
+    f1(0,  -77, -50, 87) == F1( -77, -50, 87) &&
+
+       f2(0,    3,  20, 15) == F2(   3,  20, 15) &&
+    f2(0, -100,  80, 23) == F2(-100,  80, 23) &&
+    f2(0,   50,  -9, -5) == F2(  50,  -9, -5) &&
+    f2(0,  -77, -50, 87) == F2( -77, -50, 87) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL)
+   );
+
diff --git a/codeb/codea_skinner33_10.instr b/codeb/codea_skinner33_10.instr
new file mode 100644 (file)
index 0000000..abdfb05
--- /dev/null
@@ -0,0 +1 @@
+60
diff --git a/codeb/codea_skinner33_11.0 b/codeb/codea_skinner33_11.0
new file mode 100644 (file)
index 0000000..2aebf85
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b)
+       return (a - b) - (-3 * b);
+end;
+
+method f2(a b)
+       return (a -b) - (-2 * b);
+end;
diff --git a/codeb/codea_skinner33_11.call b/codeb/codea_skinner33_11.call
new file mode 100644 (file)
index 0000000..3c9cdce
--- /dev/null
@@ -0,0 +1,27 @@
+#define F1(a,b)     (((long)(a) - (long)(b)) - (-3UL * (long)(b)))
+#define F2(a,b)     (((long)(a) - (long)(b)) - (-2UL * (long)(b)))
+
+long f1(long, long, long);
+long f2(long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) 
+   );
+
diff --git a/codeb/codea_skinner33_11.instr b/codeb/codea_skinner33_11.instr
new file mode 100644 (file)
index 0000000..fb1e7bc
--- /dev/null
@@ -0,0 +1 @@
+54
diff --git a/codeb/codea_skinner33_12.0 b/codeb/codea_skinner33_12.0
new file mode 100644 (file)
index 0000000..1835cfe
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b)
+       return (a - b) - (b * -3);
+end;
+
+method f2(a b)
+       return (a -b) - (b * -2);
+end;
diff --git a/codeb/codea_skinner33_12.call b/codeb/codea_skinner33_12.call
new file mode 100644 (file)
index 0000000..f18e5a2
--- /dev/null
@@ -0,0 +1,27 @@
+#define F1(a,b)     (((long)(a) - (long)(b)) - ((long)(b) * -3UL))
+#define F2(a,b)     (((long)(a) - (long)(b)) - ((long)(b)* -2UL))
+
+long f1(long, long, long);
+long f2(long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) 
+   );
+
diff --git a/codeb/codea_skinner33_12.instr b/codeb/codea_skinner33_12.instr
new file mode 100644 (file)
index 0000000..fb1e7bc
--- /dev/null
@@ -0,0 +1 @@
+54
diff --git a/codeb/codea_skinner33_13.0 b/codeb/codea_skinner33_13.0
new file mode 100644 (file)
index 0000000..5cf8b8b
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b)
+       return (a - b) - (-3 * (b - a));
+end;
+
+method f2(a b)
+       return (a - b) - (-2 * (b - a));
+end;
diff --git a/codeb/codea_skinner33_13.call b/codeb/codea_skinner33_13.call
new file mode 100644 (file)
index 0000000..77dace7
--- /dev/null
@@ -0,0 +1,27 @@
+#define F1(a,b)     (((long)(a) - (long)(b)) - (-3UL * ((long)(b) - (long)(a))))
+#define F2(a,b)     (((long)(a) - (long)(b)) - (-2UL  * ((long)(b) - (long)(a))))
+
+long f1(long, long, long);
+long f2(long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) 
+   );
+
diff --git a/codeb/codea_skinner33_13.instr b/codeb/codea_skinner33_13.instr
new file mode 100644 (file)
index 0000000..8e14edc
--- /dev/null
@@ -0,0 +1 @@
+78
diff --git a/codeb/codea_skinner33_14.0 b/codeb/codea_skinner33_14.0
new file mode 100644 (file)
index 0000000..f03aab8
--- /dev/null
@@ -0,0 +1,7 @@
+method f1(a b)
+       return (a - b) - ((b - a) * -3);
+end;
+
+method f2(a b)
+       return (a - b) - ((b - a) * -2);
+end;
diff --git a/codeb/codea_skinner33_14.call b/codeb/codea_skinner33_14.call
new file mode 100644 (file)
index 0000000..714f7bd
--- /dev/null
@@ -0,0 +1,27 @@
+#define F1(a,b)     (((long)(a) - (long)(b)) - (((long)(b) -(long)(a))* -3UL))
+#define F2(a,b)     (((long)(a) - (long)(b)) - (((long)(b) -(long)(a))* -2UL))
+
+long f1(long, long, long);
+long f2(long, long, long);
+
+RET(f1(0,    3,  20) == F1(   3,  20) &&
+    f1(0, -100,  80) == F1(-100,  80) &&
+    f1(0,   50,  -9) == F1(  50,  -9) &&
+    f1(0,  -77, -50) == F1( -77, -50) &&
+
+    f2(0,    3,  20) == F2(   3,  20) &&
+    f2(0, -100,  80) == F2(-100,  80) &&
+    f2(0,   50,  -9) == F2(  50,  -9) &&
+    f2(0,  -77, -50) == F2( -77, -50) &&
+
+    f1(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F1(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) ==
+       F2(0x7FFFFFFFFFFFFFFFUL, 0x7FFFFFFFFFFFFFFFUL) &&
+
+    f1(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F1(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) &&
+    f2(0, 0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) ==
+       F2(0x8FFFFFFFFFFFFFFFUL, 0x8FFFFFFFFFFFFFFFUL) 
+   );
+
diff --git a/codeb/codea_skinner33_14.instr b/codeb/codea_skinner33_14.instr
new file mode 100644 (file)
index 0000000..8e14edc
--- /dev/null
@@ -0,0 +1 @@
+78
diff --git a/codeb/codea_skinner33_15.0 b/codeb/codea_skinner33_15.0
new file mode 100644 (file)
index 0000000..028c96d
--- /dev/null
@@ -0,0 +1,85 @@
+struct foo bar end;
+
+method f1(a b)
+       return 4 or 5;
+end;
+
+method f2(a b)
+       return a.foo or 0x55555555;
+end;
+
+method f3(a b)
+       return 0x55555555 or b.bar;
+end;
+
+method f4(a b)
+       return (a.bar - b.foo) or (a.foo - b.bar);
+end;
+
+method f5(a b)
+       return (a.bar < b.foo) or this;
+end;
+
+method f6(a b)
+       return this or (b.bar =  a.foo);
+end;
+
+method f7(a b)
+       return a or b;
+end;
+
+method f8(a b)
+       return this or 0x112233;
+end;
+
+method f9(a b)
+       return 0x11EEEEFF or this;
+end;
+
+method f10(a b)
+       return (a.foo - 5) or 6;
+end;
+
+method f11(a b)
+       return 7 or (b.bar - 3);
+end;
+
+method f12(a b)
+       return (a.bar - 3) or b.foo;
+end;
+
+method f13(a b)
+       return a.foo or (b.bar - -3);
+end;
+
+method f14(a b)
+       return this or a.foo;
+end;
+
+method f15(a b)
+       return b.bar or this;
+end;
+
+method f16(a b)
+       return b.bar or 0;
+end;
+
+method f17(a b)
+       return 0 or a.foo;
+end;
+
+method f18(a b)
+       return 0 or this;
+end;
+
+method f19(a b)
+       return this or 0;
+end;
+
+method f20(a b)
+       return 0 or (b.foo * 1);
+end;
+
+method f21(a b)
+       return (a.foo * 1) or 0;
+end;
diff --git a/codeb/codea_skinner33_15.call b/codeb/codea_skinner33_15.call
new file mode 100644 (file)
index 0000000..371933d
--- /dev/null
@@ -0,0 +1,50 @@
+#define OR(a,b)     ((long)(a) | (long)(b))
+
+long  f1(long, long*, long*);
+long  f2(long, long*, long*);
+long  f3(long, long*, long*);
+long  f4(long, long*, long*);
+long  f5(long, long*, long*);
+long  f6(long, long*, long*);
+long  f7(long, long*, long*);
+long  f8(long, long*, long*);
+long  f9(long, long*, long*);
+long f10(long, long*, long*);
+long f11(long, long*, long*);
+long f12(long, long*, long*);
+long f13(long, long*, long*);
+long f14(long, long*, long*);
+long f15(long, long*, long*);
+long f16(long, long*, long*);
+long f17(long, long*, long*);
+long f18(long, long*, long*);
+long f19(long, long*, long*);
+long f20(long, long*, long*);
+long f21(long, long*, long*);
+
+long muh[] = {0x05f05f, 0x223344};
+long kuh[] = {0x00AACC, 0x563425};
+
+RET( f1(5, muh, kuh) == OR(            4,             5) &&
+     f2(5, muh, kuh) == OR(       muh[0],    0x55555555) &&
+     f3(5, muh, kuh) == OR(   0x55555555,        kuh[1]) &&
+     f4(5, muh, kuh) == OR(muh[1]-kuh[0], muh[0]-kuh[1]) &&
+     f5(5, muh, kuh) == OR(            0,             5) &&
+     f6(5, muh, kuh) == OR(            5,             0) &&
+     f7(5, muh, kuh) == OR(          muh,           kuh) &&
+     f8(5, muh, kuh) == OR(            5,      0x112233) &&
+     f9(5, muh, kuh) == OR(   0x11EEEEFF,             5) &&
+    f10(5, muh, kuh) == OR(     muh[0]-5,             6) &&
+    f11(5, muh, kuh) == OR(            7,      kuh[1]-3) &&
+    f12(5, muh, kuh) == OR(     muh[1]-3,        kuh[0]) &&
+    f13(5, muh, kuh) == OR(       muh[0],      kuh[1]+3) &&
+    f14(5, muh, kuh) == OR(            5,        muh[0]) &&
+    f15(5, muh, kuh) == OR(       kuh[1],             5) &&
+    f16(5, muh, kuh) == OR(       kuh[1],             0) &&
+    f17(5, muh, kuh) == OR(            0,        muh[0]) &&
+    f18(5, muh, kuh) == OR(            0,             5) &&
+    f19(5, muh, kuh) == OR(            5,             0) &&
+    f20(5, muh, kuh) == OR(            0,        kuh[0]) &&
+    f21(5, muh, kuh) == OR(       muh[0],             0) 
+   );
+
diff --git a/codeb/codea_skinner33_15.instr b/codeb/codea_skinner33_15.instr
new file mode 100644 (file)
index 0000000..b5489e5
--- /dev/null
@@ -0,0 +1 @@
+69
diff --git a/codeb/codea_skinner33_16.0 b/codeb/codea_skinner33_16.0
new file mode 100644 (file)
index 0000000..ddec0ea
--- /dev/null
@@ -0,0 +1,33 @@
+struct foo bar end;
+
+method f1(a)
+       return not(this-a.bar);
+end;
+
+method f2(a)
+       return not(a.foo);
+end;
+
+method f3(a)
+       return not(not(a.foo));
+end;
+
+method f4(a)
+       return not(a.bar);
+end;
+
+method f5(a)
+       return not(not(a.bar));
+end;
+
+method f6(a)
+       return not(not(a.foo - a.bar));
+end;
+
+method f7(a)
+       return not(not(a.foo * a.bar));
+end;
+
+method f8(a)
+       return not(this*a.bar);
+end;
diff --git a/codeb/codea_skinner33_16.call b/codeb/codea_skinner33_16.call
new file mode 100644 (file)
index 0000000..fba7203
--- /dev/null
@@ -0,0 +1,25 @@
+long f1(long, long*);
+long f2(long, long*);
+long f3(long, long*);
+long f4(long, long*);
+long f5(long, long*);
+long f6(long, long*);
+long f7(long, long*);
+long f8(long, long*);
+
+long muh[] = {6,4};
+long kuh[] = {1,0};
+long zod[] = {0,1};
+long pui[] = {1,1};
+
+printf("%d = %d , %d = %d, %d = %d, %d = %d \n", f8(5,muh) ,  1 ,  f8(4,muh) ,  1 ,  f8(0,muh) ,  0 ,  f8(0,zod) ,  0 );
+
+RET(f1(5,muh) == 0 && f1(4,muh) == 1 &&
+       f2(5,kuh) == 0 && f2(5,zod) == 1 &&
+       f3(5,kuh) == 1 && f3(5,zod) == 0 && f3(5,muh) == 1 &&
+       f4(5,kuh) == 1 && f4(5,zod) == 0 && f4(5,muh) == 0 &&
+       f5(5,kuh) == 0 && f5(5,zod) == 1 &&
+       f6(5,muh) == 1 && f6(5,kuh) == 1 && f6(5,pui) == 0 &&
+       f7(5,muh) == 1 && f7(5,kuh) == 0 && f7(5,pui) == 1 && 
+       f8(5,muh) == 0 && f8(4,muh) == 0 && f8(0,muh) == 1 && f8(0,zod) == 1 
+   );
diff --git a/codeb/codea_skinner33_16.instr b/codeb/codea_skinner33_16.instr
new file mode 100644 (file)
index 0000000..a57f6ce
--- /dev/null
@@ -0,0 +1 @@
+131
diff --git a/codeb/codea_skinner33_17.0 b/codeb/codea_skinner33_17.0
new file mode 100644 (file)
index 0000000..e6f4035
--- /dev/null
@@ -0,0 +1,45 @@
+struct foo bar end;
+
+method f1(a)
+       return 5 * a.foo;
+end;
+
+method f2(a)
+       return a.bar * this;
+end;
+
+method f3(a)
+       return (a.foo-3) < (a.bar-3);
+end;
+
+method f4(a)
+       return (a.foo*1) < 6;
+end;
+
+method f5(a)
+       return 5 < (a.bar * 1);
+end;
+
+method f6(a)
+       return (1 * a.foo) < this;
+end;
+
+method f7(a)
+       return a.foo < (a.bar * 1);
+end;
+
+method f8(a)
+       return a.foo < this;
+end;
+
+method f9(a)
+       return this < a.bar;
+end;
+
+method f10(a)
+       return a.foo < 6;
+end;
+
+method f11(a)
+       return 5 < a.bar;
+end;
diff --git a/codeb/codea_skinner33_17.call b/codeb/codea_skinner33_17.call
new file mode 100644 (file)
index 0000000..ae188f3
--- /dev/null
@@ -0,0 +1,28 @@
+
+long f1(long, long*);
+long f2(long, long*);
+long f3(long, long*);
+long f4(long, long*);
+long f5(long, long*);
+long f6(long, long*);
+long f7(long, long*);
+long f8(long, long*);
+long f9(long, long*);
+long f10(long, long*);
+long f11(long, long*);
+
+long muh[] = {5, 6};
+long kuh[] = {6, 5};
+
+RET(f1(4,muh) == 25 &&
+       f2(5,muh) == 30 &&
+       f3(5,muh) == 1 && f3(5,kuh) == 0 &&
+       f4(5,muh) == 1 && f4(5,kuh) == 0 &&
+       f5(5,muh) == 1 && f5(5,kuh) == 0 &&
+       f6(6,muh) == 1 && f6(6,kuh) == 0 &&
+       f7(5,muh) == 1 && f7(5,kuh) == 0 &&
+       f8(5,muh) == 0 && f8(7,kuh) == 1 &&
+       f9(5,muh) == 1 && f9(5,kuh) == 0 &&
+       f10(5,muh) == 1 && f10(5,kuh) == 0 &&
+       f11(5,muh) == 1 && f11(5,kuh) == 0
+);
diff --git a/codeb/codea_skinner33_17.instr b/codeb/codea_skinner33_17.instr
new file mode 100644 (file)
index 0000000..c67f579
--- /dev/null
@@ -0,0 +1 @@
+93
diff --git a/codeb/codea_skinner33_18.0 b/codeb/codea_skinner33_18.0
new file mode 100644 (file)
index 0000000..41e359c
--- /dev/null
@@ -0,0 +1,38 @@
+struct foo bar end;
+
+method f1(a)
+       return (a.foo * 1) = 5;
+end;
+
+method f2(a)
+       return 5 = (a.bar * 1);
+end;
+
+method f3(a)
+       return (a.foo * 1) = this;
+end;
+
+method f4(a)
+       return this = (a.bar * 1);
+end;
+
+method f5(a)
+       return a.foo = (this * 1);
+end;
+
+method f6(a)
+       return a.foo = 5;
+end;
+
+method f7(a)
+       return 5 = a.bar;
+end;
+
+method f8(a)
+       return a.foo = this;
+end;
+
+method f9(a)
+       return this = a.bar;
+end;
+
diff --git a/codeb/codea_skinner33_18.call b/codeb/codea_skinner33_18.call
new file mode 100644 (file)
index 0000000..f8d0291
--- /dev/null
@@ -0,0 +1,24 @@
+
+long f1(long, long*);
+long f2(long, long*);
+long f3(long, long*);
+long f4(long, long*);
+long f5(long, long*);
+long f6(long, long*);
+long f7(long, long*);
+long f8(long, long*);
+long f9(long, long*);
+
+long muh[] = {5, 6};
+long kuh[] = {6, 5};
+
+RET(f1(4,muh) == 1 && f1(5,kuh) == 0 &&
+       f2(5,muh) == 0 && f2(5,kuh) == 1 &&
+       f3(5,muh) == 1 && f3(5,kuh) == 0 &&
+       f4(5,muh) == 0 && f4(5,kuh) == 1 &&
+       f5(5,muh) == 1 && f5(5,kuh) == 0 &&
+       f6(6,muh) == 1 && f6(6,kuh) == 0 &&
+       f7(5,muh) == 0 && f7(5,kuh) == 1 &&
+       f8(5,muh) == 1 && f8(5,kuh) == 0 &&
+       f9(5,muh) == 0 && f9(5,kuh) == 1 
+);
diff --git a/codeb/codea_skinner33_18.instr b/codeb/codea_skinner33_18.instr
new file mode 100644 (file)
index 0000000..dde92dd
--- /dev/null
@@ -0,0 +1 @@
+82
diff --git a/codeb/codea_skinner33_19.0 b/codeb/codea_skinner33_19.0
new file mode 100644 (file)
index 0000000..3a12e4b
--- /dev/null
@@ -0,0 +1,31 @@
+method f1(a b)
+       return not(a or b);
+end;
+
+method f2(a b)
+       return not(not(a or b));
+end;
+
+method f3(a b)
+       return not(a - b);
+end;
+
+method f4(a b)
+       return not(not(a - b));
+end;
+
+method f5(a b)
+       return not(a < b);
+end;
+
+method f6(a b)
+       return not(not(a < b));
+end;
+
+method f7(a b)
+       return not(a = b);
+end;
+
+method f8(a b)
+       return not(not(a = b));
+end;
diff --git a/codeb/codea_skinner33_19.call b/codeb/codea_skinner33_19.call
new file mode 100644 (file)
index 0000000..2d6d7b8
--- /dev/null
@@ -0,0 +1,22 @@
+long f1(long,long,long);
+long f2(long,long,long);
+long f3(long,long,long);
+long f4(long,long,long);
+long f5(long,long,long);
+long f6(long,long,long);
+long f7(long,long,long);
+long f8(long,long,long);
+
+RET(
+f1(0,0,0) == 1 && f1(0,1,1) == 0 &&
+f2(0,0,0) == 0 && f2(0,1,1) == 1 &&
+
+f3(0,4,4) == 1 && f3(0,4,3) == 0 &&
+f4(0,4,4) == 0 && f4(0,4,3) == 1 &&
+
+f5(0,5,4) == 1 && f5(0,4,5) == 0 &&
+f6(0,5,4) == 0 && f6(0,4,5) == 1 &&
+
+f7(0,5,4) == 1 && f7(0,5,5) == 0 &&
+f8(0,5,4) == 0 && f8(0,5,5) == 1 
+);
diff --git a/codeb/codea_skinner33_19.instr b/codeb/codea_skinner33_19.instr
new file mode 100644 (file)
index 0000000..d22307c
--- /dev/null
@@ -0,0 +1 @@
+88
diff --git a/codeb/codea_snafu_00.0 b/codeb/codea_snafu_00.0
new file mode 100644 (file)
index 0000000..3806e12
--- /dev/null
@@ -0,0 +1,11 @@
+method foo(a b c)
+       return a;
+end;
+
+method bar(a b c)
+       return b;
+end;
+
+method foobar(a b c)
+       return c;
+end;
diff --git a/codeb/codea_snafu_00.call b/codeb/codea_snafu_00.call
new file mode 100644 (file)
index 0000000..000b197
--- /dev/null
@@ -0,0 +1,5 @@
+extern long foo(long this, long, long, long);
+extern long bar(long this, long, long, long);
+extern long foobar(long this, long, long, long);
+
+RET( (foo(0xDEAD, 3, 4, 5) == 3) && (bar(0xDEAD, 3, 4, 5) == 4) && (foobar(0xDEAD, 3, 4, 5) == 5));
diff --git a/codeb/codea_snafu_00.instr b/codeb/codea_snafu_00.instr
new file mode 100644 (file)
index 0000000..1e8b314
--- /dev/null
@@ -0,0 +1 @@
+6
diff --git a/codeb/codea_snafu_01.0 b/codeb/codea_snafu_01.0
new file mode 100644 (file)
index 0000000..3383891
--- /dev/null
@@ -0,0 +1,11 @@
+method a()
+       return 5 - 3;
+end;
+
+method b(x)
+       return 5 - x;
+end;
+
+method c(x)
+       return x - 3;
+end;
diff --git a/codeb/codea_snafu_01.call b/codeb/codea_snafu_01.call
new file mode 100644 (file)
index 0000000..06d5289
--- /dev/null
@@ -0,0 +1,5 @@
+extern long a(long this);
+extern long b(long this, long x);
+extern long c(long this, long x);
+
+RET( (a(0xDEAD) == 2) && (b(0xDEAD, 23) == -18) && (c(0xDEAD, 23) == 20));
diff --git a/codeb/codea_snafu_01.instr b/codeb/codea_snafu_01.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_snafu_02.0 b/codeb/codea_snafu_02.0
new file mode 100644 (file)
index 0000000..5b79633
--- /dev/null
@@ -0,0 +1,11 @@
+method q(x y)
+       return 5 - ((x - 3) - y);
+end;
+
+method r(x y)
+       return (x - y) - 10;
+end;
+
+method s(x y)
+       return 6 - (x - 1);
+end;
diff --git a/codeb/codea_snafu_02.call b/codeb/codea_snafu_02.call
new file mode 100644 (file)
index 0000000..a371164
--- /dev/null
@@ -0,0 +1,5 @@
+extern long q(long this, long, long);
+extern long r(long this, long, long);
+extern long s(long this, long, long);
+
+RET((q(0xDEAD, 33, 15) == -10) && (r(0xDEAD, 33, 15) == 8) && (s(0xDEAD, 33, 15) == -26));
diff --git a/codeb/codea_snafu_02.instr b/codeb/codea_snafu_02.instr
new file mode 100644 (file)
index 0000000..60d3b2f
--- /dev/null
@@ -0,0 +1 @@
+15
diff --git a/codeb/codea_snafu_03.0 b/codeb/codea_snafu_03.0
new file mode 100644 (file)
index 0000000..c43ec47
--- /dev/null
@@ -0,0 +1,11 @@
+method Long(a b c d e)
+       return (a - (e - 20)) - (b - (c - (99 - d)));
+end;
+
+method Loong(a b c d e)
+       return a - (b - (c - (d - (e - (a - (b - (c - (d - (e - 10)))))))));
+end;
+
+method Looong(a b c d e)
+       return (11 - a) - (22 - b) - (33 - c - (44 - d)) - (55 - (77 - e - -66));
+end;
diff --git a/codeb/codea_snafu_03.call b/codeb/codea_snafu_03.call
new file mode 100644 (file)
index 0000000..e5891be
--- /dev/null
@@ -0,0 +1,16 @@
+long Long(long this, long, long, long, long, long);
+long Loong(long this, long, long, long, long, long);
+long Looong(long this, long, long, long, long, long);
+
+long erw1 = 9935366;
+long erw2 = 10;
+long erw3 = 11309;
+long ret1 = Long(0xDEAD, 23, 66, 1024, 9999999, 65535);
+long ret2 = Loong(0xDEAD, 11, 22, 33, 44, 55);
+long ret3 = Looong(0xDEAD, 34, 92934, 2991, 12389, 72281);
+
+printf("Long(erwartet: %i) : %i\n", erw1, ret1);
+printf("Loong(erwartet: %i) : %i\n", erw2, ret2);
+printf("Looong(erwartet: %i) : %i\n", erw3, ret3);
+
+RET(ret1 == erw1 && ret2 == erw2 && ret3 == erw3);
diff --git a/codeb/codea_snafu_03.instr b/codeb/codea_snafu_03.instr
new file mode 100644 (file)
index 0000000..87523dd
--- /dev/null
@@ -0,0 +1 @@
+41
diff --git a/codeb/codea_snafu_04.0 b/codeb/codea_snafu_04.0
new file mode 100644 (file)
index 0000000..aeff3a0
--- /dev/null
@@ -0,0 +1,15 @@
+method pvs1(a b)
+       return (this - a) * b;
+end;
+
+method pvs2(a b)
+       return this - (a * b);
+end;
+
+method pvs3(a b)
+       return (this * a) - b;
+end;
+
+method pvs4(a b)
+       return this * (a - b);
+end;
diff --git a/codeb/codea_snafu_04.call b/codeb/codea_snafu_04.call
new file mode 100644 (file)
index 0000000..7a9fd9a
--- /dev/null
@@ -0,0 +1,7 @@
+long pvs1(long, long, long);
+long pvs2(long, long, long);
+long pvs3(long, long, long);
+long pvs4(long, long, long);
+
+
+RET((pvs1(2,3,5) == -5) && (pvs2(2,3,5) == -13) && (pvs3(2,3,5) == 1) && (pvs4(2,3,5) == -4));
diff --git a/codeb/codea_snafu_04.instr b/codeb/codea_snafu_04.instr
new file mode 100644 (file)
index 0000000..98d9bcb
--- /dev/null
@@ -0,0 +1 @@
+17
diff --git a/codeb/codea_snafu_05.0 b/codeb/codea_snafu_05.0
new file mode 100644 (file)
index 0000000..bb0ff4b
--- /dev/null
@@ -0,0 +1,3 @@
+method meh(a b c d)
+       return (this * (a - b)) - (c - (a * d));
+end;
diff --git a/codeb/codea_snafu_05.call b/codeb/codea_snafu_05.call
new file mode 100644 (file)
index 0000000..49e372a
--- /dev/null
@@ -0,0 +1,3 @@
+long meh(long, long, long, long, long);
+
+RET(meh(2,11,5,15,32) == 349);
diff --git a/codeb/codea_snafu_05.instr b/codeb/codea_snafu_05.instr
new file mode 100644 (file)
index 0000000..45a4fb7
--- /dev/null
@@ -0,0 +1 @@
+8
diff --git a/codeb/codea_snafu_06.0 b/codeb/codea_snafu_06.0
new file mode 100644 (file)
index 0000000..a4acd84
--- /dev/null
@@ -0,0 +1,21 @@
+struct a b end;
+
+method test64()
+       return this - -2139062144;
+end;
+
+method num()
+       return 15 - 4 - 2 - 6 - 7;
+end;
+
+method num2()
+       return 15 - (4 - 2 - 6 - 7);
+end;
+
+method globcmp()
+       return this.a < this.b;
+end;
+
+method globcmp2()
+       return this.a = this.b;
+end;
diff --git a/codeb/codea_snafu_06.call b/codeb/codea_snafu_06.call
new file mode 100644 (file)
index 0000000..ecb435a
--- /dev/null
@@ -0,0 +1,21 @@
+long test64(long);
+long num(long);
+long num2(long);
+long globcmp(long*);
+long globcmp2(long*);
+
+
+long foo[] = {1337, 42};
+long bar[] = {23, 23};
+long foobar[] = {23, 42};
+
+RET((test64(0x1000000000) ==  (long) 0x1000000000 - (int) 0x80808080) 
+       && (num(0) == -4)
+       && (num2(0) == 26)
+       && (globcmp(foo) == 0)
+       && (globcmp(bar) == 0)
+       && (globcmp(foobar) == 1)
+       && (globcmp2(foo) == 0)
+       && (globcmp2(bar) == 1)
+       && (globcmp2(foobar) == 0)
+       );
diff --git a/codeb/codea_snafu_06.instr b/codeb/codea_snafu_06.instr
new file mode 100644 (file)
index 0000000..81b5c5d
--- /dev/null
@@ -0,0 +1 @@
+37