Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
Bra.c File Reference
#include "Precomp.h"
#include "Bra.h"
#include "RotateDefs.h"
#include "CpuArch.h"

Macros

#define BR_PC_INIT   pc += (UInt32)size;
 
#define BR_PC_GET   (pc - (UInt32)(SizeT)(lim - p))
 
#define BR_CONVERT_VAL(v, c)
 
#define Z7_BRANCH_CONV(name)
 
#define Z7_BRANCH_FUNC_MAIN(name)
 
#define Z7_BRANCH_FUNC_IMP(name, m, encoding)
 
#define Z7_BRANCH_FUNCS_IMP(name)
 
#define BR_EXTERNAL_FOR   for (;;)
 
#define BR_NEXT_ITERATION   break;
 
#define Z7_UNLIKELY(x)
 
#define ARMT_TAIL_PROC   { return p; }
 
#define BR_CONVERT_VAL_ENC(v)
 
#define BR_CONVERT_VAL_DEC(v)
 
#define RISCV_GET_UI32(p)
 
#define RISCV_SET_UI32(p, v)
 
#define RISCV_LOAD_VAL(p)
 
#define RISCV_INSTR_SIZE   2
 
#define RISCV_STEP_1   (4 + RISCV_INSTR_SIZE)
 
#define RISCV_STEP_2   4
 
#define RISCV_REG_VAL   (2 << 7)
 
#define RISCV_CMD_VAL   3
 
#define RISCV_DELTA_7F   0x7f
 
#define RISCV_CHECK_1(v, b)
 
#define RISCV_CHECK_2(v, r)
 
#define RISCV_SCAN_LOOP
 

Functions

 Z7_BRANCH_FUNC_MAIN (BranchConv_ARM64)
 
 Z7_BRANCH_FUNC_MAIN (BranchConv_ARM)
 
 Z7_BRANCH_FUNC_MAIN (BranchConv_PPC)
 
 Z7_BRANCH_FUNC_MAIN (BranchConv_SPARC)
 
 Z7_BRANCH_FUNC_MAIN (BranchConv_ARMT)
 
 Z7_BRANCH_FUNC_MAIN (BranchConv_IA64)
 
Byte *Z7_BRANCH_CONV_ENC RISCV (Byte *p, SizeT size, UInt32 pc)
 

Macro Definition Documentation

◆ ARMT_TAIL_PROC

#define ARMT_TAIL_PROC   { return p; }

◆ BR_CONVERT_VAL

#define BR_CONVERT_VAL ( v,
c )
Value:
if (encoding) v += c; else v -= c;
#define c(i)
Definition sha256.c:43

◆ BR_CONVERT_VAL_DEC

#define BR_CONVERT_VAL_DEC ( v)
Value:
v -= BR_PC_GET;
#define BR_PC_GET
Definition Bra.c:21

◆ BR_CONVERT_VAL_ENC

#define BR_CONVERT_VAL_ENC ( v)
Value:
v += BR_PC_GET;

◆ BR_EXTERNAL_FOR

#define BR_EXTERNAL_FOR   for (;;)

◆ BR_NEXT_ITERATION

#define BR_NEXT_ITERATION   break;

◆ BR_PC_GET

#define BR_PC_GET   (pc - (UInt32)(SizeT)(lim - p))

◆ BR_PC_INIT

#define BR_PC_INIT   pc += (UInt32)size;

◆ RISCV_CHECK_1

#define RISCV_CHECK_1 ( v,
b )
Value:
(((((b) - RISCV_CMD_VAL) ^ ((v) << 8)) & (0xf8000 + RISCV_CMD_VAL)) == 0)
#define RISCV_CMD_VAL
Definition Bra.c:456
#define b(i)
Definition sha256.c:42

◆ RISCV_CHECK_2

#define RISCV_CHECK_2 ( v,
r )
Value:
((((v) - ((RISCV_CMD_VAL << 12) | RISCV_REG_VAL | 8)) \
<< 18) \
< ((r) & 0x1d))
#define RISCV_REG_VAL
Definition Bra.c:455

◆ RISCV_CMD_VAL

#define RISCV_CMD_VAL   3

◆ RISCV_DELTA_7F

#define RISCV_DELTA_7F   0x7f

◆ RISCV_GET_UI32

#define RISCV_GET_UI32 ( p)
Value:
((UInt32)GetUi16a(p) + \
((UInt32)GetUi16a((p) + 2) << 16))
unsigned int UInt32
Definition bzlib_private.h:45

◆ RISCV_INSTR_SIZE

#define RISCV_INSTR_SIZE   2

◆ RISCV_LOAD_VAL

