From 993809275fefb51a58c2b3ce19bf9790a2530104 Mon Sep 17 00:00:00 2001 From: jjenista Date: Sat, 31 Jul 2010 23:24:34 +0000 Subject: [PATCH] c version output message not matching input, did a C vs Java test of the >> and >>> to make sure that wasn't the problem --- Robust/src/Benchmarks/oooJava/C-crypt/crypt.c | 2 +- Robust/src/Benchmarks/oooJava/C-crypt/makefile | 4 ++-- Robust/src/Benchmarks/oooJava/C-crypt/thing.c | 13 +++++++++++++ Robust/src/Benchmarks/oooJava/C-crypt/thing.java | 14 ++++++++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 Robust/src/Benchmarks/oooJava/C-crypt/thing.c create mode 100644 Robust/src/Benchmarks/oooJava/C-crypt/thing.java diff --git a/Robust/src/Benchmarks/oooJava/C-crypt/crypt.c b/Robust/src/Benchmarks/oooJava/C-crypt/crypt.c index 5bdfed2d..dec7d1ca 100644 --- a/Robust/src/Benchmarks/oooJava/C-crypt/crypt.c +++ b/Robust/src/Benchmarks/oooJava/C-crypt/crypt.c @@ -55,7 +55,7 @@ void main( int argc, char** argv ) { startT=currentTimeMillis(); - array_rows = datasizes[size]; + array_rows = datasizes[problem_size]; buildTestData(); endT=currentTimeMillis(); diff --git a/Robust/src/Benchmarks/oooJava/C-crypt/makefile b/Robust/src/Benchmarks/oooJava/C-crypt/makefile index 7cd674a4..bc182c92 100644 --- a/Robust/src/Benchmarks/oooJava/C-crypt/makefile +++ b/Robust/src/Benchmarks/oooJava/C-crypt/makefile @@ -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 index 00000000..ae5ef96a --- /dev/null +++ b/Robust/src/Benchmarks/oooJava/C-crypt/thing.c @@ -0,0 +1,13 @@ +#include +#include + +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 index 00000000..bccc7776 --- /dev/null +++ b/Robust/src/Benchmarks/oooJava/C-crypt/thing.java @@ -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 ); + } + +} -- 2.34.1