]>
git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/Sdk/C/Bra.h
b9018eb991f5712d917b8e11b3f2b3a2fe36b4a5
1 /* Bra.h -- Branch converters for executables
2 2008-10-04 : Igor Pavlov : Public domain */
10 These functions convert relative addresses to absolute addresses
11 in CALL instructions to increase the compression ratio.
16 ip - current virtual Instruction Pinter (IP) value
17 state - state variable for x86 converter
18 encoding - 0 (for decoding), 1 (for encoding)
21 state - state variable for x86 converter
24 The number of processed bytes. If you call these functions with multiple calls,
25 you must start next call with first byte after block of processed bytes.
27 Type Endian Alignment LookAhead
36 size must be >= Alignment + LookAhead, if it's not last block.
37 If (size < Alignment + LookAhead), converter returns 0.
44 ; size must be >= Alignment + LookAhead, if it's not last block
45 SizeT processed = Convert(data, size, ip, 1);
52 #define x86_Convert_Init(state) { state = 0; }
53 SizeT
x86_Convert(Byte
*data
, SizeT size
, UInt32 ip
, UInt32
*state
, int encoding
);
54 SizeT
ARM_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
);
55 SizeT
ARMT_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
);
56 SizeT
PPC_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
);
57 SizeT
SPARC_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
);
58 SizeT
IA64_Convert(Byte
*data
, SizeT size
, UInt32 ip
, int encoding
);