summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/C/BraIA64.c
diff options
context:
space:
mode:
authorArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-06 13:33:38 +0300
committerArttu Tarkiainen <arttu.tarkiainen@qt.io>2022-04-13 11:32:09 +0300
commit96ade47c182bf37a2efca2aa62922e54e5ff1660 (patch)
tree93ceee6c6f8984f563f3dfe83e56f98b66b40f3a /src/libs/7zip/unix/C/BraIA64.c
parent2d5f0ffaf1278516bbd74e3b60f9849f4c51cffa (diff)
Move LZMA SDK to 3rdparty subdirectory
Also add attribution document. Task-number: QTIFW-2336 Change-Id: I91546bc6c3ace244e4b546b945f40b7d204f7463 Reviewed-by: Katja Marttila <katja.marttila@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/libs/7zip/unix/C/BraIA64.c')
-rw-r--r--src/libs/7zip/unix/C/BraIA64.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/libs/7zip/unix/C/BraIA64.c b/src/libs/7zip/unix/C/BraIA64.c
deleted file mode 100644
index aa1a44e1e..000000000
--- a/src/libs/7zip/unix/C/BraIA64.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* BraIA64.c -- Converter for IA-64 code
-2013-11-12 : Igor Pavlov : Public domain */
-
-#include "Precomp.h"
-
-#include "Bra.h"
-
-static const Byte kBranchTable[32] =
-{
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 4, 4, 6, 6, 0, 0, 7, 7,
- 4, 4, 0, 0, 4, 4, 0, 0
-};
-
-SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
-{
- SizeT i;
- if (size < 16)
- return 0;
- size -= 16;
- for (i = 0; i <= size; i += 16)
- {
- UInt32 instrTemplate = data[i] & 0x1F;
- UInt32 mask = kBranchTable[instrTemplate];
- UInt32 bitPos = 5;
- int slot;
- for (slot = 0; slot < 3; slot++, bitPos += 41)
- {
- UInt32 bytePos, bitRes;
- UInt64 instruction, instNorm;
- int j;
- if (((mask >> slot) & 1) == 0)
- continue;
- bytePos = (bitPos >> 3);
- bitRes = bitPos & 0x7;
- instruction = 0;
- for (j = 0; j < 6; j++)
- instruction += (UInt64)data[i + j + bytePos] << (8 * j);
-
- instNorm = instruction >> bitRes;
- if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0)
- {
- UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF);
- UInt32 dest;
- src |= ((UInt32)(instNorm >> 36) & 1) << 20;
-
- src <<= 4;
-
- if (encoding)
- dest = ip + (UInt32)i + src;
- else
- dest = src - (ip + (UInt32)i);
-
- dest >>= 4;
-
- instNorm &= ~((UInt64)(0x8FFFFF) << 13);
- instNorm |= ((UInt64)(dest & 0xFFFFF) << 13);
- instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20));
-
- instruction &= (1 << bitRes) - 1;
- instruction |= (instNorm << bitRes);
- for (j = 0; j < 6; j++)
- data[i + j + bytePos] = (Byte)(instruction >> (8 * j));
- }
- }
- }
- return i;
-}