diff options
author | Twinaphex | 2019-05-14 11:44:06 +0200 |
---|---|---|
committer | GitHub | 2019-05-14 11:44:06 +0200 |
commit | 80209d1715398a16b6ace1c2e4cd0aab5c00248d (patch) | |
tree | b7f82140860acabb2d0e3a5216f78bf98691c267 /deps/lzma-16.04/C/Bra.h | |
parent | 5ffd1f23eb970679dfe8b540bc3df8e776dc9e17 (diff) | |
parent | ce188d4d7f3b9ad04867c49b424e8497c2ade92b (diff) | |
download | pcsx_rearmed-80209d1715398a16b6ace1c2e4cd0aab5c00248d.tar.gz pcsx_rearmed-80209d1715398a16b6ace1c2e4cd0aab5c00248d.tar.bz2 pcsx_rearmed-80209d1715398a16b6ace1c2e4cd0aab5c00248d.zip |
Merge pull request #280 from aliaspider/master
add CHD support.
Diffstat (limited to 'deps/lzma-16.04/C/Bra.h')
-rw-r--r-- | deps/lzma-16.04/C/Bra.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/deps/lzma-16.04/C/Bra.h b/deps/lzma-16.04/C/Bra.h new file mode 100644 index 0000000..aba8dce --- /dev/null +++ b/deps/lzma-16.04/C/Bra.h @@ -0,0 +1,64 @@ +/* Bra.h -- Branch converters for executables
+2013-01-18 : Igor Pavlov : Public domain */
+
+#ifndef __BRA_H
+#define __BRA_H
+
+#include "7zTypes.h"
+
+EXTERN_C_BEGIN
+
+/*
+These functions convert relative addresses to absolute addresses
+in CALL instructions to increase the compression ratio.
+
+ In:
+ data - data buffer
+ size - size of data
+ ip - current virtual Instruction Pinter (IP) value
+ state - state variable for x86 converter
+ encoding - 0 (for decoding), 1 (for encoding)
+
+ Out:
+ state - state variable for x86 converter
+
+ Returns:
+ The number of processed bytes. If you call these functions with multiple calls,
+ you must start next call with first byte after block of processed bytes.
+
+ Type Endian Alignment LookAhead
+
+ x86 little 1 4
+ ARMT little 2 2
+ ARM little 4 0
+ PPC big 4 0
+ SPARC big 4 0
+ IA64 little 16 0
+
+ size must be >= Alignment + LookAhead, if it's not last block.
+ If (size < Alignment + LookAhead), converter returns 0.
+
+ Example:
+
+ UInt32 ip = 0;
+ for ()
+ {
+ ; size must be >= Alignment + LookAhead, if it's not last block
+ SizeT processed = Convert(data, size, ip, 1);
+ data += processed;
+ size -= processed;
+ ip += processed;
+ }
+*/
+
+#define x86_Convert_Init(state) { state = 0; }
+SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding);
+SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding);
+
+EXTERN_C_END
+
+#endif
|