Tests: Remove x86 and SPARC BCJ tests

These are very old but the exact test file isn't easy to reproduce
as it was compiled from a short C program (bcj_test.c) long ago.
These tests weren't very good anyway, just a little better than nothing.
This commit is contained in:
Lasse Collin 2024-04-20 13:12:50 +03:00
parent d879686469
commit a5f2aa5618
9 changed files with 0 additions and 87 deletions

View File

@ -8,16 +8,11 @@ EXTRA_DIST = \
tests.h \
test_files.sh \
test_compress.sh \
test_compress_prepared_bcj_sparc \
test_compress_prepared_bcj_x86 \
test_compress_generated_abc \
test_compress_generated_random \
test_compress_generated_text \
test_scripts.sh \
test_suffix.sh \
bcj_test.c \
compress_prepared_bcj_sparc \
compress_prepared_bcj_x86 \
xzgrep_expected_output
AM_CPPFLAGS = \
@ -59,8 +54,6 @@ TESTS = \
test_vli \
test_files.sh \
test_suffix.sh \
test_compress_prepared_bcj_sparc \
test_compress_prepared_bcj_x86 \
test_compress_generated_abc \
test_compress_generated_random \
test_compress_generated_text

View File

@ -1,64 +0,0 @@
// SPDX-License-Identifier: 0BSD
///////////////////////////////////////////////////////////////////////////////
//
/// \file bcj_test.c
/// \brief Source code of compress_prepared_bcj_*
///
/// This is a simple program that should make the compiler to generate
/// PC-relative branches, jumps, and calls. The compiled files can then
/// be used to test the branch conversion filters. Note that this program
/// itself does nothing useful.
///
/// Compiling: gcc -std=c99 -fPIC -c bcj_test.c
/// Don't optimize or strip.
//
// Author: Lasse Collin
//
///////////////////////////////////////////////////////////////////////////////
extern int jump(int a, int b);
extern int
call(int a, int b)
{
if (a < b)
a = jump(a, b);
return a;
}
extern int
jump(int a, int b)
{
// The loop generates conditional jump backwards.
while (1) {
if (a < b) {
a *= 2;
a += 3 * b;
break;
} else {
// Put enough code here to prevent JMP SHORT on x86.
a += b;
a /= 2;
b += b % 5;
a -= b / 3;
b = 2 * b + a - 1;
a *= b + a + 1;
b += a - 1;
a += b * 2 - a / 5;
}
}
return a;
}
int
main(int argc, char **argv)
{
int a = call(argc, argc + 1);
return a == 0;
}

Binary file not shown.

Binary file not shown.

View File

@ -66,14 +66,6 @@
good-1-delta-lzma2.tiff.xz is an image file that compresses
better with Delta+LZMA2 than with plain LZMA2.
good-1-x86-lzma2.xz uses the x86 filter (BCJ) and LZMA2. The
uncompressed file is compress_prepared_bcj_x86 found from the tests
directory.
good-1-sparc-lzma2.xz uses the SPARC filter and LZMA2. The
uncompressed file is compress_prepared_bcj_sparc found from the tests
directory.
good-1-arm64-lzma2-1.xz uses the ARM64 filter and LZMA2. The
uncompressed data is constructed so that it tests integer
wrap around and sign extension. To recreate the file, compress

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
exec "$srcdir/test_compress.sh" compress_prepared_bcj_sparc

View File

@ -1,4 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: 0BSD
exec "$srcdir/test_compress.sh" compress_prepared_bcj_x86