aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/jpeg-6b/jccoefct.c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 15:45:39 +0100
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2019-02-01 15:45:39 +0100
commit35244064bbb2a853fb5c08898e8a74a7ec489aaa (patch)
treee9b7ccb8b46174301ccf106807ea2fcd640350e5 /test/monniaux/jpeg-6b/jccoefct.c
parent8ae9063a94fbf3756bb2b1d596f35b81e3e608eb (diff)
downloadcompcert-kvx-35244064bbb2a853fb5c08898e8a74a7ec489aaa.tar.gz
compcert-kvx-35244064bbb2a853fb5c08898e8a74a7ec489aaa.zip
block tail calls etc.
Diffstat (limited to 'test/monniaux/jpeg-6b/jccoefct.c')
-rw-r--r--test/monniaux/jpeg-6b/jccoefct.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/monniaux/jpeg-6b/jccoefct.c b/test/monniaux/jpeg-6b/jccoefct.c
index a7e7e6bd..e2f19130 100644
--- a/test/monniaux/jpeg-6b/jccoefct.c
+++ b/test/monniaux/jpeg-6b/jccoefct.c
@@ -126,9 +126,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
ERREXIT(cinfo, JERR_BAD_BUFFER_MODE);
break;
}
-#ifdef TAIL_CALL_MISSING
- int dummy=1;
-#endif
+ KILL_TAIL_CALL();
}
@@ -268,13 +266,13 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
block_rows = compptr->v_samp_factor;
else {
/* NB: can't use last_row_height here, since may not be set! */
- block_rows = (int) DIVISION(compptr->height_in_blocks, compptr->v_samp_factor);
+ block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
if (block_rows == 0) block_rows = compptr->v_samp_factor;
}
blocks_across = compptr->width_in_blocks;
h_samp_factor = compptr->h_samp_factor;
/* Count number of dummy blocks to be added at the right margin. */
- ndummy = (int) DIVISION(blocks_across, h_samp_factor);
+ ndummy = (int) (blocks_across % h_samp_factor);
if (ndummy > 0)
ndummy = h_samp_factor - ndummy;
/* Perform DCT for all non-dummy blocks in this iMCU row. Each call
@@ -303,7 +301,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
*/
if (coef->iMCU_row_num == last_iMCU_row) {
blocks_across += ndummy; /* include lower right corner */
- MCUs_across = DIVISION(blocks_across, h_samp_factor);
+ MCUs_across = blocks_across / h_samp_factor;
for (block_row = block_rows; block_row < compptr->v_samp_factor;
block_row++) {
thisblockrow = buffer[block_row];