c version output message not matching input, did a C vs Java test of the >> and ...
authorjjenista <jjenista>
Sat, 31 Jul 2010 23:24:34 +0000 (23:24 +0000)
committerjjenista <jjenista>
Sat, 31 Jul 2010 23:24:34 +0000 (23:24 +0000)
Robust/src/Benchmarks/oooJava/C-crypt/crypt.c
Robust/src/Benchmarks/oooJava/C-crypt/makefile
Robust/src/Benchmarks/oooJava/C-crypt/thing.c [new file with mode: 0644]
Robust/src/Benchmarks/oooJava/C-crypt/thing.java [new file with mode: 0644]

index 5bdfed2dad4f063003acc2802e1bca13bac056d2..dec7d1cad97b3a7201464ebf456e97d8fa928c0b 100644 (file)
@@ -55,7 +55,7 @@ void main( int argc, char** argv ) {
   
   startT=currentTimeMillis();
 
-  array_rows = datasizes[size];
+  array_rows = datasizes[problem_size];
   buildTestData();
   
   endT=currentTimeMillis();
index 7cd674a40d613d35a602ec10ea0a2d86799ff915..bc182c9215512e4a31a39bf20fbbdf8f588881fc 100644 (file)
@@ -1,7 +1,7 @@
 all: crypt
 
-crypt: crypt.c
-       gcc crypt.c -o crypt
+crypt: crypt.c makefile
+       gcc -g crypt.c -o crypt
 
 clean:
        rm -f crypt
diff --git a/Robust/src/Benchmarks/oooJava/C-crypt/thing.c b/Robust/src/Benchmarks/oooJava/C-crypt/thing.c
new file mode 100644 (file)
index 0000000..ae5ef96
--- /dev/null
@@ -0,0 +1,13 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+int main() {
+
+  int z0 = 200000;
+  int z1 = 198765;
+  int x = (z0 >> 9) | (z1 << 7) & 0xFFFF;
+
+  printf( "x = %d\n", x );
+
+  return 0;
+}
diff --git a/Robust/src/Benchmarks/oooJava/C-crypt/thing.java b/Robust/src/Benchmarks/oooJava/C-crypt/thing.java
new file mode 100644 (file)
index 0000000..bccc777
--- /dev/null
@@ -0,0 +1,14 @@
+import java.io.*;
+
+public class thing {
+
+  static public void main( String arg[] ) {
+
+    int z0 = 200000;
+    int z1 = 198765;
+    int x = (z0 >>> 9) | (z1 << 7) & 0xFFFF;
+
+    System.out.println( "x = "+x );
+  }
+
+}