summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
commitcf178685aca107aa37c748de11da01562e78c46c (patch)
tree84d60b39c1744edcbdd4dbfc5026583914432dba /debug
parentAdding upstream version 5.6.1+really5.4.5. (diff)
downloadxz-utils-upstream.tar.xz
xz-utils-upstream.zip
Adding upstream version 5.6.2.upstream/5.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debug')
-rw-r--r--debug/Makefile.am9
-rw-r--r--debug/Makefile.in29
-rw-r--r--debug/crc32.c5
-rw-r--r--debug/full_flush.c5
-rw-r--r--debug/hex2bin.c5
-rw-r--r--debug/known_sizes.c5
-rw-r--r--debug/memusage.c5
-rw-r--r--debug/repeat.c5
-rw-r--r--debug/sync_flush.c5
-rw-r--r--debug/testfilegen-arm64.c116
-rw-r--r--debug/translation.bash5
11 files changed, 156 insertions, 38 deletions
diff --git a/debug/Makefile.am b/debug/Makefile.am
index 9026fd9..db6f47f 100644
--- a/debug/Makefile.am
+++ b/debug/Makefile.am
@@ -1,9 +1,5 @@
-##
+## SPDX-License-Identifier: 0BSD
## Author: Lasse Collin
-##
-## This file has been put into the public domain.
-## You can do whatever you want with this file.
-##
EXTRA_DIST = \
translation.bash
@@ -15,7 +11,8 @@ noinst_PROGRAMS = \
memusage \
crc32 \
known_sizes \
- hex2bin
+ hex2bin \
+ testfilegen-arm64
AM_CPPFLAGS = \
-I$(top_srcdir)/src/common \
diff --git a/debug/Makefile.in b/debug/Makefile.in
index 256be27..58147f4 100644
--- a/debug/Makefile.in
+++ b/debug/Makefile.in
@@ -90,12 +90,13 @@ build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = repeat$(EXEEXT) sync_flush$(EXEEXT) \
full_flush$(EXEEXT) memusage$(EXEEXT) crc32$(EXEEXT) \
- known_sizes$(EXEEXT) hex2bin$(EXEEXT)
+ known_sizes$(EXEEXT) hex2bin$(EXEEXT) \
+ testfilegen-arm64$(EXEEXT)
@COND_GNULIB_TRUE@am__append_1 = $(top_builddir)/lib/libgnu.a
subdir = debug
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_capsicum.m4 \
- $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/getopt.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/m4/ax_pthread.m4 \
+ $(top_srcdir)/m4/build-to-host.m4 $(top_srcdir)/m4/getopt.m4 \
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/host-cpu-c-abi.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
@@ -159,6 +160,12 @@ sync_flush_OBJECTS = sync_flush.$(OBJEXT)
sync_flush_LDADD = $(LDADD)
sync_flush_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \
$(am__append_1) $(am__DEPENDENCIES_1)
+testfilegen_arm64_SOURCES = testfilegen-arm64.c
+testfilegen_arm64_OBJECTS = testfilegen-arm64.$(OBJEXT)
+testfilegen_arm64_LDADD = $(LDADD)
+testfilegen_arm64_DEPENDENCIES = \
+ $(top_builddir)/src/liblzma/liblzma.la $(am__append_1) \
+ $(am__DEPENDENCIES_1)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -177,7 +184,7 @@ am__maybe_remake_depfiles = depfiles
am__depfiles_remade = ./$(DEPDIR)/crc32.Po ./$(DEPDIR)/full_flush.Po \
./$(DEPDIR)/hex2bin.Po ./$(DEPDIR)/known_sizes.Po \
./$(DEPDIR)/memusage.Po ./$(DEPDIR)/repeat.Po \
- ./$(DEPDIR)/sync_flush.Po
+ ./$(DEPDIR)/sync_flush.Po ./$(DEPDIR)/testfilegen-arm64.Po
am__mv = mv -f
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -198,9 +205,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \
- repeat.c sync_flush.c
+ repeat.c sync_flush.c testfilegen-arm64.c
DIST_SOURCES = crc32.c full_flush.c hex2bin.c known_sizes.c memusage.c \
- repeat.c sync_flush.c
+ repeat.c sync_flush.c testfilegen-arm64.c
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -236,7 +243,6 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-CAPSICUM_LIB = @CAPSICUM_LIB@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
@@ -365,6 +371,8 @@ install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
+localedir_c = @localedir_c@
+localedir_c_make = @localedir_c_make@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
@@ -463,6 +471,10 @@ sync_flush$(EXEEXT): $(sync_flush_OBJECTS) $(sync_flush_DEPENDENCIES) $(EXTRA_sy
@rm -f sync_flush$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(sync_flush_OBJECTS) $(sync_flush_LDADD) $(LIBS)
+testfilegen-arm64$(EXEEXT): $(testfilegen_arm64_OBJECTS) $(testfilegen_arm64_DEPENDENCIES) $(EXTRA_testfilegen_arm64_DEPENDENCIES)
+ @rm -f testfilegen-arm64$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(testfilegen_arm64_OBJECTS) $(testfilegen_arm64_LDADD) $(LIBS)
+
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -476,6 +488,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memusage.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repeat.Po@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync_flush.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testfilegen-arm64.Po@am__quote@ # am--include-marker
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@@ -641,6 +654,7 @@ distclean: distclean-am
-rm -f ./$(DEPDIR)/memusage.Po
-rm -f ./$(DEPDIR)/repeat.Po
-rm -f ./$(DEPDIR)/sync_flush.Po
+ -rm -f ./$(DEPDIR)/testfilegen-arm64.Po
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
@@ -693,6 +707,7 @@ maintainer-clean: maintainer-clean-am
-rm -f ./$(DEPDIR)/memusage.Po
-rm -f ./$(DEPDIR)/repeat.Po
-rm -f ./$(DEPDIR)/sync_flush.Po
+ -rm -f ./$(DEPDIR)/testfilegen-arm64.Po
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
diff --git a/debug/crc32.c b/debug/crc32.c
index e545a3c..eed4793 100644
--- a/debug/crc32.c
+++ b/debug/crc32.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file crc32.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/full_flush.c b/debug/full_flush.c
index 227f737..79c8f15 100644
--- a/debug/full_flush.c
+++ b/debug/full_flush.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file full_flush.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/hex2bin.c b/debug/hex2bin.c
index 7324624..4536843 100644
--- a/debug/hex2bin.c
+++ b/debug/hex2bin.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file hex2bin.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/known_sizes.c b/debug/known_sizes.c
index 6c3641f..3f5aada 100644
--- a/debug/known_sizes.c
+++ b/debug/known_sizes.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file known_sizes.c
@@ -9,9 +11,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/memusage.c b/debug/memusage.c
index bd72b5a..b592895 100644
--- a/debug/memusage.c
+++ b/debug/memusage.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file memusage.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/repeat.c b/debug/repeat.c
index a00bde2..4830b13 100644
--- a/debug/repeat.c
+++ b/debug/repeat.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file repeat.c
@@ -9,9 +11,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/sync_flush.c b/debug/sync_flush.c
index 2292333..5ce2e57 100644
--- a/debug/sync_flush.c
+++ b/debug/sync_flush.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file sync_flush.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h"
diff --git a/debug/testfilegen-arm64.c b/debug/testfilegen-arm64.c
new file mode 100644
index 0000000..88cadca
--- /dev/null
+++ b/debug/testfilegen-arm64.c
@@ -0,0 +1,116 @@
+// SPDX-License-Identifier: 0BSD
+
+///////////////////////////////////////////////////////////////////////////////
+//
+/// \file testfilegen-arm64.c
+/// \brief Generates uncompressed test file for the ARM64 filter
+//
+// Author: Lasse Collin
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdio.h>
+
+
+static uint32_t pc4 = 0;
+
+
+static void
+put32le(uint32_t v)
+{
+ putchar((v >> 0) & 0xFF);
+ putchar((v >> 8) & 0xFF);
+ putchar((v >> 16) & 0xFF);
+ putchar((v >> 24) & 0xFF);
+ ++pc4;
+}
+
+
+static void
+putbl(uint32_t imm)
+{
+ imm &= (1U << 26) - 1;
+ imm |= 0x25U << 26;
+ put32le(imm);
+}
+
+
+static void
+putadrp32(uint32_t imm)
+{
+ imm &= 0x1FFFFFU;
+
+ // fprintf(stderr, "ADRP 0x%08X\n", imm);
+
+ uint32_t instr = 0x90000000;
+ instr |= (pc4 * 5 + 11) & 0x1F;
+ instr |= (imm & 3) << 29;
+ instr |= (imm >> 2) << 5;
+
+ put32le(instr);
+}
+
+
+extern int
+main(void)
+{
+ putbl(0);
+ putbl(0x03FFFFFF);
+ putbl(0x03FFFFFE);
+ putbl(0x03FFFFFD);
+
+ putbl(3);
+ putbl(2);
+ putbl(1);
+ putbl(0);
+
+
+ putbl(0x02000001);
+ putbl(0x02000000);
+ putbl(0x01FFFFFF);
+ putbl(0x01FFFFFE);
+
+ putbl(0x01111117);
+ putbl(0x01111116);
+ putbl(0x01111115);
+ putbl(0x01111114);
+
+
+ putbl(0x02222227);
+ putbl(0x02222226);
+ putbl(0x02222225);
+ putbl(0x02222224);
+
+ putbl(0U - pc4);
+ putbl(0U - pc4);
+ putbl(0U - pc4);
+ putbl(0U - pc4);
+
+ putadrp32(0x00);
+ putadrp32(0x05);
+ putadrp32(0x15);
+ putadrp32(0x25);
+
+ for (unsigned rep = 0; rep < 2; ++rep) {
+ while ((pc4 << 2) & 4095)
+ put32le(0x55555555U);
+
+ for (unsigned i = 10; i <= 21; ++i) {
+ const uint32_t neg = (0x1FFF00 >> (21 - i)) & ~255U;
+ const uint32_t plus = 1U << (i - 1);
+ putadrp32(0x000000 | plus);
+ putadrp32(0x000005 | plus);
+ putadrp32(0x0000FE | plus);
+ putadrp32(0x0000FF | plus);
+
+ putadrp32(0x000000 | neg);
+ putadrp32(0x000005 | neg);
+ putadrp32(0x0000FE | neg);
+ putadrp32(0x0000FF | neg);
+ }
+ }
+
+ return 0;
+}
diff --git a/debug/translation.bash b/debug/translation.bash
index df4210d..77a4c78 100644
--- a/debug/translation.bash
+++ b/debug/translation.bash
@@ -1,4 +1,5 @@
#!/bin/bash
+# SPDX-License-Identifier: 0BSD
###############################################################################
#
@@ -20,9 +21,6 @@
#
# Author: Lasse Collin
#
-# This file has been put into the public domain.
-# You can do whatever you want with this file.
-#
###############################################################################
set -e
@@ -80,7 +78,6 @@ for CMD in \
"xz --lzma2=foobarbaz=abcd" \
"xz --lzma2=mf=abcd" \
"xz --lzma2=preset=foobarbaz" \
- "xz --lzma2=mf=bt4,nice=2" \
"xz --lzma2=nice=50000" \
"xz --help" \
"xz --long-help" \