#define RISCV_LOAD_VAL ( p)
Value:
(*(p))

◆ RISCV_REG_VAL

#define RISCV_REG_VAL   (2 << 7)

◆ RISCV_SCAN_LOOP

#define RISCV_SCAN_LOOP
Value:
Byte *lim; \
size &= ~(SizeT)(RISCV_INSTR_SIZE - 1); \
if (size <= 6) return p; \
size -= 6; \
lim = p + size; \
for (;;) \
{ \
UInt32 a, v; \
/* Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE */ \
for (;;) \
{ \
if Z7_UNLIKELY(p >= lim) { return p; } \
a = (RISCV_LOAD_VAL(p) ^ 0x10u) + 1; \
if ((a & 0x77) == 0) break; \
a = (RISCV_LOAD_VAL(p + RISCV_INSTR_SIZE) ^ 0x10u) + 1; \
p += RISCV_INSTR_SIZE * 2; \
if ((a & 0x77) == 0) \
{ \
if Z7_UNLIKELY(p >= lim) { return p; } \
break; \
} \
}
size_t SizeT
Definition 7zTypes.h:247
#define RISCV_LOAD_VAL(p)
Definition Bra.c:449
#define BR_PC_INIT
Definition Bra.c:20
#define RISCV_INSTR_SIZE
Definition Bra.c:452
#define Z7_UNLIKELY(x)
Definition Bra.c:70
size_t size
Definition platform.h:559
unsigned char Byte
Definition zconf.h:391
#define a(i)
Definition sha256.c:41
for(;;)
Definition zlib_interface.c:93
if(BZ_OK !=ret)
Definition zlib_interface.c:31

◆ RISCV_SET_UI32

#define RISCV_SET_UI32 ( p,
v )
Value:
{ \
SetUi16a(p, (UInt16)(v)) \
SetUi16a((p) + 2, (UInt16)(v >> 16)) }
unsigned short UInt16
Definition bzlib_private.h:47

◆ RISCV_STEP_1

#define RISCV_STEP_1   (4 + RISCV_INSTR_SIZE)

◆ RISCV_STEP_2

#define RISCV_STEP_2   4

◆ Z7_BRANCH_CONV

#define Z7_BRANCH_CONV ( name)
Value:
z7_ ## name
char name[NAME_LEN_MAX+1]
Name of the filter.
Definition string_conversion.c:450

◆ Z7_BRANCH_FUNC_IMP

#define Z7_BRANCH_FUNC_IMP ( name,
m,
encoding )
Value:
Z7_NO_INLINE \
Z7_ATTRIB_NO_VECTOR \
Byte *m(name)(Byte *data, SizeT size, UInt32 pc) \
{ return Z7_BRANCH_CONV(name)(data, size, pc, encoding); } \
#define Z7_BRANCH_CONV(name)
Definition Bra.c:29
static const void * data
Definition XzCrc64.c:50

◆ Z7_BRANCH_FUNC_MAIN

#define Z7_BRANCH_FUNC_MAIN ( name)
Value:
static \
Z7_FORCE_INLINE \
Z7_ATTRIB_NO_VECTOR \
Byte *Z7_BRANCH_CONV(name)(Byte *p, SizeT size, UInt32 pc, int encoding)

◆ Z7_BRANCH_FUNCS_IMP

#define Z7_BRANCH_FUNCS_IMP ( name)
Value:
Z7_BRANCH_FUNC_IMP(name, Z7_BRANCH_CONV_ENC_2, 1)
#define Z7_BRANCH_FUNC_IMP(name, m, encoding)
Definition Bra.c:37
#define Z7_BRANCH_CONV_ENC_2(name)
Definition Bra.h:14
#define Z7_BRANCH_CONV_DEC_2(name)
Definition Bra.h:13

◆ Z7_UNLIKELY

#define Z7_UNLIKELY ( x)
Value:
(x)

Function Documentation

◆ RISCV()

Byte *Z7_BRANCH_CONV_DEC RISCV ( Byte * p,
SizeT size,
UInt32 pc )

◆ Z7_BRANCH_FUNC_MAIN() [1/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_ARM )

◆ Z7_BRANCH_FUNC_MAIN() [2/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_ARM64 )

◆ Z7_BRANCH_FUNC_MAIN() [3/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_ARMT )

◆ Z7_BRANCH_FUNC_MAIN() [4/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_IA64 )

◆ Z7_BRANCH_FUNC_MAIN() [5/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_PPC )

◆ Z7_BRANCH_FUNC_MAIN() [6/6]

Z7_BRANCH_FUNC_MAIN ( BranchConv_SPARC )