summaryrefslogtreecommitdiffstats
path: root/src/third-party/base64/lib/arch/sse41/codec.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:01:36 +0000
commit62e4c68907d8d33709c2c1f92a161dff00b3d5f2 (patch)
treeadbbaf3acf88ea08f6eeec4b75ee98ad3b07fbdc /src/third-party/base64/lib/arch/sse41/codec.c
parentInitial commit. (diff)
downloadlnav-upstream/0.11.2.tar.xz
lnav-upstream/0.11.2.zip
Adding upstream version 0.11.2.upstream/0.11.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/third-party/base64/lib/arch/sse41/codec.c')
-rw-r--r--src/third-party/base64/lib/arch/sse41/codec.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/third-party/base64/lib/arch/sse41/codec.c b/src/third-party/base64/lib/arch/sse41/codec.c
new file mode 100644
index 0000000..00645fe
--- /dev/null
+++ b/src/third-party/base64/lib/arch/sse41/codec.c
@@ -0,0 +1,42 @@
+#include <stdint.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+#include "../../../include/libbase64.h"
+#include "../../tables/tables.h"
+#include "../../codecs.h"
+#include "config.h"
+#include "../../env.h"
+
+#if HAVE_SSE41
+#include <smmintrin.h>
+
+#include "../ssse3/dec_reshuffle.c"
+#include "../ssse3/dec_loop.c"
+#include "../ssse3/enc_translate.c"
+#include "../ssse3/enc_reshuffle.c"
+#include "../ssse3/enc_loop.c"
+
+#endif // HAVE_SSE41
+
+BASE64_ENC_FUNCTION(sse41)
+{
+#if HAVE_SSE41
+ #include "../generic/enc_head.c"
+ enc_loop_ssse3(&s, &slen, &o, &olen);
+ #include "../generic/enc_tail.c"
+#else
+ BASE64_ENC_STUB
+#endif
+}
+
+BASE64_DEC_FUNCTION(sse41)
+{
+#if HAVE_SSE41
+ #include "../generic/dec_head.c"
+ dec_loop_ssse3(&s, &slen, &o, &olen);
+ #include "../generic/dec_tail.c"
+#else
+ BASE64_DEC_STUB
+#endif
+}