diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-02-01 21:43:47 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-02-01 21:48:33 +0100 |
commit | e029e033d52a850c135e286dea907a2b8468637b (patch) | |
tree | f5491de1b3cde237ab039d6b243547f1312620d4 /test/monniaux/jpeg-6b | |
parent | 1dffd83e6b621c6ad8d820431339c5dd58e651d1 (diff) | |
download | compcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.tar.gz compcert-kvx-e029e033d52a850c135e286dea907a2b8468637b.zip |
ugly hack to access _impure_thread_data (stdin, stdout, stderr...)
it works!
Diffstat (limited to 'test/monniaux/jpeg-6b')
-rw-r--r-- | test/monniaux/jpeg-6b/Makefile | 75 | ||||
-rw-r--r-- | test/monniaux/jpeg-6b/jerror.c | 1 | ||||
-rw-r--r-- | test/monniaux/jpeg-6b/jmemmgr.c | 1 | ||||
-rw-r--r-- | test/monniaux/jpeg-6b/rdjpgcom.c | 19 |
4 files changed, 56 insertions, 40 deletions
diff --git a/test/monniaux/jpeg-6b/Makefile b/test/monniaux/jpeg-6b/Makefile index d0edc7c7..68c73c30 100644 --- a/test/monniaux/jpeg-6b/Makefile +++ b/test/monniaux/jpeg-6b/Makefile @@ -115,62 +115,59 @@ all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom %.i : %.c $(CC) $(CFLAGS) -E $< -o $@ -wrjpgcom.o : wrjpgcom.c - $(GCC) $(CFLAGS) -c $< -o $@ +# wrjpgcom.o : wrjpgcom.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdjpgcom.o : rdjpgcom.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdjpgcom.o : rdjpgcom.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdswitch.o : rdswitch.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdswitch.o : rdswitch.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdgif.o : rdgif.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdgif.o : rdgif.c +# $(GCC) $(CFLAGS) -c $< -o $@ -jmemmgr.o : jmemmgr.c - $(GCC) $(CFLAGS) -c $< -o $@ +# jmemmgr.o : jmemmgr.c +# $(GCC) $(CFLAGS) -c $< -o $@ -jerror.o : jerror.c - $(GCC) $(CFLAGS) -c $< -o $@ +# jerror.o : jerror.c +# $(GCC) $(CFLAGS) -c $< -o $@ -example.o : example.c - $(GCC) $(CFLAGS) -c $< -o $@ +# example.o : example.c +# $(GCC) $(CFLAGS) -c $< -o $@ -cjpeg.o : cjpeg.c - $(GCC) $(CFLAGS) -c $< -o $@ +# cjpeg.o : cjpeg.c +# $(GCC) $(CFLAGS) -c $< -o $@ -cdjpeg.o : cdjpeg.c - $(GCC) $(CFLAGS) -c $< -o $@ +# cdjpeg.o : cdjpeg.c +# $(GCC) $(CFLAGS) -c $< -o $@ -djpeg.o : djpeg.c - $(GCC) $(CFLAGS) -c $< -o $@ +# djpeg.o : djpeg.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdppm.o : rdppm.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdppm.o : rdppm.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdbmp.o : rdbmp.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdbmp.o : rdbmp.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdtarga.o : rdtarga.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdtarga.o : rdtarga.c +# $(GCC) $(CFLAGS) -c $< -o $@ -wrgif.o : wrgif.c - $(GCC) $(CFLAGS) -c $< -o $@ +# wrgif.o : wrgif.c +# $(GCC) $(CFLAGS) -c $< -o $@ -wrbmp.o : wrbmp.c - $(GCC) $(CFLAGS) -c $< -o $@ +# wrbmp.o : wrbmp.c +# $(GCC) $(CFLAGS) -c $< -o $@ -wrtarga.o : wrtarga.c - $(GCC) $(CFLAGS) -c $< -o $@ +# wrtarga.o : wrtarga.c +# $(GCC) $(CFLAGS) -c $< -o $@ -rdcolmap.o : rdcolmap.c - $(GCC) $(CFLAGS) -c $< -o $@ +# rdcolmap.o : rdcolmap.c +# $(GCC) $(CFLAGS) -c $< -o $@ -jpegtran.o : jpegtran.c - $(GCC) $(CFLAGS) -c $< -o $@ - -ansi2knr: ansi2knr.c - $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c +# jpegtran.o : jpegtran.c +# $(GCC) $(CFLAGS) -c $< -o $@ libjpeg.a: $(LIBOBJECTS) $(RM) libjpeg.a diff --git a/test/monniaux/jpeg-6b/jerror.c b/test/monniaux/jpeg-6b/jerror.c index c98aed76..e1b585e9 100644 --- a/test/monniaux/jpeg-6b/jerror.c +++ b/test/monniaux/jpeg-6b/jerror.c @@ -143,6 +143,7 @@ emit_message (j_common_ptr cinfo, int msg_level) if (err->trace_level >= msg_level)
(*err->output_message) (cinfo);
}
+ KILL_TAIL_CALL();
}
diff --git a/test/monniaux/jpeg-6b/jmemmgr.c b/test/monniaux/jpeg-6b/jmemmgr.c index b636f1be..01533319 100644 --- a/test/monniaux/jpeg-6b/jmemmgr.c +++ b/test/monniaux/jpeg-6b/jmemmgr.c @@ -222,6 +222,7 @@ out_of_memory (j_common_ptr cinfo, int which) cinfo->err->trace_level = 2; /* force self_destruct to report stats */
#endif
ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which);
+ KILL_TAIL_CALL();
}
diff --git a/test/monniaux/jpeg-6b/rdjpgcom.c b/test/monniaux/jpeg-6b/rdjpgcom.c index c8b94bb8..c6cb47ce 100644 --- a/test/monniaux/jpeg-6b/rdjpgcom.c +++ b/test/monniaux/jpeg-6b/rdjpgcom.c @@ -278,6 +278,22 @@ process_SOFn (int marker) image_width = read_2_bytes();
num_components = read_1_byte();
+#ifdef NO_SWITCH
+ if (marker==M_SOF0) process = "Baseline";
+ else if (marker==M_SOF1) process = "Extended sequential";
+ else if (marker==M_SOF2) process = "Progressive";
+ else if (marker==M_SOF3) process = "Lossless";
+ else if (marker==M_SOF5) process = "Differential sequential";
+ else if (marker==M_SOF6) process = "Differential progressive";
+ else if (marker==M_SOF7) process = "Differential lossless";
+ else if (marker==M_SOF9) process = "Extended sequential, arithmetic coding";
+ else if (marker==M_SOF10) process = "Progressive, arithmetic coding";
+ else if (marker==M_SOF11) process = "Lossless, arithmetic coding";
+ else if (marker==M_SOF13) process = "Differential sequential, arithmetic coding";
+ else if (marker==M_SOF14) process = "Differential progressive, arithmetic coding";
+ else if (marker==M_SOF15) process = "Differential lossless, arithmetic coding";
+ else process = "Unknown";
+#else
switch (marker) {
case M_SOF0: process = "Baseline"; break;
case M_SOF1: process = "Extended sequential"; break;
@@ -294,7 +310,8 @@ process_SOFn (int marker) case M_SOF15: process = "Differential lossless, arithmetic coding"; break;
default: process = "Unknown"; break;
}
-
+#endif
+
printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n",
image_width, image_height, num_components, data_precision);
printf("JPEG process: %s\n", process);
|