From 7a77b8f7bd5e7d19e21f730f5c8c9ac8c7e3a4fa Mon Sep 17 00:00:00 2001 From: billow Date: Sun, 12 Oct 2025 08:02:03 +0800 Subject: [PATCH] linter: update clang-format installation to version 20 (#5451) * fix: format with clang-format-20 * fix: fix clang-format linter with rewrite '^#define.*/\*.*\\$' * fix: update clang-format to version 20 in workflows and documentation * fix: add SPDX license information to .git-blame-ignore-revs --- .git-blame-ignore-revs | 6 + .github/workflows/linter.yml | 6 +- DEVELOPERS.md | 4 +- librz/arch/hint.c | 16 +- librz/arch/isa/amd29k/amd29k.c | 2 +- librz/arch/isa/arm/armass.c | 6 +- librz/arch/isa/avr/assembler.c | 2 +- librz/arch/isa/avr/avr_esil.c | 4 +- librz/arch/isa/lh5801/lh5801.c | 4 +- librz/arch/isa/luac/v53/arch_53.h | 4 +- librz/arch/isa/luac/v54/arch_54.h | 6 +- librz/arch/isa/ppc/libps/libps_internal.h | 6 +- librz/arch/isa/rx/rx_opcode_detail.c | 5 +- librz/arch/isa/rx/rx_str.inc | 4 +- librz/arch/isa/v810/v810_disas.h | 12 +- librz/arch/isa/x86/il_ops.inc | 2 +- librz/arch/isa/xtensa/xtensa_il.c | 2 +- librz/arch/p/analysis/analysis_i4004.c | 2 +- librz/arch/p/analysis/analysis_pyc.c | 2 +- librz/arch/p/analysis/analysis_sh.c | 214 +- librz/arch/p/analysis/analysis_x86_zydis.c | 8 +- librz/bin/format/elf/elf.h | 9 +- librz/bin/format/elf/elf_relocs_conversion.c | 2 +- librz/bin/format/elf/elf_relocs_patching.c | 2 +- librz/bin/format/elf/glibc_elf.h | 901 ++-- librz/bin/format/java/class_attribute.h | 2 +- librz/bin/format/mach0/mach0_defines.h | 2 +- librz/bin/format/mdmp/mdmp_pe.c | 6 +- librz/bin/format/objc/mach0_classes.c | 2 +- librz/bin/format/pe/pe.c | 33 +- librz/bin/format/pe/pe.h | 2 +- librz/bin/format/pe/pe_rsrc.c | 2 +- librz/bin/format/pe/pemixed.c | 18 +- librz/bin/p/bin_elf.inc | 2 +- librz/bin/p/bin_pe.inc | 9 +- librz/core/cannotated_code.c | 3 +- librz/core/cbin.c | 10 +- librz/core/linux_heap_glibc.c | 147 +- librz/core/linux_heap_jemalloc.c | 9 +- librz/core/windows_heap.c | 6 +- librz/crypto/des.c | 4 +- librz/crypto/p/crypto_blowfish.c | 2 +- librz/debug/p/native/windows/windows_debug.h | 15 +- librz/egg/emit_x86.c | 2 +- librz/hash/algorithms/sm3/sm3.c | 2 +- librz/hash/algorithms/ssdeep/fnv_hash.h | 4608 ++++++++++++++++-- librz/hash/p/algo_crca.c | 2 +- librz/hash/p/algo_fletcher.c | 6 +- librz/include/rz_bin.h | 2 +- librz/include/rz_cons.h | 4 +- librz/include/rz_magic.h | 5 +- librz/include/rz_types.h | 4 +- librz/include/rz_types_base.h | 4 +- librz/include/rz_util/ht_inc.h | 18 +- librz/include/rz_util/rz_buf.h | 8 +- librz/include/rz_util/rz_sys.h | 4 +- librz/io/p/io_self.c | 12 +- librz/magic/magic.c | 6 +- librz/util/bitvector.c | 4 +- librz/util/mem.c | 2 +- librz/util/print.c | 9 +- librz/util/sdb/src/cdb_make.c | 2 +- librz/util/sdb/src/text.c | 22 +- librz/util/sys.c | 8 +- librz/util/unum.c | 2 +- subprojects/rzqnx/include/core.h | 2 +- subprojects/rzwinkd/transport.h | 4 +- test/unit/test_bitvector.c | 12 +- test/unit/test_debug.c | 2 +- 69 files changed, 4827 insertions(+), 1434 deletions(-) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 0000000000..d24ff189a1 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2025 Billow +# SPDX-License-Identifier: LGPL-3.0-only + +# Update to clang-format-20 +2d87400ce332b9d30b4f20ff9c64029350860e28 +f21940662a90b3e0474f97fd7124a4e2afa87254 diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index c618c7642a..3af97bfe7b 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -110,15 +110,15 @@ jobs: - name: Checkout repository uses: actions/checkout@v5 - - name: Install clang-format-16 - run: sudo apt --assume-yes install clang-format-16 + - name: Install clang-format-20 + run: sudo apt --assume-yes install clang-format-20 - name: Install gitpython run: sudo pip install gitpython - name: Run clang-format run: | - sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-16 160 + sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-20 200 clang-format --version python sys/clang-format.py --check --verbose diff --git a/DEVELOPERS.md b/DEVELOPERS.md index 89467bf82d..950d443d47 100644 --- a/DEVELOPERS.md +++ b/DEVELOPERS.md @@ -51,13 +51,13 @@ E.g.: `Bug fix did not change the general behavior of the function. No documenta In order to contribute with patches or plugins, we encourage you to use the same coding style as the rest of the code base. -* Use git-clang-format 16 to format your code. If clang-format-16 is not available on +* Use git-clang-format-20 to format your code. If clang-format-20 is not available on your Debian-based distribution, you can install it from https://apt.llvm.org/. You should invoke it as below (after making sure that your local copy of `dev` is up-to-date and your branch is up-to-date with `dev`): ```bash -git-clang-format-16 --extensions c,cpp,h,hpp,inc --style file dev +git-clang-format-20 --extensions c,cpp,h,hpp,inc --style file dev ``` There is a script available to run on all source files; you will need python and diff --git a/librz/arch/hint.c b/librz/arch/hint.c index 42774c8869..8e5048ca96 100644 --- a/librz/arch/hint.c +++ b/librz/arch/hint.c @@ -198,8 +198,8 @@ static RzAnalysisRangedHintRecordBase *ensure_ranged_hint_record(RBTree *tree, u RZ_API void rz_analysis_hint_set_offset(RzAnalysis *a, ut64 addr, const char *typeoff) { SET_HINT(RZ_ANALYSIS_ADDR_HINT_TYPE_TYPE_OFFSET, - free(r->type_offset); - r->type_offset = rz_str_dup(typeoff);); + free(r->type_offset); + r->type_offset = rz_str_dup(typeoff);); } RZ_API void rz_analysis_hint_set_nword(RzAnalysis *a, ut64 addr, int nword) { @@ -240,20 +240,20 @@ RZ_API void rz_analysis_hint_set_ret(RzAnalysis *a, ut64 addr, ut64 val) { RZ_API void rz_analysis_hint_set_syntax(RzAnalysis *a, ut64 addr, const char *syn) { SET_HINT(RZ_ANALYSIS_ADDR_HINT_TYPE_SYNTAX, - free(r->syntax); - r->syntax = rz_str_dup(syn);); + free(r->syntax); + r->syntax = rz_str_dup(syn);); } RZ_API void rz_analysis_hint_set_opcode(RzAnalysis *a, ut64 addr, const char *opcode) { SET_HINT(RZ_ANALYSIS_ADDR_HINT_TYPE_OPCODE, - free(r->opcode); - r->opcode = rz_str_dup(opcode);); + free(r->opcode); + r->opcode = rz_str_dup(opcode);); } RZ_API void rz_analysis_hint_set_esil(RzAnalysis *a, ut64 addr, const char *esil) { SET_HINT(RZ_ANALYSIS_ADDR_HINT_TYPE_ESIL, - free(r->esil); - r->esil = rz_str_dup(esil);); + free(r->esil); + r->esil = rz_str_dup(esil);); } RZ_API void rz_analysis_hint_set_type(RzAnalysis *a, ut64 addr, int type) { diff --git a/librz/arch/isa/amd29k/amd29k.c b/librz/arch/isa/amd29k/amd29k.c index cbb470312b..22a0d29703 100644 --- a/librz/arch/isa/amd29k/amd29k.c +++ b/librz/arch/isa/amd29k/amd29k.c @@ -22,7 +22,7 @@ // Local registers #define AMD29K_IS_REG_LR(x) ((x) >= 128 && (x) < 256) #define AMD29K_REGNAME(x) (AMD29K_IS_REG_GR(x) ? "gr" : "lr") -#define AMD29K_LR(x) (AMD29K_IS_REG_GR(x) ? (x) : (x)-127) +#define AMD29K_LR(x) (AMD29K_IS_REG_GR(x) ? (x) : (x) - 127) static void decode_ra_rb_rci(amd29k_instr_t *instruction, const ut8 *buffer) { AMD29K_SET_VALUE(instruction, 0, buffer[1], AMD29K_TYPE_REG); diff --git a/librz/arch/isa/arm/armass.c b/librz/arch/isa/arm/armass.c index 1aaa31289e..d080620b31 100644 --- a/librz/arch/isa/arm/armass.c +++ b/librz/arch/isa/arm/armass.c @@ -5813,7 +5813,7 @@ static int arm_assemble(ArmOpcode *ao, ut64 off, const char *str) { } ao->o |= ((ret >> 16) & 0xff) << 8; ao->o |= ((ret >> 8) & 0xff) << 16; - ao->o |= ((ret)&0xff) << 24; + ao->o |= ((ret) & 0xff) << 24; } else { RZ_LOG_ERROR("assembler: arm: %s: instruction does not accept a register as argument\n", ops[i].name); return 0; @@ -5839,7 +5839,7 @@ static int arm_assemble(ArmOpcode *ao, ut64 off, const char *str) { dst /= 4; ao->o |= ((dst >> 16) & 0xff) << 8; ao->o |= ((dst >> 8) & 0xff) << 16; - ao->o |= ((dst)&0xff) << 24; + ao->o |= ((dst) & 0xff) << 24; return 4; } else { ao->o |= (getreg(ao->a[0]) << 24); @@ -5850,7 +5850,7 @@ static int arm_assemble(ArmOpcode *ao, ut64 off, const char *str) { o |= ((n >> 12) & 0xf) << 8; o |= ((n >> 8) & 0xf) << 20; o |= ((n >> 4) & 0xf) << 16; - o |= ((n)&0xf) << 24; + o |= ((n) & 0xf) << 24; ao->o |= o; } break; case TYPE_SWI: diff --git a/librz/arch/isa/avr/assembler.c b/librz/arch/isa/avr/assembler.c index da7e9c81ff..7cc4b1ba05 100644 --- a/librz/arch/isa/avr/assembler.c +++ b/librz/arch/isa/avr/assembler.c @@ -131,7 +131,7 @@ (rn) = abs - pc; \ } \ if ((rn) < 0) { \ - (rn) = ~(-((rn)-1)); \ + (rn) = ~(-((rn) - 1)); \ } else { \ (rn) -= 2; \ } \ diff --git a/librz/arch/isa/avr/avr_esil.c b/librz/arch/isa/avr/avr_esil.c index 47197c8b10..04979a381c 100644 --- a/librz/arch/isa/avr/avr_esil.c +++ b/librz/arch/isa/avr/avr_esil.c @@ -52,8 +52,8 @@ static OPCODE_DESC *avr_op_analyze(RzAnalysis *analysis, RzAnalysisOp *op, ut64 #define CPU_MODEL_DECL(model, pc, consts) \ { \ model, \ - pc, \ - consts \ + pc, \ + consts \ } #define MASK(bits) ((bits) == 32 ? 0xffffffff : (~((~((ut32)0)) << (bits)))) #define CPU_PC_MASK(cpu) MASK((cpu)->pc) diff --git a/librz/arch/isa/lh5801/lh5801.c b/librz/arch/isa/lh5801/lh5801.c index a8399444ac..ff61e3409c 100644 --- a/librz/arch/isa/lh5801/lh5801.c +++ b/librz/arch/isa/lh5801/lh5801.c @@ -131,8 +131,8 @@ enum lh5801_insn_format { LH5801_IFMT_RMODE_MASK = 3 << 10, }; -#define LH5801_IFMT_IMMS(f) ((f)&LH5801_IFMT_IMM_MASK) -#define LH5801_IFMT_RMODE(f) ((f)&LH5801_IFMT_RMODE_MASK) +#define LH5801_IFMT_IMMS(f) ((f) & LH5801_IFMT_IMM_MASK) +#define LH5801_IFMT_RMODE(f) ((f) & LH5801_IFMT_RMODE_MASK) static bool lh5801_ifmt_fd_matches(enum lh5801_insn_format fmt, int fd) { switch (fmt & LH5801_IFMT_FD_MASK) { diff --git a/librz/arch/isa/luac/v53/arch_53.h b/librz/arch/isa/luac/v53/arch_53.h index 020bc92591..85e217528b 100644 --- a/librz/arch/isa/luac/v53/arch_53.h +++ b/librz/arch/isa/luac/v53/arch_53.h @@ -166,11 +166,11 @@ name args description #define cast(x, y) ((x)(y)) #define GET_OPCODE(i) (cast(LuaOpCode, ((i) >> POS_OP) & MASK1(SIZE_OP, 0))) -#define SET_OPCODE(i, o) ((i) = (((i)&MASK0(SIZE_OP, POS_OP)) | \ +#define SET_OPCODE(i, o) ((i) = (((i) & MASK0(SIZE_OP, POS_OP)) | \ ((cast(ut32, o) << POS_OP) & MASK1(SIZE_OP, POS_OP)))) #define getarg(i, pos, size) (cast(int, ((i) >> (pos)) & MASK1(size, 0))) -#define setarg(i, v, pos, size) ((i) = (((i)&MASK0(size, pos)) | \ +#define setarg(i, v, pos, size) ((i) = (((i) & MASK0(size, pos)) | \ ((cast(ut32, v) << (pos)) & MASK1(size, pos)))) #define GETARG_A(i) getarg(i, POS_A, SIZE_A) diff --git a/librz/arch/isa/luac/v54/arch_54.h b/librz/arch/isa/luac/v54/arch_54.h index 54c50a3138..403637bcd1 100644 --- a/librz/arch/isa/luac/v54/arch_54.h +++ b/librz/arch/isa/luac/v54/arch_54.h @@ -188,7 +188,7 @@ typedef enum { /* Macros Highlight the cast */ #define LUA_CAST(x, y) ((x)y) #define int2sC(i) ((i) + LUAOP_FIX_sC) -#define sC2int(i) ((i)-LUAOP_FIX_sC) +#define sC2int(i) ((i) - LUAOP_FIX_sC) /* creates a mask with 'n' 1/0 bits at position 'p' */ #define LUA_MASK1(n, p) ((~((~(LuaInstruction)0) << (n))) << (p)) @@ -196,12 +196,12 @@ typedef enum { /* OPCODE getter */ #define LUA_GET_OPCODE(i) (LUA_CAST(LuaOpCode, ((i) >> LUAOP_OP_OFFSET) & LUA_MASK1(LUAOP_OP_SIZE, 0))) -#define LUA_SET_OPCODE(i, o) ((i) = (((i)&LUA_MASK0(LUAOP_OP_SIZE, LUAOP_OP_OFFSET)) | \ +#define LUA_SET_OPCODE(i, o) ((i) = (((i) & LUA_MASK0(LUAOP_OP_SIZE, LUAOP_OP_OFFSET)) | \ ((LUA_CAST(LuaInstruction, o) << LUAOP_OP_OFFSET) & LUA_MASK1(LUAOP_OP_SIZE, LUAOP_OP_OFFSET)))) /* Arguments getter */ #define LUA_GETARG(i, offset, size) (LUA_CAST(int, ((i) >> (offset)) & LUA_MASK1(size, 0))) -#define LUA_SETARG(i, v, pos, size) ((i) = (((i)&LUA_MASK0(size, pos)) | \ +#define LUA_SETARG(i, v, pos, size) ((i) = (((i) & LUA_MASK0(size, pos)) | \ ((LUA_CAST(LuaInstruction, v) << (pos)) & LUA_MASK1(size, pos)))) #define LUA_GETARG_A(i) LUA_GETARG(i, LUAOP_A_OFFSET, LUAOP_A_SIZE) diff --git a/librz/arch/isa/ppc/libps/libps_internal.h b/librz/arch/isa/ppc/libps/libps_internal.h index bb42cf2221..95594fcb92 100644 --- a/librz/arch/isa/ppc/libps/libps_internal.h +++ b/librz/arch/isa/ppc/libps/libps_internal.h @@ -15,16 +15,16 @@ #define OP_MASK OP(0x3f) #define OPS(op, xop) (OP(op) | ((((ut32)(xop)) & 0x1f) << 1)) -#define OPSC(op, xop, rc) (OPS((op), (xop)) | ((rc)&1)) +#define OPSC(op, xop, rc) (OPS((op), (xop)) | ((rc) & 1)) #define OPS_MASK OPSC(0x3f, 0x1f, 1) #define OPS_MASK_DOT OPSC(0x3f, 0x1f, 1) #define OPM(op, xop) (OP(op) | ((((ut32)(xop)) & 0x3f) << 1)) -#define OPMC(op, xop, rc) (OPM((op), (xop)) | ((rc)&1)) +#define OPMC(op, xop, rc) (OPM((op), (xop)) | ((rc) & 1)) #define OPM_MASK OPMC(0x3f, 0x3f, 0) #define OPL(op, xop) (OP(op) | ((((ut32)(xop)) & 0x3ff) << 1)) -#define OPLC(op, xop, rc) (OPL((op), (xop)) | ((rc)&1)) +#define OPLC(op, xop, rc) (OPL((op), (xop)) | ((rc) & 1)) #define OPL_MASK OPLC(0x3f, 0x3ff, 1) #define OPL_MASK_DOT OPLC(0x3f, 0x3ff, 1) diff --git a/librz/arch/isa/rx/rx_opcode_detail.c b/librz/arch/isa/rx/rx_opcode_detail.c index 8ab9f64ccf..9b981dbe48 100644 --- a/librz/arch/isa/rx/rx_opcode_detail.c +++ b/librz/arch/isa/rx/rx_opcode_detail.c @@ -33,7 +33,10 @@ { .type = RX_TOKEN_CB, .tk.cb.tk_len = (x) } #define RxDspSplit(x, v, it, xx) \ { .type = RX_TOKEN_DSP_SPLIT, \ - .tk.dsp_sp.tk_len = (x), .tk.dsp_sp.vid = (v), .tk.dsp_sp.tk_len_more = (xx), .tk.dsp_sp.interval = (it) } + .tk.dsp_sp.tk_len = (x), \ + .tk.dsp_sp.vid = (v), \ + .tk.dsp_sp.tk_len_more = (xx), \ + .tk.dsp_sp.interval = (it) } #define RxIgnore(x) \ { .type = RX_TOKEN_IGNORE, .tk.reserved.tk_len = (x) } diff --git a/librz/arch/isa/rx/rx_str.inc b/librz/arch/isa/rx/rx_str.inc index 1404cc1402..f820932cf3 100644 --- a/librz/arch/isa/rx/rx_str.inc +++ b/librz/arch/isa/rx/rx_str.inc @@ -165,7 +165,7 @@ const char *cond_names[RX_COND_RESERVED] = { }; #define RxNameOp(op) ((op) < _RX_OP_COUNT ? opnames[(op)] : "invalid") -#define RxNameExt(ext) ((ext) < _RX_EXT_COUNT ? extmark_names[((ext)-RX_EXT_B)] : "invalid") -#define RxNameReg(reg) ((reg) < RX_REG_RESERVED ? reg_names[(reg)-RX_REG_R0] : "invalid") +#define RxNameExt(ext) ((ext) < _RX_EXT_COUNT ? extmark_names[((ext) - RX_EXT_B)] : "invalid") +#define RxNameReg(reg) ((reg) < RX_REG_RESERVED ? reg_names[(reg) - RX_REG_R0] : "invalid") #define RxNameFlag(flag) ((flag) < 7 ? flag_names[(flag)] : "invalid") #define RxNameCond(cond) ((cond) < RX_COND_RESERVED ? cond_names[(cond)] : "invalid") \ No newline at end of file diff --git a/librz/arch/isa/v810/v810_disas.h b/librz/arch/isa/v810/v810_disas.h index 084081f44e..eb93ad7058 100644 --- a/librz/arch/isa/v810/v810_disas.h +++ b/librz/arch/isa/v810/v810_disas.h @@ -7,17 +7,17 @@ #define V810_INSTR_MAXLEN 24 #define OPCODE(instr) (((instr) >> 10) & 0x3F) -#define REG1(instr) ((instr)&0x1F) +#define REG1(instr) ((instr) & 0x1F) #define REG2(instr) (((instr) >> 5) & 0x1F) #define IMM5(instr) REG1((instr)) #define COND(instr) (((instr) >> 9) & 0xF) -#define SIGN_EXT_T5(imm) (((imm)&0x10) ? (imm) | 0xE0 : (imm)) -#define SIGN_EXT_T9(imm) (((imm)&0x100) ? (imm) | 0xFFFFFE00 : (imm)) -#define SIGN_EXT_T26(imm) (((imm)&0x2000000) ? (imm) | 0xFC000000 : (imm)) +#define SIGN_EXT_T5(imm) (((imm) & 0x10) ? (imm) | 0xE0 : (imm)) +#define SIGN_EXT_T9(imm) (((imm) & 0x100) ? (imm) | 0xFFFFFE00 : (imm)) +#define SIGN_EXT_T26(imm) (((imm) & 0x2000000) ? (imm) | 0xFC000000 : (imm)) -#define DISP9(word1) SIGN_EXT_T9((word1)&0x1FE) -#define DISP26(word1, word2) SIGN_EXT_T26((((word1)&0x3FF) << 16) | (word2)) +#define DISP9(word1) SIGN_EXT_T9((word1) & 0x1FE) +#define DISP26(word1, word2) SIGN_EXT_T26((((word1) & 0x3FF) << 16) | (word2)) enum v810_cmd_opcodes { V810_MOV = 0x0, diff --git a/librz/arch/isa/x86/il_ops.inc b/librz/arch/isa/x86/il_ops.inc index 884cd2c594..aa99981a64 100644 --- a/librz/arch/isa/x86/il_ops.inc +++ b/librz/arch/isa/x86/il_ops.inc @@ -1485,7 +1485,7 @@ IL_LIFTER(nop) { * One's complement negation * Encoding: M */ -IL_LIFTER(not ) { +IL_LIFTER(not) { return x86_il_set_op(0, LOGNOT(x86_il_get_op(0))); } diff --git a/librz/arch/isa/xtensa/xtensa_il.c b/librz/arch/isa/xtensa/xtensa_il.c index 022cf02519..1025e8f96e 100644 --- a/librz/arch/isa/xtensa/xtensa_il.c +++ b/librz/arch/isa/xtensa/xtensa_il.c @@ -78,7 +78,7 @@ static RzILOpEffect *x_setg(const char *name, RzILOpPure *x) { #define B2U32(X) BOOL_TO_BV(X, 32) typedef RzAnalysisLiftedILOp (*fn_analyze_op_il)(XtensaContext *ctx); -typedef RzILOpPure *(fn_op2)(RzILOpBool *x, RzILOpBool *y); +typedef RzILOpPure *(fn_op2)(RzILOpBool * x, RzILOpBool *y); enum { PS_INTLEVEL, /// Interrupt level mask diff --git a/librz/arch/p/analysis/analysis_i4004.c b/librz/arch/p/analysis/analysis_i4004.c index 50ca97ec6d..1e979e5e60 100644 --- a/librz/arch/p/analysis/analysis_i4004.c +++ b/librz/arch/p/analysis/analysis_i4004.c @@ -9,7 +9,7 @@ #include #include -#define AVR_SOFTCAST(x, y) ((x) + ((y)*0x100)) +#define AVR_SOFTCAST(x, y) ((x) + ((y) * 0x100)) static char *get_reg_profile(RzAnalysis *analysis) { const char *p = diff --git a/librz/arch/p/analysis/analysis_pyc.c b/librz/arch/p/analysis/analysis_pyc.c index f5d01bd0f1..60065f3581 100644 --- a/librz/arch/p/analysis/analysis_pyc.c +++ b/librz/arch/p/analysis/analysis_pyc.c @@ -8,7 +8,7 @@ #include "pyc/pyc_dis.h" -#define JMP_OFFSET(ops, v) ((ops)->jump_use_instruction_offset ? (v)*2 : (v)) +#define JMP_OFFSET(ops, v) ((ops)->jump_use_instruction_offset ? (v) * 2 : (v)) static int archinfo(RzAnalysis *analysis, RzAnalysisInfoType query) { if (!strcmp(analysis->cpu, "x86")) { diff --git a/librz/arch/p/analysis/analysis_sh.c b/librz/arch/p/analysis/analysis_sh.c index e7031aee62..3f36c9ba47 100644 --- a/librz/arch/p/analysis/analysis_sh.c +++ b/librz/arch/p/analysis/analysis_sh.c @@ -38,138 +38,138 @@ #define IS_CLRMAC(x) x == 0x0028 #define IS_RTE(x) x == 0x002b -#define IS_STCSR1(x) (((x)&0xF0CF) == 0x0002) // mask stc Rn,{SR,gbr,VBR,SSR} -#define IS_BSRF(x) ((x)&0xf0ff) == 0x0003 -#define IS_BRAF(x) (((x)&0xf0ff) == 0x0023) -#define IS_MOVB_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0004) -#define IS_MOVW_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0005) -#define IS_MOVL_REG_TO_R0REL(x) (((x)&0xF00F) == 0x0006) -#define IS_MULL(x) (((x)&0xF00F) == 0x0007) -#define IS_MOVB_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000C) -#define IS_MOVW_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000D) -#define IS_MOVL_R0REL_TO_REG(x) (((x)&0xF00F) == 0x000E) -#define IS_MACL(x) (((x)&0xF00F) == 0x000F) -#define IS_MOVT(x) (((x)&0xF0FF) == 0x0029) -#define IS_STSMACH(x) (((x)&0xF0FF) == 0x000A) -#define IS_STSMACL(x) (((x)&0xF0FF) == 0x001A) -#define IS_STSPR(x) (((x)&0xF0FF) == 0x002A) +#define IS_STCSR1(x) (((x) & 0xF0CF) == 0x0002) // mask stc Rn,{SR,gbr,VBR,SSR} +#define IS_BSRF(x) ((x) & 0xf0ff) == 0x0003 +#define IS_BRAF(x) (((x) & 0xf0ff) == 0x0023) +#define IS_MOVB_REG_TO_R0REL(x) (((x) & 0xF00F) == 0x0004) +#define IS_MOVW_REG_TO_R0REL(x) (((x) & 0xF00F) == 0x0005) +#define IS_MOVL_REG_TO_R0REL(x) (((x) & 0xF00F) == 0x0006) +#define IS_MULL(x) (((x) & 0xF00F) == 0x0007) +#define IS_MOVB_R0REL_TO_REG(x) (((x) & 0xF00F) == 0x000C) +#define IS_MOVW_R0REL_TO_REG(x) (((x) & 0xF00F) == 0x000D) +#define IS_MOVL_R0REL_TO_REG(x) (((x) & 0xF00F) == 0x000E) +#define IS_MACL(x) (((x) & 0xF00F) == 0x000F) +#define IS_MOVT(x) (((x) & 0xF0FF) == 0x0029) +#define IS_STSMACH(x) (((x) & 0xF0FF) == 0x000A) +#define IS_STSMACL(x) (((x) & 0xF0FF) == 0x001A) +#define IS_STSPR(x) (((x) & 0xF0FF) == 0x002A) // #define IS_STSFPUL(x) (((x) & 0xF0FF) == 0x005A) //FP*: todo maybe someday // #define IS_STSFPSCR(x) (((x) & 0xF0FF) == 0x006A) -#define IS_MOVB_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2000) -#define IS_MOVW_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2001) -#define IS_MOVL_REG_TO_REGREF(x) (((x)&0xF00F) == 0x2002) +#define IS_MOVB_REG_TO_REGREF(x) (((x) & 0xF00F) == 0x2000) +#define IS_MOVW_REG_TO_REGREF(x) (((x) & 0xF00F) == 0x2001) +#define IS_MOVL_REG_TO_REGREF(x) (((x) & 0xF00F) == 0x2002) // #define invalid?(x) (((x) & 0xF00F) == 0x2003) //illegal on sh2e -#define IS_PUSHB(x) (((x)&0xF00F) == 0x2004) -#define IS_PUSHW(x) (((x)&0xF00F) == 0x2005) -#define IS_PUSHL(x) (((x)&0xF00F) == 0x2006) -#define IS_DIV0S(x) (((x)&0xF00F) == 0x2007) -#define IS_TSTRR(x) (((x)&0xF00F) == 0x2008) -#define IS_AND_REGS(x) (((x)&0xF00F) == 0x2009) -#define IS_XOR_REGS(x) (((x)&0xF00F) == 0x200A) -#define IS_OR_REGS(x) (((x)&0xF00F) == 0x200B) -#define IS_CMPSTR(x) (((x)&0xF00F) == 0x200C) -#define IS_XTRCT(x) (((x)&0xF00F) == 0x200D) -#define IS_MULUW(x) (((x)&0xF00F) == 0x200E) -#define IS_MULSW(x) (((x)&0xF00F) == 0x200F) -#define IS_CMPEQ(x) (((x)&0xF00F) == 0x3000) +#define IS_PUSHB(x) (((x) & 0xF00F) == 0x2004) +#define IS_PUSHW(x) (((x) & 0xF00F) == 0x2005) +#define IS_PUSHL(x) (((x) & 0xF00F) == 0x2006) +#define IS_DIV0S(x) (((x) & 0xF00F) == 0x2007) +#define IS_TSTRR(x) (((x) & 0xF00F) == 0x2008) +#define IS_AND_REGS(x) (((x) & 0xF00F) == 0x2009) +#define IS_XOR_REGS(x) (((x) & 0xF00F) == 0x200A) +#define IS_OR_REGS(x) (((x) & 0xF00F) == 0x200B) +#define IS_CMPSTR(x) (((x) & 0xF00F) == 0x200C) +#define IS_XTRCT(x) (((x) & 0xF00F) == 0x200D) +#define IS_MULUW(x) (((x) & 0xF00F) == 0x200E) +#define IS_MULSW(x) (((x) & 0xF00F) == 0x200F) +#define IS_CMPEQ(x) (((x) & 0xF00F) == 0x3000) // #define invalid?(x) (((x) & 0xF00F) == 0x3001) -#define IS_CMPHS(x) (((x)&0xF00F) == 0x3002) -#define IS_CMPGE(x) (((x)&0xF00F) == 0x3003) -#define IS_CMPHI(x) (((x)&0xF00F) == 0x3006) -#define IS_CMPGT(x) (((x)&0xF00F) == 0x3007) -#define IS_DIV1(x) (((x)&0xF00F) == 0x3004) -#define IS_DMULU(x) (((x)&0xF00F) == 0x3005) -#define IS_DMULS(x) (((x)&0xF00F) == 0x300D) -#define IS_SUB(x) (((x)&0xF00F) == 0x3008) +#define IS_CMPHS(x) (((x) & 0xF00F) == 0x3002) +#define IS_CMPGE(x) (((x) & 0xF00F) == 0x3003) +#define IS_CMPHI(x) (((x) & 0xF00F) == 0x3006) +#define IS_CMPGT(x) (((x) & 0xF00F) == 0x3007) +#define IS_DIV1(x) (((x) & 0xF00F) == 0x3004) +#define IS_DMULU(x) (((x) & 0xF00F) == 0x3005) +#define IS_DMULS(x) (((x) & 0xF00F) == 0x300D) +#define IS_SUB(x) (((x) & 0xF00F) == 0x3008) // #define invalid?(x) (((x) & 0xF00F) == 0x3009) -#define IS_SUBC(x) (((x)&0xF00F) == 0x300A) -#define IS_SUBV(x) (((x)&0xF00F) == 0x300B) -#define IS_ADD(x) (((x)&0xF00F) == 0x300C) -#define IS_ADDC(x) (((x)&0xF00F) == 0x300E) -#define IS_ADDV(x) (((x)&0xF00F) == 0x300F) -#define IS_MACW(x) (((x)&0xF00F) == 0x400F) -#define IS_JSR(x) (((x)&0xf0ff) == 0x400b) -#define IS_JMP(x) (((x)&0xf0ff) == 0x402b) -#define IS_CMPPL(x) (((x)&0xf0ff) == 0x4015) -#define IS_CMPPZ(x) (((x)&0xf0ff) == 0x4011) -#define IS_LDCSR(x) (((x)&0xF0FF) == 0x400E) -#define IS_LDCGBR(x) (((x)&0xF0FF) == 0x401E) -#define IS_LDCVBR(x) (((x)&0xF0FF) == 0x402E) -#define IS_LDCLSR(x) (((x)&0xF0FF) == 0x4007) -#define IS_LDCLSRGBR(x) (((x)&0xF0FF) == 0x4017) -#define IS_LDCLSRVBR(x) (((x)&0xF0FF) == 0x4027) -#define IS_LDSMACH(x) (((x)&0xF0FF) == 0x400A) -#define IS_LDSMACL(x) (((x)&0xF0FF) == 0x401A) -#define IS_LDSLMACH(x) (((x)&0xF0FF) == 0x4006) -#define IS_LDSLMACL(x) (((x)&0xF0FF) == 0x4016) -#define IS_LDSPR(x) (((x)&0xF0FF) == 0x402A) -#define IS_LDSLPR(x) (((x)&0xF0FF) == 0x4026) +#define IS_SUBC(x) (((x) & 0xF00F) == 0x300A) +#define IS_SUBV(x) (((x) & 0xF00F) == 0x300B) +#define IS_ADD(x) (((x) & 0xF00F) == 0x300C) +#define IS_ADDC(x) (((x) & 0xF00F) == 0x300E) +#define IS_ADDV(x) (((x) & 0xF00F) == 0x300F) +#define IS_MACW(x) (((x) & 0xF00F) == 0x400F) +#define IS_JSR(x) (((x) & 0xf0ff) == 0x400b) +#define IS_JMP(x) (((x) & 0xf0ff) == 0x402b) +#define IS_CMPPL(x) (((x) & 0xf0ff) == 0x4015) +#define IS_CMPPZ(x) (((x) & 0xf0ff) == 0x4011) +#define IS_LDCSR(x) (((x) & 0xF0FF) == 0x400E) +#define IS_LDCGBR(x) (((x) & 0xF0FF) == 0x401E) +#define IS_LDCVBR(x) (((x) & 0xF0FF) == 0x402E) +#define IS_LDCLSR(x) (((x) & 0xF0FF) == 0x4007) +#define IS_LDCLSRGBR(x) (((x) & 0xF0FF) == 0x4017) +#define IS_LDCLSRVBR(x) (((x) & 0xF0FF) == 0x4027) +#define IS_LDSMACH(x) (((x) & 0xF0FF) == 0x400A) +#define IS_LDSMACL(x) (((x) & 0xF0FF) == 0x401A) +#define IS_LDSLMACH(x) (((x) & 0xF0FF) == 0x4006) +#define IS_LDSLMACL(x) (((x) & 0xF0FF) == 0x4016) +#define IS_LDSPR(x) (((x) & 0xF0FF) == 0x402A) +#define IS_LDSLPR(x) (((x) & 0xF0FF) == 0x4026) // #define IS_LDSFPUL(x) (((x) & 0xF0FF) == 0x405A) //FP*: todo maybe someday // #define IS_LDSFPSCR(x) (((x) & 0xF0FF) == 0x406A) // #define IS_LDSLFPUL(x) (((x) & 0xF0FF) == 0x4066) // #define IS_LDSLFPSCR(x) (((x) & 0xF0FF) == 0x4056) -#define IS_ROTCR(x) (((x)&0xF0FF) == 0x4025) -#define IS_ROTCL(x) (((x)&0xF0FF) == 0x4024) -#define IS_ROTL(x) (((x)&0xF0FF) == 0x4004) -#define IS_ROTR(x) (((x)&0xF0FF) == 0x4005) +#define IS_ROTCR(x) (((x) & 0xF0FF) == 0x4025) +#define IS_ROTCL(x) (((x) & 0xF0FF) == 0x4024) +#define IS_ROTL(x) (((x) & 0xF0FF) == 0x4004) +#define IS_ROTR(x) (((x) & 0xF0FF) == 0x4005) // not on sh2e : shad, shld // #define IS_SHIFT1(x) (((x) & 0xF0DE) == 0x4000) //unused (treated as switch-case) // other shl{l,r}{,2,8,16} in switch case also. -#define IS_STSLMACL(x) (((x)&0xF0FF) == 0x4012) -#define IS_STSLMACH(x) (((x)&0xF0FF) == 0x4002) -#define IS_STCLSR(x) (((x)&0xF0FF) == 0x4003) -#define IS_STCLGBR(x) (((x)&0xF0FF) == 0x4013) -#define IS_STCLVBR(x) (((x)&0xF0FF) == 0x4023) +#define IS_STSLMACL(x) (((x) & 0xF0FF) == 0x4012) +#define IS_STSLMACH(x) (((x) & 0xF0FF) == 0x4002) +#define IS_STCLSR(x) (((x) & 0xF0FF) == 0x4003) +#define IS_STCLGBR(x) (((x) & 0xF0FF) == 0x4013) +#define IS_STCLVBR(x) (((x) & 0xF0FF) == 0x4023) // todo: other stc.l not on sh2e -#define IS_STSLPR(x) (((x)&0xF0FF) == 0x4022) +#define IS_STSLPR(x) (((x) & 0xF0FF) == 0x4022) // #define IS_STSLFPUL(x) (((x) & 0xF0FF) == 0x4052) // #define IS_STSLFPSCR(x) (((x) & 0xF0FF) == 0x4062) -#define IS_TASB(x) (((x)&0xF0FF) == 0x401B) -#define IS_DT(x) (((x)&0xF0FF) == 0x4010) +#define IS_TASB(x) (((x) & 0xF0FF) == 0x401B) +#define IS_DT(x) (((x) & 0xF0FF) == 0x4010) -#define IS_MOVB_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6000) -#define IS_MOVW_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6001) -#define IS_MOVL_REGREF_TO_REG(x) (((x)&0xF00F) == 0x6002) -#define IS_MOV_REGS(x) (((x)&0xf00f) == 0x6003) -#define IS_MOVB_POP(x) (((x)&0xF00F) == 0x6004) -#define IS_MOVW_POP(x) (((x)&0xF00F) == 0x6005) -#define IS_MOVL_POP(x) (((x)&0xF00F) == 0x6006) -#define IS_NOT(x) (((x)&0xF00F) == 0x6007) -#define IS_SWAPB(x) (((x)&0xF00F) == 0x6008) -#define IS_SWAPW(x) (((x)&0xF00F) == 0x6009) -#define IS_NEG(x) (((x)&0xF00F) == 0x600B) -#define IS_NEGC(x) (((x)&0xF00F) == 0x600A) -#define IS_EXT(x) (((x)&0xF00C) == 0x600C) // match ext{s,u}.{b,w} +#define IS_MOVB_REGREF_TO_REG(x) (((x) & 0xF00F) == 0x6000) +#define IS_MOVW_REGREF_TO_REG(x) (((x) & 0xF00F) == 0x6001) +#define IS_MOVL_REGREF_TO_REG(x) (((x) & 0xF00F) == 0x6002) +#define IS_MOV_REGS(x) (((x) & 0xf00f) == 0x6003) +#define IS_MOVB_POP(x) (((x) & 0xF00F) == 0x6004) +#define IS_MOVW_POP(x) (((x) & 0xF00F) == 0x6005) +#define IS_MOVL_POP(x) (((x) & 0xF00F) == 0x6006) +#define IS_NOT(x) (((x) & 0xF00F) == 0x6007) +#define IS_SWAPB(x) (((x) & 0xF00F) == 0x6008) +#define IS_SWAPW(x) (((x) & 0xF00F) == 0x6009) +#define IS_NEG(x) (((x) & 0xF00F) == 0x600B) +#define IS_NEGC(x) (((x) & 0xF00F) == 0x600A) +#define IS_EXT(x) (((x) & 0xF00C) == 0x600C) // match ext{s,u}.{b,w} -#define IS_MOVB_R0_REGDISP(x) (((x)&0xFF00) == 0x8000) -#define IS_MOVW_R0_REGDISP(x) (((x)&0xFF00) == 0x8100) +#define IS_MOVB_R0_REGDISP(x) (((x) & 0xFF00) == 0x8000) +#define IS_MOVW_R0_REGDISP(x) (((x) & 0xFF00) == 0x8100) // #define illegal?(x) (((x) & 0xF900) == 0x8000) //match 8{2,3,6,7}00 -#define IS_MOVB_REGDISP_R0(x) (((x)&0xFF00) == 0x8400) -#define IS_MOVW_REGDISP_R0(x) (((x)&0xFF00) == 0x8500) -#define IS_CMPIMM(x) (((x)&0xFF00) == 0x8800) +#define IS_MOVB_REGDISP_R0(x) (((x) & 0xFF00) == 0x8400) +#define IS_MOVW_REGDISP_R0(x) (((x) & 0xFF00) == 0x8500) +#define IS_CMPIMM(x) (((x) & 0xFF00) == 0x8800) // #define illegal?(x) (((x) & 0xFB00) == 0x8A00) //match 8{A,E}00 -#define IS_BT(x) (((x)&0xff00) == 0x8900) -#define IS_BF(x) (((x)&0xff00) == 0x8B00) -#define IS_BTS(x) (((x)&0xff00) == 0x8D00) -#define IS_BFS(x) (((x)&0xff00) == 0x8F00) +#define IS_BT(x) (((x) & 0xff00) == 0x8900) +#define IS_BF(x) (((x) & 0xff00) == 0x8B00) +#define IS_BTS(x) (((x) & 0xff00) == 0x8D00) +#define IS_BFS(x) (((x) & 0xff00) == 0x8F00) #define IS_BT_OR_BF(x) IS_BT(x) || IS_BTS(x) || IS_BF(x) || IS_BFS(x) -#define IS_MOVB_R0_GBRREF(x) (((x)&0xFF00) == 0xC000) -#define IS_MOVW_R0_GBRREF(x) (((x)&0xFF00) == 0xC100) -#define IS_MOVL_R0_GBRREF(x) (((x)&0xFF00) == 0xC200) -#define IS_TRAP(x) (((x)&0xFF00) == 0xC300) -#define IS_MOVB_GBRREF_R0(x) (((x)&0xFF00) == 0xC400) -#define IS_MOVW_GBRREF_R0(x) (((x)&0xFF00) == 0xC500) -#define IS_MOVL_GBRREF_R0(x) (((x)&0xFF00) == 0xC600) -#define IS_MOVA_PCREL_R0(x) (((x)&0xFF00) == 0xC700) -#define IS_BINLOGIC_IMM_R0(x) (((x)&0xFC00) == 0xC800) // match C{8,9,A,B}00 -#define IS_BINLOGIC_IMM_GBR(x) (((x)&0xFC00) == 0xCC00) // match C{C,D,E,F}00 : *.b #imm, @(R0,gbr) +#define IS_MOVB_R0_GBRREF(x) (((x) & 0xFF00) == 0xC000) +#define IS_MOVW_R0_GBRREF(x) (((x) & 0xFF00) == 0xC100) +#define IS_MOVL_R0_GBRREF(x) (((x) & 0xFF00) == 0xC200) +#define IS_TRAP(x) (((x) & 0xFF00) == 0xC300) +#define IS_MOVB_GBRREF_R0(x) (((x) & 0xFF00) == 0xC400) +#define IS_MOVW_GBRREF_R0(x) (((x) & 0xFF00) == 0xC500) +#define IS_MOVL_GBRREF_R0(x) (((x) & 0xFF00) == 0xC600) +#define IS_MOVA_PCREL_R0(x) (((x) & 0xFF00) == 0xC700) +#define IS_BINLOGIC_IMM_R0(x) (((x) & 0xFC00) == 0xC800) // match C{8,9,A,B}00 +#define IS_BINLOGIC_IMM_GBR(x) (((x) & 0xFC00) == 0xCC00) // match C{C,D,E,F}00 : *.b #imm, @(R0,gbr) /* Compute PC-relative displacement for branch instructions */ -#define GET_BRA_OFFSET(x) ((x)&0x0fff) -#define GET_BTF_OFFSET(x) ((x)&0x00ff) +#define GET_BRA_OFFSET(x) ((x) & 0x0fff) +#define GET_BTF_OFFSET(x) ((x) & 0x00ff) /* Compute reg nr for BRAF,BSR,BSRF,JMP,JSR */ #define GET_TARGET_REG(x) (((x) >> 8) & 0x0f) diff --git a/librz/arch/p/analysis/analysis_x86_zydis.c b/librz/arch/p/analysis/analysis_x86_zydis.c index ef1a5a4ec4..51356208b7 100644 --- a/librz/arch/p/analysis/analysis_x86_zydis.c +++ b/librz/arch/p/analysis/analysis_x86_zydis.c @@ -1656,16 +1656,16 @@ static void anop_esil(RzAnalysis *a, RzAnalysisOp *op, const ut8 *buf, int len, ut64 xor = 0; switch (bitsize) { case 8: - xor = 0xff; + xor= 0xff; break; case 16: - xor = 0xffff; + xor= 0xffff; break; case 32: - xor = 0xffffffff; + xor= 0xffffffff; break; case 64: - xor = 0xffffffffffffffff; + xor= 0xffffffffffffffff; break; default: RZ_LOG_ERROR("x86: unhandled neg bitsize %" PFMT32d "\n", bitsize); diff --git a/librz/bin/format/elf/elf.h b/librz/bin/format/elf/elf.h index 9a8c9ae27a..c41f49b0d8 100644 --- a/librz/bin/format/elf/elf.h +++ b/librz/bin/format/elf/elf.h @@ -134,8 +134,7 @@ typedef struct rz_bin_elf_section_t { typedef struct Elf_(rz_bin_elf_segment_t) { Elf_(Phdr) data; bool is_valid; -} -RzBinElfSegment; +} RzBinElfSegment; typedef struct rz_bin_elf_symbol_t { ut64 paddr; @@ -173,8 +172,7 @@ typedef struct Elf_(rz_bin_elf_note_file_t) { Elf_(Addr) end_vaddr; Elf_(Addr) file_off; char *file; -} -RzBinElfNoteFile; +} RzBinElfNoteFile; /** * \brief Parsed PT_NOTE of type NT_PRSTATUS. @@ -193,8 +191,7 @@ typedef struct Elf_(rz_bin_elf_note_t) { RzBinElfNoteFile file; //< for type == NT_FILE RzBinElfNotePrStatus prstatus; //< for type = NT_PRSTATUS }; -} -RzBinElfNote; +} RzBinElfNote; typedef struct rz_bin_elf_strtab RzBinElfStrtab; diff --git a/librz/bin/format/elf/elf_relocs_conversion.c b/librz/bin/format/elf/elf_relocs_conversion.c index ad46959dc1..5bc13e3e6e 100644 --- a/librz/bin/format/elf/elf_relocs_conversion.c +++ b/librz/bin/format/elf/elf_relocs_conversion.c @@ -853,7 +853,7 @@ static RzBinReloc *reloc_convert_ppc64(ELFOBJ *bin, RzBinElfReloc *rel, ut64 GOT // MIPS64 has subtypes for relocs but we do not support it. #define ELF64_MIPS_R_TYPE3(i) (((i) >> 16) & 0xff) #define ELF64_MIPS_R_TYPE2(i) (((i) >> 8) & 0xff) -#define ELF64_MIPS_R_TYPE(i) ((i)&0xff) +#define ELF64_MIPS_R_TYPE(i) ((i) & 0xff) static RzBinReloc *reloc_convert_mips(ELFOBJ *bin, RzBinElfReloc *rel, ut64 GOT) { ut64 P = rel->vaddr; diff --git a/librz/bin/format/elf/elf_relocs_patching.c b/librz/bin/format/elf/elf_relocs_patching.c index 1708f41058..4cca97c4c6 100644 --- a/librz/bin/format/elf/elf_relocs_patching.c +++ b/librz/bin/format/elf/elf_relocs_patching.c @@ -891,7 +891,7 @@ static void patch_reloc_arm64(RZ_INOUT RzBuffer *buf_patched, const ut64 patch_a // AARCH64-specific defines // Take the PAGE component of an address or offset. #define PG(x) ((x) & ~0xFFFULL) -#define PG_OFFSET(x) ((x)&0xFFFULL) +#define PG_OFFSET(x) ((x) & 0xFFFULL) #define ADR_IMM_MASK1 (((1U << 2) - 1) << 29) #define ADR_IMM_MASK2 (((1U << 19) - 1) << 5) #define ADR_IMM_MASK3 (((1U << 19) - 1) << 2) diff --git a/librz/bin/format/elf/glibc_elf.h b/librz/bin/format/elf/glibc_elf.h index 4c298ae6f9..e0330c51e8 100644 --- a/librz/bin/format/elf/glibc_elf.h +++ b/librz/bin/format/elf/glibc_elf.h @@ -516,10 +516,8 @@ typedef struct #define SHN_UNDEF 0 /* Undefined section */ #define SHN_LORESERVE 0xff00 /* Start of reserved indices */ #define SHN_LOPROC 0xff00 /* Start of processor-specific */ -#define SHN_BEFORE 0xff00 /* Order section before all others \ - (Solaris). */ -#define SHN_AFTER 0xff01 /* Order section after all others \ - (Solaris). */ +#define SHN_BEFORE 0xff00 /* Order section before all others (Solaris). */ +#define SHN_AFTER 0xff01 /* Order section after all others (Solaris). */ #define SHN_HIPROC 0xff1f /* End of processor-specific */ #define SHN_LOOS 0xff20 /* Start of OS-specific */ #define SHN_HIOS 0xff3f /* End of OS-specific */ @@ -576,17 +574,14 @@ typedef struct #define SHF_STRINGS (1 << 5) /* Contains nul-terminated strings */ #define SHF_INFO_LINK (1 << 6) /* `sh_info' contains SHT index */ #define SHF_LINK_ORDER (1 << 7) /* Preserve order after combining */ -#define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling \ - required */ -#define SHF_GROUP (1 << 9) /* Section is member of a group. */ -#define SHF_TLS (1 << 10) /* Section hold thread-local data. */ -#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ -#define SHF_MASKOS 0x0ff00000 /* OS-specific. */ -#define SHF_MASKPROC 0xf0000000 /* Processor-specific */ -#define SHF_ORDERED (1 << 30) /* Special ordering requirement \ - (Solaris). */ -#define SHF_EXCLUDE (1U << 31) /* Section is excluded unless \ - referenced or allocated (Solaris).*/ +#define SHF_OS_NONCONFORMING (1 << 8) /* Non-standard OS specific handling required */ +#define SHF_GROUP (1 << 9) /* Section is member of a group. */ +#define SHF_TLS (1 << 10) /* Section hold thread-local data. */ +#define SHF_COMPRESSED (1 << 11) /* Section with compressed data. */ +#define SHF_MASKOS 0x0ff00000 /* OS-specific. */ +#define SHF_MASKPROC 0xf0000000 /* Processor-specific */ +#define SHF_ORDERED (1 << 30) /* Special ordering requirement (Solaris). */ +#define SHF_EXCLUDE (1U << 31) /* Section is excluded unless referenced or allocated (Solaris).*/ /* Section compression header. Used when SHF_COMPRESSED is set. */ @@ -662,8 +657,7 @@ typedef struct #define SYMINFO_FLG_DIRECT 0x0001 /* Direct bound symbol */ #define SYMINFO_FLG_PASSTHRU 0x0002 /* Pass-thru symbol for translator */ #define SYMINFO_FLG_COPY 0x0004 /* Symbol is a copy-reloc */ -#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy \ - loaded */ +#define SYMINFO_FLG_LAZYLOAD 0x0008 /* Symbol bound to object to be lazy loaded */ /* Syminfo version values. */ #define SYMINFO_NONE 0 #define SYMINFO_CURRENT 1 @@ -672,8 +666,8 @@ typedef struct /* How to extract and insert information held in the st_info field. */ #define ELF32_ST_BIND(val) (((unsigned char)(val)) >> 4) -#define ELF32_ST_TYPE(val) ((val)&0xf) -#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type)&0xf)) +#define ELF32_ST_TYPE(val) ((val) & 0xf) +#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) /* Both Elf32_Sym and Elf64_Sym use the same one-byte st_info field. */ #define ELF64_ST_BIND(val) ELF32_ST_BIND(val) @@ -716,7 +710,7 @@ typedef struct /* How to extract and insert information held in the st_other field. */ -#define ELF32_ST_VISIBILITY(o) ((o)&0x03) +#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) /* For ELF64 the definitions are the same. */ #define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY(o) @@ -765,11 +759,11 @@ typedef struct /* How to extract and insert information held in the r_info field. */ #define ELF32_R_SYM(val) ((val) >> 8) -#define ELF32_R_TYPE(val) ((val)&0xff) -#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type)&0xff)) +#define ELF32_R_TYPE(val) ((val) & 0xff) +#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) #define ELF64_R_SYM(i) ((i) >> 32) -#define ELF64_R_TYPE(i) ((i)&0xffffffff) +#define ELF64_R_TYPE(i) ((i) & 0xffffffff) #define ELF64_R_INFO(sym, type) ((((Elf64_Xword)(sym)) << 32) + (type)) /* Program segment header. */ @@ -838,50 +832,43 @@ typedef struct /* Legal values for note segment descriptor types for core files. */ -#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ -#define NT_PRFPREG 2 /* Contains copy of fpregset \ - struct. */ -#define NT_FPREGSET 2 /* Contains copy of fpregset struct */ -#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ -#define NT_PRXREG 4 /* Contains copy of prxregset struct */ -#define NT_TASKSTRUCT 4 /* Contains copy of task structure */ -#define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ -#define NT_AUXV 6 /* Contains copy of auxv array */ -#define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ -#define NT_ASRS 8 /* Contains copy of asrset struct */ -#define NT_PSTATUS 10 /* Contains copy of pstatus struct */ -#define NT_PSINFO 13 /* Contains copy of psinfo struct */ -#define NT_PRCRED 14 /* Contains copy of prcred struct */ -#define NT_UTSNAME 15 /* Contains copy of utsname struct */ -#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ -#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ -#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct */ -#define NT_SIGINFO 0x53494749 /* Contains copy of siginfo_t, \ - size might increase */ -#define NT_FILE 0x46494c45 /* Contains information about mapped \ - files */ -#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */ -#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ -#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ -#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ -#define NT_PPC_TAR 0x103 /* Target Address Register */ -#define NT_PPC_PPR 0x104 /* Program Priority Register */ -#define NT_PPC_DSCR 0x105 /* Data Stream Control Register */ -#define NT_PPC_EBB 0x106 /* Event Based Branch Registers */ -#define NT_PPC_PMU 0x107 /* Performance Monitor Registers */ -#define NT_PPC_TM_CGPR 0x108 /* TM checkpointed GPR Registers */ -#define NT_PPC_TM_CFPR 0x109 /* TM checkpointed FPR Registers */ -#define NT_PPC_TM_CVMX 0x10a /* TM checkpointed VMX Registers */ -#define NT_PPC_TM_CVSX 0x10b /* TM checkpointed VSX Registers */ -#define NT_PPC_TM_SPR 0x10c /* TM Special Purpose Registers */ -#define NT_PPC_TM_CTAR 0x10d /* TM checkpointed Target Address \ - Register */ -#define NT_PPC_TM_CPPR 0x10e /* TM checkpointed Program Priority \ - Register */ -#define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control \ - Register */ -#define NT_PPC_PKEY 0x110 /* Memory Protection Keys \ - registers. */ +#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ +#define NT_PRFPREG 2 /* Contains copy of fpregset struct. */ +#define NT_FPREGSET 2 /* Contains copy of fpregset struct */ +#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ +#define NT_PRXREG 4 /* Contains copy of prxregset struct */ +#define NT_TASKSTRUCT 4 /* Contains copy of task structure */ +#define NT_PLATFORM 5 /* String from sysinfo(SI_PLATFORM) */ +#define NT_AUXV 6 /* Contains copy of auxv array */ +#define NT_GWINDOWS 7 /* Contains copy of gwindows struct */ +#define NT_ASRS 8 /* Contains copy of asrset struct */ +#define NT_PSTATUS 10 /* Contains copy of pstatus struct */ +#define NT_PSINFO 13 /* Contains copy of psinfo struct */ +#define NT_PRCRED 14 /* Contains copy of prcred struct */ +#define NT_UTSNAME 15 /* Contains copy of utsname struct */ +#define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */ +#define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */ +#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct */ +#define NT_SIGINFO 0x53494749 /* Contains copy of siginfo_t, size might increase */ +#define NT_FILE 0x46494c45 /* Contains information about mapped files */ +#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */ +#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ +#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ +#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ +#define NT_PPC_TAR 0x103 /* Target Address Register */ +#define NT_PPC_PPR 0x104 /* Program Priority Register */ +#define NT_PPC_DSCR 0x105 /* Data Stream Control Register */ +#define NT_PPC_EBB 0x106 /* Event Based Branch Registers */ +#define NT_PPC_PMU 0x107 /* Performance Monitor Registers */ +#define NT_PPC_TM_CGPR 0x108 /* TM checkpointed GPR Registers */ +#define NT_PPC_TM_CFPR 0x109 /* TM checkpointed FPR Registers */ +#define NT_PPC_TM_CVMX 0x10a /* TM checkpointed VMX Registers */ +#define NT_PPC_TM_CVSX 0x10b /* TM checkpointed VSX Registers */ +#define NT_PPC_TM_SPR 0x10c /* TM Special Purpose Registers */ +#define NT_PPC_TM_CTAR 0x10d /* TM checkpointed Target Address Register */ +#define NT_PPC_TM_CPPR 0x10e /* TM checkpointed Program Priority Register */ +#define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control Register */ +#define NT_PPC_PKEY 0x110 /* Memory Protection Keys registers. */ #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ @@ -894,30 +881,24 @@ typedef struct #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ -#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 \ - upper half. */ -#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */ -#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */ -#define NT_S390_GS_BC 0x30c /* s390 guarded storage \ - broadcast control block. */ -#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */ -#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ -#define NT_ARM_TLS 0x401 /* ARM TLS register */ -#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ -#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ -#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ -#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension \ - registers */ -#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication \ - code masks. */ -#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication \ - address keys. */ -#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication \ - generic key. */ -#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */ -#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */ -#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */ -#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */ +#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 upper half. */ +#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */ +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */ +#define NT_S390_GS_BC 0x30c /* s390 guarded storage broadcast control block. */ +#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */ +#define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ +#define NT_ARM_TLS 0x401 /* ARM TLS register */ +#define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ +#define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ +#define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ +#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension registers */ +#define NT_ARM_PAC_MASK 0x406 /* ARM pointer authentication code masks. */ +#define NT_ARM_PACA_KEYS 0x407 /* ARM pointer authentication address keys. */ +#define NT_ARM_PACG_KEYS 0x408 /* ARM pointer authentication generic key. */ +#define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note. */ +#define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers. */ +#define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode. */ +#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers. */ #define NT_OPENBSD_PROCINFO 10 /* Contains an elfcore_procinfo structure with information about the kernel state of the process. */ #define NT_OPENBSD_AUXV 11 /* ELF auxiliary vector data. */ @@ -1007,8 +988,7 @@ typedef struct #define DT_MOVEENT 0x6ffffdfa #define DT_MOVESZ 0x6ffffdfb #define DT_FEATURE_1 0x6ffffdfc /* Feature selection (DTF_*). */ -#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting \ - the following DT_* entry. */ +#define DT_POSFLAG_1 0x6ffffdfd /* Flags for DT_* entries, effecting the following DT_* entry. */ #define DT_SYMINSZ 0x6ffffdfe /* Size of syminfo table (in bytes) */ #define DT_SYMINENT 0x6ffffdff /* Entry size of syminfo */ #define DT_VALRNGHI 0x6ffffdff @@ -1044,12 +1024,10 @@ typedef struct #define DT_RELCOUNT 0x6ffffffa /* These were chosen by Sun. */ -#define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */ -#define DT_VERDEF 0x6ffffffc /* Address of version definition \ - table */ -#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ -#define DT_VERNEED 0x6ffffffe /* Address of table with needed \ - versions */ +#define DT_FLAGS_1 0x6ffffffb /* State flags, see DF_1_* below. */ +#define DT_VERDEF 0x6ffffffc /* Address of version definition table */ +#define DT_VERDEFNUM 0x6ffffffd /* Number of version definitions */ +#define DT_VERNEED 0x6ffffffe /* Address of table with needed versions */ #define DT_VERNEEDNUM 0x6fffffff /* Number of needed versions */ #define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */ #define DT_VERSIONTAGNUM 16 @@ -1108,8 +1086,7 @@ typedef struct /* Flags in the DT_POSFLAG_1 entry effecting only the next DT_* entry. */ #define DF_P1_LAZYLOAD 0x00000001 /* Lazyload following object. */ -#define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not \ - generally available. */ +#define DF_P1_GROUPPERM 0x00000002 /* Symbols from next object are not generally available. */ /* Version definition sections. */ @@ -1274,8 +1251,7 @@ typedef struct /* Some more special a_type values describing the hardware. */ #define AT_PLATFORM 15 /* String identifying platform. */ -#define AT_HWCAP 16 /* Machine-dependent hints about \ - processor capabilities. */ +#define AT_HWCAP 16 /* Machine-dependent hints about processor capabilities. */ /* This entry gives some information about the FPU initialization performed by the kernel. */ @@ -1296,8 +1272,7 @@ typedef struct #define AT_RANDOM 25 /* Address of 16 random bytes. */ -#define AT_HWCAP2 26 /* More machine-dependent hints about \ - processor capabilities. */ +#define AT_HWCAP2 26 /* More machine-dependent hints about processor capabilities. */ #define AT_EXECFN 31 /* Filename of executable. */ @@ -1325,8 +1300,7 @@ typedef struct #define AT_L3_CACHESIZE 46 #define AT_L3_CACHEGEOMETRY 47 -#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery \ - (AArch64). */ +#define AT_MINSIGSTKSZ 51 /* Stack needed for signal delivery (AArch64). */ /* Note section contents. Each entry in the note section begins with a header of a fixed form. */ @@ -1489,47 +1463,44 @@ typedef struct /* m68k relocs. */ -#define R_68K_NONE 0 /* No reloc */ -#define R_68K_32 1 /* Direct 32 bit */ -#define R_68K_16 2 /* Direct 16 bit */ -#define R_68K_8 3 /* Direct 8 bit */ -#define R_68K_PC32 4 /* PC relative 32 bit */ -#define R_68K_PC16 5 /* PC relative 16 bit */ -#define R_68K_PC8 6 /* PC relative 8 bit */ -#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */ -#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */ -#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */ -#define R_68K_GOT32O 10 /* 32 bit GOT offset */ -#define R_68K_GOT16O 11 /* 16 bit GOT offset */ -#define R_68K_GOT8O 12 /* 8 bit GOT offset */ -#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */ -#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */ -#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */ -#define R_68K_PLT32O 16 /* 32 bit PLT offset */ -#define R_68K_PLT16O 17 /* 16 bit PLT offset */ -#define R_68K_PLT8O 18 /* 8 bit PLT offset */ -#define R_68K_COPY 19 /* Copy symbol at runtime */ -#define R_68K_GLOB_DAT 20 /* Create GOT entry */ -#define R_68K_JMP_SLOT 21 /* Create PLT entry */ -#define R_68K_RELATIVE 22 /* Adjust by program base */ -#define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */ -#define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */ -#define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */ -#define R_68K_TLS_LDM32 28 /* 32 bit GOT offset for LDM */ -#define R_68K_TLS_LDM16 29 /* 16 bit GOT offset for LDM */ -#define R_68K_TLS_LDM8 30 /* 8 bit GOT offset for LDM */ -#define R_68K_TLS_LDO32 31 /* 32 bit module-relative offset */ -#define R_68K_TLS_LDO16 32 /* 16 bit module-relative offset */ -#define R_68K_TLS_LDO8 33 /* 8 bit module-relative offset */ -#define R_68K_TLS_IE32 34 /* 32 bit GOT offset for IE */ -#define R_68K_TLS_IE16 35 /* 16 bit GOT offset for IE */ -#define R_68K_TLS_IE8 36 /* 8 bit GOT offset for IE */ -#define R_68K_TLS_LE32 37 /* 32 bit offset relative to \ - static TLS block */ -#define R_68K_TLS_LE16 38 /* 16 bit offset relative to \ - static TLS block */ -#define R_68K_TLS_LE8 39 /* 8 bit offset relative to \ - static TLS block */ +#define R_68K_NONE 0 /* No reloc */ +#define R_68K_32 1 /* Direct 32 bit */ +#define R_68K_16 2 /* Direct 16 bit */ +#define R_68K_8 3 /* Direct 8 bit */ +#define R_68K_PC32 4 /* PC relative 32 bit */ +#define R_68K_PC16 5 /* PC relative 16 bit */ +#define R_68K_PC8 6 /* PC relative 8 bit */ +#define R_68K_GOT32 7 /* 32 bit PC relative GOT entry */ +#define R_68K_GOT16 8 /* 16 bit PC relative GOT entry */ +#define R_68K_GOT8 9 /* 8 bit PC relative GOT entry */ +#define R_68K_GOT32O 10 /* 32 bit GOT offset */ +#define R_68K_GOT16O 11 /* 16 bit GOT offset */ +#define R_68K_GOT8O 12 /* 8 bit GOT offset */ +#define R_68K_PLT32 13 /* 32 bit PC relative PLT address */ +#define R_68K_PLT16 14 /* 16 bit PC relative PLT address */ +#define R_68K_PLT8 15 /* 8 bit PC relative PLT address */ +#define R_68K_PLT32O 16 /* 32 bit PLT offset */ +#define R_68K_PLT16O 17 /* 16 bit PLT offset */ +#define R_68K_PLT8O 18 /* 8 bit PLT offset */ +#define R_68K_COPY 19 /* Copy symbol at runtime */ +#define R_68K_GLOB_DAT 20 /* Create GOT entry */ +#define R_68K_JMP_SLOT 21 /* Create PLT entry */ +#define R_68K_RELATIVE 22 /* Adjust by program base */ +#define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */ +#define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */ +#define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */ +#define R_68K_TLS_LDM32 28 /* 32 bit GOT offset for LDM */ +#define R_68K_TLS_LDM16 29 /* 16 bit GOT offset for LDM */ +#define R_68K_TLS_LDM8 30 /* 8 bit GOT offset for LDM */ +#define R_68K_TLS_LDO32 31 /* 32 bit module-relative offset */ +#define R_68K_TLS_LDO16 32 /* 16 bit module-relative offset */ +#define R_68K_TLS_LDO8 33 /* 8 bit module-relative offset */ +#define R_68K_TLS_IE32 34 /* 32 bit GOT offset for IE */ +#define R_68K_TLS_IE16 35 /* 16 bit GOT offset for IE */ +#define R_68K_TLS_IE8 36 /* 8 bit GOT offset for IE */ +#define R_68K_TLS_LE32 37 /* 32 bit offset relative to static TLS block */ +#define R_68K_TLS_LE16 38 /* 16 bit offset relative to static TLS block */ +#define R_68K_TLS_LE8 39 /* 8 bit offset relative to static TLS block */ #define R_68K_TLS_DTPMOD32 40 /* 32 bit module number */ #define R_68K_TLS_DTPREL32 41 /* 32 bit module-relative offset */ #define R_68K_TLS_TPREL32 42 /* 32 bit TP-relative offset */ @@ -2103,40 +2074,33 @@ typedef struct /* Legal values for d_tag field of Elf32_Dyn. */ -#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ -#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ -#define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */ -#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ -#define DT_MIPS_FLAGS 0x70000005 /* Flags */ -#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ -#define DT_MIPS_MSYM 0x70000007 -#define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ -#define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ -#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ -#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */ -#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */ -#define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */ -#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ -#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ -#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ -#define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ -#define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ -#define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in \ - DT_MIPS_DELTA_CLASS. */ -#define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ -#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in \ - DT_MIPS_DELTA_INSTANCE. */ -#define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ -#define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in \ - DT_MIPS_DELTA_RELOC. */ -#define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta \ - relocations refer to. */ -#define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in \ - DT_MIPS_DELTA_SYM. */ -#define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the \ - class declaration. */ -#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in \ - DT_MIPS_DELTA_CLASSSYM. */ +#define DT_MIPS_RLD_VERSION 0x70000001 /* Runtime linker interface version */ +#define DT_MIPS_TIME_STAMP 0x70000002 /* Timestamp */ +#define DT_MIPS_ICHECKSUM 0x70000003 /* Checksum */ +#define DT_MIPS_IVERSION 0x70000004 /* Version string (string tbl index) */ +#define DT_MIPS_FLAGS 0x70000005 /* Flags */ +#define DT_MIPS_BASE_ADDRESS 0x70000006 /* Base address */ +#define DT_MIPS_MSYM 0x70000007 +#define DT_MIPS_CONFLICT 0x70000008 /* Address of CONFLICT section */ +#define DT_MIPS_LIBLIST 0x70000009 /* Address of LIBLIST section */ +#define DT_MIPS_LOCAL_GOTNO 0x7000000a /* Number of local GOT entries */ +#define DT_MIPS_CONFLICTNO 0x7000000b /* Number of CONFLICT entries */ +#define DT_MIPS_LIBLISTNO 0x70000010 /* Number of LIBLIST entries */ +#define DT_MIPS_SYMTABNO 0x70000011 /* Number of DYNSYM entries */ +#define DT_MIPS_UNREFEXTNO 0x70000012 /* First external DYNSYM */ +#define DT_MIPS_GOTSYM 0x70000013 /* First GOT entry in DYNSYM */ +#define DT_MIPS_HIPAGENO 0x70000014 /* Number of GOT page table entries */ +#define DT_MIPS_RLD_MAP 0x70000016 /* Address of run time loader map. */ +#define DT_MIPS_DELTA_CLASS 0x70000017 /* Delta C++ class definition. */ +#define DT_MIPS_DELTA_CLASS_NO 0x70000018 /* Number of entries in DT_MIPS_DELTA_CLASS. */ +#define DT_MIPS_DELTA_INSTANCE 0x70000019 /* Delta C++ class instances. */ +#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a /* Number of entries in DT_MIPS_DELTA_INSTANCE. */ +#define DT_MIPS_DELTA_RELOC 0x7000001b /* Delta relocations. */ +#define DT_MIPS_DELTA_RELOC_NO 0x7000001c /* Number of entries in DT_MIPS_DELTA_RELOC. */ +#define DT_MIPS_DELTA_SYM 0x7000001d /* Delta symbols that Delta relocations refer to. */ +#define DT_MIPS_DELTA_SYM_NO 0x7000001e /* Number of entries in DT_MIPS_DELTA_SYM. */ +#define DT_MIPS_DELTA_CLASSSYM 0x70000020 /* Delta symbols that hold the class declaration. */ +#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 /* Number of entries in DT_MIPS_DELTA_CLASSSYM. */ #define DT_MIPS_CXX_FLAGS 0x70000022 /* Flags indicating for C++ flavor. */ #define DT_MIPS_PIXIE_INIT 0x70000023 #define DT_MIPS_SYMBOL_LIB 0x70000024 @@ -2148,13 +2112,11 @@ typedef struct #define DT_MIPS_INTERFACE 0x7000002a /* Address of .interface. */ #define DT_MIPS_DYNSTR_ALIGN 0x7000002b #define DT_MIPS_INTERFACE_SIZE 0x7000002c /* Size of the .interface section. */ -#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve \ - function stored in GOT. */ -#define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added \ - by rld on dlopen() calls. */ -#define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ -#define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ -#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ +#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d /* Address of rld_text_rsolve function stored in GOT. */ +#define DT_MIPS_PERF_SUFFIX 0x7000002e /* Default suffix of dso to be added by rld on dlopen() calls. */ +#define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */ +#define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */ +#define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */ /* The address of .got.plt in an executable using the new non-PIC ABI. */ #define DT_MIPS_PLTGOT 0x70000032 /* The base of the PLT in an executable using the new non-PIC ABI if that @@ -2321,12 +2283,11 @@ enum { /* Legal values for e_flags field of Elf32_Ehdr. */ -#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */ -#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */ -#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */ -#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */ -#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch \ - prediction. */ +#define EF_PARISC_TRAPNIL 0x00010000 /* Trap nil pointer dereference. */ +#define EF_PARISC_EXT 0x00020000 /* Program uses arch. extensions. */ +#define EF_PARISC_LSB 0x00040000 /* Program expects little endian. */ +#define EF_PARISC_WIDE 0x00080000 /* Program expects wide mode. */ +#define EF_PARISC_NO_KABP 0x00100000 /* No kernel assisted branch prediction. */ #define EF_PARISC_LAZYSWAP 0x00400000 /* Allow lazy swapping. */ #define EF_PARISC_ARCH 0x0000ffff /* Architecture version. */ @@ -2338,8 +2299,7 @@ enum { /* Additional section indeces. */ -#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared \ - symbols in ANSI C. */ +#define SHN_PARISC_ANSI_COMMON 0xff00 /* Section for tenatively declared symbols in ANSI C. */ #define SHN_PARISC_HUGE_COMMON 0xff01 /* Common blocks in huge model. */ /* Legal values for sh_type field of Elf32_Shdr. */ @@ -2585,8 +2545,7 @@ enum { /* Cygnus local bits below */ #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag*/ -#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib \ - flag */ +#define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */ /* PowerPC relocations defined by the ABIs */ #define R_PPC_NONE 0 @@ -2860,7 +2819,7 @@ enum { #define STO_PPC64_LOCAL_BIT 5 #define STO_PPC64_LOCAL_MASK (7 << STO_PPC64_LOCAL_BIT) #define PPC64_LOCAL_ENTRY_OFFSET(other) \ - (((1 << (((other)&STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2) + (((1 << (((other) & STO_PPC64_LOCAL_MASK) >> STO_PPC64_LOCAL_BIT)) >> 2) << 2) /* ARM specific declarations */ @@ -2892,7 +2851,7 @@ enum { #define EF_ARM_BE8 0x00800000 #define EF_ARM_LE8 0x00400000 -#define EF_ARM_EABI_VERSION(flags) ((flags)&EF_ARM_EABIMASK) +#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) #define EF_ARM_EABI_UNKNOWN 0x00000000 #define EF_ARM_EABI_VER1 0x01000000 #define EF_ARM_EABI_VER2 0x02000000 @@ -2906,12 +2865,10 @@ enum { /* ARM-specific values for sh_flags */ #define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined \ - in the input to a link step. */ +#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ /* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location \ - addressed by the static base. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ #define PF_ARM_PI 0x20000000 /* Position-independent segment. */ #define PF_ARM_ABS 0x40000000 /* Absolute segment. */ @@ -3072,169 +3029,132 @@ enum { /* ARM relocs. */ -#define R_ARM_NONE 0 /* No reloc */ -#define R_ARM_PC24 1 /* Deprecated PC relative 26 \ - bit branch. */ -#define R_ARM_ABS32 2 /* Direct 32 bit */ -#define R_ARM_REL32 3 /* PC relative 32 bit */ -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 /* Direct 16 bit */ -#define R_ARM_ABS12 6 /* Direct 12 bit */ -#define R_ARM_THM_ABS5 7 /* Direct & 0x7C (LDR, STR). */ -#define R_ARM_ABS8 8 /* Direct 8 bit */ -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */ -#define R_ARM_THM_PC8 11 /* PC relative & 0x3FC \ - (Thumb16 LDR, ADD, ADR). */ -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_SWI24 13 /* Obsolete static relocation. */ -#define R_ARM_TLS_DESC 13 /* Dynamic relocation. */ -#define R_ARM_THM_SWI8 14 /* Reserved. */ -#define R_ARM_XPC25 15 /* Reserved. */ -#define R_ARM_THM_XPC22 16 /* Reserved. */ -#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */ -#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */ -#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */ -#define R_ARM_COPY 20 /* Copy symbol at runtime */ -#define R_ARM_GLOB_DAT 21 /* Create GOT entry */ -#define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ -#define R_ARM_RELATIVE 23 /* Adjust by program base */ -#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ -#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ -#define R_ARM_GOT32 26 /* 32 bit GOT entry */ -#define R_ARM_PLT32 27 /* Deprecated, 32 bit PLT address. */ -#define R_ARM_CALL 28 /* PC relative 24 bit (BL, BLX). */ -#define R_ARM_JUMP24 29 /* PC relative 24 bit \ - (B, BL). */ -#define R_ARM_THM_JUMP24 30 /* PC relative 24 bit (Thumb32 B.W). */ -#define R_ARM_BASE_ABS 31 /* Adjust by program base. */ -#define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */ -#define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */ -#define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */ -#define R_ARM_LDR_SBREL_11_0 35 /* Deprecated, prog. base relative. */ -#define R_ARM_ALU_SBREL_19_12 36 /* Deprecated, prog. base relative. */ -#define R_ARM_ALU_SBREL_27_20 37 /* Deprecated, prog. base relative. */ -#define R_ARM_TARGET1 38 -#define R_ARM_SBREL31 39 /* Program base relative. */ -#define R_ARM_V4BX 40 -#define R_ARM_TARGET2 41 -#define R_ARM_PREL31 42 /* 32 bit PC relative. */ -#define R_ARM_MOVW_ABS_NC 43 /* Direct 16-bit (MOVW). */ -#define R_ARM_MOVT_ABS 44 /* Direct high 16-bit (MOVT). */ -#define R_ARM_MOVW_PREL_NC 45 /* PC relative 16-bit (MOVW). */ -#define R_ARM_MOVT_PREL 46 /* PC relative (MOVT). */ -#define R_ARM_THM_MOVW_ABS_NC 47 /* Direct 16 bit (Thumb32 MOVW). */ -#define R_ARM_THM_MOVT_ABS 48 /* Direct high 16 bit \ - (Thumb32 MOVT). */ -#define R_ARM_THM_MOVW_PREL_NC 49 /* PC relative 16 bit \ - (Thumb32 MOVW). */ -#define R_ARM_THM_MOVT_PREL 50 /* PC relative high 16 bit \ - (Thumb32 MOVT). */ -#define R_ARM_THM_JUMP19 51 /* PC relative 20 bit \ - (Thumb32 B.W). */ -#define R_ARM_THM_JUMP6 52 /* PC relative X & 0x7E \ - (Thumb16 CBZ, CBNZ). */ -#define R_ARM_THM_ALU_PREL_11_0 53 /* PC relative 12 bit \ - (Thumb32 ADR.W). */ -#define R_ARM_THM_PC12 54 /* PC relative 12 bit \ - (Thumb32 LDR{D,SB,H,SH}). */ -#define R_ARM_ABS32_NOI 55 /* Direct 32-bit. */ -#define R_ARM_REL32_NOI 56 /* PC relative 32-bit. */ -#define R_ARM_ALU_PC_G0_NC 57 /* PC relative (ADD, SUB). */ -#define R_ARM_ALU_PC_G0 58 /* PC relative (ADD, SUB). */ -#define R_ARM_ALU_PC_G1_NC 59 /* PC relative (ADD, SUB). */ -#define R_ARM_ALU_PC_G1 60 /* PC relative (ADD, SUB). */ -#define R_ARM_ALU_PC_G2 61 /* PC relative (ADD, SUB). */ -#define R_ARM_LDR_PC_G1 62 /* PC relative (LDR,STR,LDRB,STRB). */ -#define R_ARM_LDR_PC_G2 63 /* PC relative (LDR,STR,LDRB,STRB). */ -#define R_ARM_LDRS_PC_G0 64 /* PC relative (STR{D,H}, \ - LDR{D,SB,H,SH}). */ -#define R_ARM_LDRS_PC_G1 65 /* PC relative (STR{D,H}, \ - LDR{D,SB,H,SH}). */ -#define R_ARM_LDRS_PC_G2 66 /* PC relative (STR{D,H}, \ - LDR{D,SB,H,SH}). */ -#define R_ARM_LDC_PC_G0 67 /* PC relative (LDC, STC). */ -#define R_ARM_LDC_PC_G1 68 /* PC relative (LDC, STC). */ -#define R_ARM_LDC_PC_G2 69 /* PC relative (LDC, STC). */ -#define R_ARM_ALU_SB_G0_NC 70 /* Program base relative (ADD,SUB). */ -#define R_ARM_ALU_SB_G0 71 /* Program base relative (ADD,SUB). */ -#define R_ARM_ALU_SB_G1_NC 72 /* Program base relative (ADD,SUB). */ -#define R_ARM_ALU_SB_G1 73 /* Program base relative (ADD,SUB). */ -#define R_ARM_ALU_SB_G2 74 /* Program base relative (ADD,SUB). */ -#define R_ARM_LDR_SB_G0 75 /* Program base relative (LDR, \ - STR, LDRB, STRB). */ -#define R_ARM_LDR_SB_G1 76 /* Program base relative \ - (LDR, STR, LDRB, STRB). */ -#define R_ARM_LDR_SB_G2 77 /* Program base relative \ - (LDR, STR, LDRB, STRB). */ -#define R_ARM_LDRS_SB_G0 78 /* Program base relative \ - (LDR, STR, LDRB, STRB). */ -#define R_ARM_LDRS_SB_G1 79 /* Program base relative \ - (LDR, STR, LDRB, STRB). */ -#define R_ARM_LDRS_SB_G2 80 /* Program base relative \ - (LDR, STR, LDRB, STRB). */ -#define R_ARM_LDC_SB_G0 81 /* Program base relative (LDC,STC). */ -#define R_ARM_LDC_SB_G1 82 /* Program base relative (LDC,STC). */ -#define R_ARM_LDC_SB_G2 83 /* Program base relative (LDC,STC). */ -#define R_ARM_MOVW_BREL_NC 84 /* Program base relative 16 \ - bit (MOVW). */ -#define R_ARM_MOVT_BREL 85 /* Program base relative high \ - 16 bit (MOVT). */ -#define R_ARM_MOVW_BREL 86 /* Program base relative 16 \ - bit (MOVW). */ -#define R_ARM_THM_MOVW_BREL_NC 87 /* Program base relative 16 \ - bit (Thumb32 MOVW). */ -#define R_ARM_THM_MOVT_BREL 88 /* Program base relative high \ - 16 bit (Thumb32 MOVT). */ -#define R_ARM_THM_MOVW_BREL 89 /* Program base relative 16 \ - bit (Thumb32 MOVW). */ -#define R_ARM_TLS_GOTDESC 90 -#define R_ARM_TLS_CALL 91 -#define R_ARM_TLS_DESCSEQ 92 /* TLS relaxation. */ -#define R_ARM_THM_TLS_CALL 93 -#define R_ARM_PLT32_ABS 94 -#define R_ARM_GOT_ABS 95 /* GOT entry. */ -#define R_ARM_GOT_PREL 96 /* PC relative GOT entry. */ -#define R_ARM_GOT_BREL12 97 /* GOT entry relative to GOT \ - origin (LDR). */ -#define R_ARM_GOTOFF12 98 /* 12 bit, GOT entry relative \ - to GOT origin (LDR, STR). */ -#define R_ARM_GOTRELAX 99 -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_THM_PC11 102 /* PC relative & 0xFFE (Thumb16 B). */ -#define R_ARM_THM_PC9 103 /* PC relative & 0x1FE \ - (Thumb16 B/B). */ -#define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic \ - thread local data */ -#define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic \ - thread local data */ -#define R_ARM_TLS_LDO32 106 /* 32 bit offset relative to TLS \ - block */ -#define R_ARM_TLS_IE32 107 /* PC-rel 32 bit for GOT entry of \ - static TLS block offset */ -#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static \ - TLS block */ -#define R_ARM_TLS_LDO12 109 /* 12 bit relative to TLS \ - block (LDR, STR). */ -#define R_ARM_TLS_LE12 110 /* 12 bit relative to static \ - TLS block (LDR, STR). */ -#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative \ - to GOT origin (LDR). */ +#define R_ARM_NONE 0 /* No reloc */ +#define R_ARM_PC24 1 /* Deprecated PC relative 26 bit branch. */ +#define R_ARM_ABS32 2 /* Direct 32 bit */ +#define R_ARM_REL32 3 /* PC relative 32 bit */ +#define R_ARM_PC13 4 +#define R_ARM_ABS16 5 /* Direct 16 bit */ +#define R_ARM_ABS12 6 /* Direct 12 bit */ +#define R_ARM_THM_ABS5 7 /* Direct & 0x7C (LDR, STR). */ +#define R_ARM_ABS8 8 /* Direct 8 bit */ +#define R_ARM_SBREL32 9 +#define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */ +#define R_ARM_THM_PC8 11 /* PC relative & 0x3FC (Thumb16 LDR, ADD, ADR). */ +#define R_ARM_AMP_VCALL9 12 +#define R_ARM_SWI24 13 /* Obsolete static relocation. */ +#define R_ARM_TLS_DESC 13 /* Dynamic relocation. */ +#define R_ARM_THM_SWI8 14 /* Reserved. */ +#define R_ARM_XPC25 15 /* Reserved. */ +#define R_ARM_THM_XPC22 16 /* Reserved. */ +#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */ +#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */ +#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */ +#define R_ARM_COPY 20 /* Copy symbol at runtime */ +#define R_ARM_GLOB_DAT 21 /* Create GOT entry */ +#define R_ARM_JUMP_SLOT 22 /* Create PLT entry */ +#define R_ARM_RELATIVE 23 /* Adjust by program base */ +#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */ +#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */ +#define R_ARM_GOT32 26 /* 32 bit GOT entry */ +#define R_ARM_PLT32 27 /* Deprecated, 32 bit PLT address. */ +#define R_ARM_CALL 28 /* PC relative 24 bit (BL, BLX). */ +#define R_ARM_JUMP24 29 /* PC relative 24 bit (B, BL). */ +#define R_ARM_THM_JUMP24 30 /* PC relative 24 bit (Thumb32 B.W). */ +#define R_ARM_BASE_ABS 31 /* Adjust by program base. */ +#define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */ +#define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */ +#define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */ +#define R_ARM_LDR_SBREL_11_0 35 /* Deprecated, prog. base relative. */ +#define R_ARM_ALU_SBREL_19_12 36 /* Deprecated, prog. base relative. */ +#define R_ARM_ALU_SBREL_27_20 37 /* Deprecated, prog. base relative. */ +#define R_ARM_TARGET1 38 +#define R_ARM_SBREL31 39 /* Program base relative. */ +#define R_ARM_V4BX 40 +#define R_ARM_TARGET2 41 +#define R_ARM_PREL31 42 /* 32 bit PC relative. */ +#define R_ARM_MOVW_ABS_NC 43 /* Direct 16-bit (MOVW). */ +#define R_ARM_MOVT_ABS 44 /* Direct high 16-bit (MOVT). */ +#define R_ARM_MOVW_PREL_NC 45 /* PC relative 16-bit (MOVW). */ +#define R_ARM_MOVT_PREL 46 /* PC relative (MOVT). */ +#define R_ARM_THM_MOVW_ABS_NC 47 /* Direct 16 bit (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_ABS 48 /* Direct high 16 bit (Thumb32 MOVT). */ +#define R_ARM_THM_MOVW_PREL_NC 49 /* PC relative 16 bit (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_PREL 50 /* PC relative high 16 bit (Thumb32 MOVT). */ +#define R_ARM_THM_JUMP19 51 /* PC relative 20 bit (Thumb32 B.W). */ +#define R_ARM_THM_JUMP6 52 /* PC relative X & 0x7E (Thumb16 CBZ, CBNZ). */ +#define R_ARM_THM_ALU_PREL_11_0 53 /* PC relative 12 bit (Thumb32 ADR.W). */ +#define R_ARM_THM_PC12 54 /* PC relative 12 bit (Thumb32 LDR{D,SB,H,SH}). */ +#define R_ARM_ABS32_NOI 55 /* Direct 32-bit. */ +#define R_ARM_REL32_NOI 56 /* PC relative 32-bit. */ +#define R_ARM_ALU_PC_G0_NC 57 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G0 58 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G1_NC 59 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G1 60 /* PC relative (ADD, SUB). */ +#define R_ARM_ALU_PC_G2 61 /* PC relative (ADD, SUB). */ +#define R_ARM_LDR_PC_G1 62 /* PC relative (LDR,STR,LDRB,STRB). */ +#define R_ARM_LDR_PC_G2 63 /* PC relative (LDR,STR,LDRB,STRB). */ +#define R_ARM_LDRS_PC_G0 64 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ +#define R_ARM_LDRS_PC_G1 65 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ +#define R_ARM_LDRS_PC_G2 66 /* PC relative (STR{D,H}, LDR{D,SB,H,SH}). */ +#define R_ARM_LDC_PC_G0 67 /* PC relative (LDC, STC). */ +#define R_ARM_LDC_PC_G1 68 /* PC relative (LDC, STC). */ +#define R_ARM_LDC_PC_G2 69 /* PC relative (LDC, STC). */ +#define R_ARM_ALU_SB_G0_NC 70 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G0 71 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G1_NC 72 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G1 73 /* Program base relative (ADD,SUB). */ +#define R_ARM_ALU_SB_G2 74 /* Program base relative (ADD,SUB). */ +#define R_ARM_LDR_SB_G0 75 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDR_SB_G1 76 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDR_SB_G2 77 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G0 78 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G1 79 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDRS_SB_G2 80 /* Program base relative (LDR, STR, LDRB, STRB). */ +#define R_ARM_LDC_SB_G0 81 /* Program base relative (LDC,STC). */ +#define R_ARM_LDC_SB_G1 82 /* Program base relative (LDC,STC). */ +#define R_ARM_LDC_SB_G2 83 /* Program base relative (LDC,STC). */ +#define R_ARM_MOVW_BREL_NC 84 /* Program base relative 16 bit (MOVW). */ +#define R_ARM_MOVT_BREL 85 /* Program base relative high 16 bit (MOVT). */ +#define R_ARM_MOVW_BREL 86 /* Program base relative 16 bit (MOVW). */ +#define R_ARM_THM_MOVW_BREL_NC 87 /* Program base relative 16 bit (Thumb32 MOVW). */ +#define R_ARM_THM_MOVT_BREL 88 /* Program base relative high 16 bit (Thumb32 MOVT). */ +#define R_ARM_THM_MOVW_BREL 89 /* Program base relative 16 bit (Thumb32 MOVW). */ +#define R_ARM_TLS_GOTDESC 90 +#define R_ARM_TLS_CALL 91 +#define R_ARM_TLS_DESCSEQ 92 /* TLS relaxation. */ +#define R_ARM_THM_TLS_CALL 93 +#define R_ARM_PLT32_ABS 94 +#define R_ARM_GOT_ABS 95 /* GOT entry. */ +#define R_ARM_GOT_PREL 96 /* PC relative GOT entry. */ +#define R_ARM_GOT_BREL12 97 /* GOT entry relative to GOT origin (LDR). */ +#define R_ARM_GOTOFF12 98 /* 12 bit, GOT entry relative to GOT origin (LDR, STR). */ +#define R_ARM_GOTRELAX 99 +#define R_ARM_GNU_VTENTRY 100 +#define R_ARM_GNU_VTINHERIT 101 +#define R_ARM_THM_PC11 102 /* PC relative & 0xFFE (Thumb16 B). */ +#define R_ARM_THM_PC9 103 /* PC relative & 0x1FE (Thumb16 B/B). */ +#define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic thread local data */ +#define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic thread local data */ +#define R_ARM_TLS_LDO32 106 /* 32 bit offset relative to TLS block */ +#define R_ARM_TLS_IE32 107 /* PC-rel 32 bit for GOT entry of static TLS block offset */ +#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static TLS block */ +#define R_ARM_TLS_LDO12 109 /* 12 bit relative to TLS block (LDR, STR). */ +#define R_ARM_TLS_LE12 110 /* 12 bit relative to static TLS block (LDR, STR). */ +#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative to GOT origin (LDR). */ #define R_ARM_ME_TOO 128 /* Obsolete. */ #define R_ARM_THM_TLS_DESCSEQ 129 #define R_ARM_THM_TLS_DESCSEQ16 129 #define R_ARM_THM_TLS_DESCSEQ32 130 -#define R_ARM_THM_GOT_BREL12 131 /* GOT entry relative to GOT \ - origin, 12 bit (Thumb32 LDR). */ -#define R_ARM_IRELATIVE 160 -#define R_ARM_RXPC25 249 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS22 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 +#define R_ARM_THM_GOT_BREL12 131 /* GOT entry relative to GOT origin, 12 bit (Thumb32 LDR). */ +#define R_ARM_IRELATIVE 160 +#define R_ARM_RXPC25 249 +#define R_ARM_RSBREL32 250 +#define R_ARM_THM_RPC22 251 +#define R_ARM_RREL32 252 +#define R_ARM_RABS22 253 +#define R_ARM_RPC24 254 +#define R_ARM_RBASE 255 /* Keep this the last entry. */ #define R_ARM_NUM 256 @@ -3500,86 +3420,68 @@ enum { /* Additional s390 relocs */ -#define R_390_NONE 0 /* No reloc. */ -#define R_390_8 1 /* Direct 8 bit. */ -#define R_390_12 2 /* Direct 12 bit. */ -#define R_390_16 3 /* Direct 16 bit. */ -#define R_390_32 4 /* Direct 32 bit. */ -#define R_390_PC32 5 /* PC relative 32 bit. */ -#define R_390_GOT12 6 /* 12 bit GOT offset. */ -#define R_390_GOT32 7 /* 32 bit GOT offset. */ -#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ -#define R_390_COPY 9 /* Copy symbol at runtime. */ -#define R_390_GLOB_DAT 10 /* Create GOT entry. */ -#define R_390_JMP_SLOT 11 /* Create PLT entry. */ -#define R_390_RELATIVE 12 /* Adjust by program base. */ -#define R_390_GOTOFF32 13 /* 32 bit offset to GOT. */ -#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ -#define R_390_GOT16 15 /* 16 bit GOT offset. */ -#define R_390_PC16 16 /* PC relative 16 bit. */ -#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ -#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ -#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ -#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ -#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ -#define R_390_64 22 /* Direct 64 bit. */ -#define R_390_PC64 23 /* PC relative 64 bit. */ -#define R_390_GOT64 24 /* 64 bit GOT offset. */ -#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ -#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ -#define R_390_GOTOFF16 27 /* 16 bit offset to GOT. */ -#define R_390_GOTOFF64 28 /* 64 bit offset to GOT. */ -#define R_390_GOTPLT12 29 /* 12 bit offset to jump slot. */ -#define R_390_GOTPLT16 30 /* 16 bit offset to jump slot. */ -#define R_390_GOTPLT32 31 /* 32 bit offset to jump slot. */ -#define R_390_GOTPLT64 32 /* 64 bit offset to jump slot. */ -#define R_390_GOTPLTENT 33 /* 32 bit rel. offset to jump slot. */ -#define R_390_PLTOFF16 34 /* 16 bit offset from GOT to PLT. */ -#define R_390_PLTOFF32 35 /* 32 bit offset from GOT to PLT. */ -#define R_390_PLTOFF64 36 /* 16 bit offset from GOT to PLT. */ -#define R_390_TLS_LOAD 37 /* Tag for load insn in TLS code. */ -#define R_390_TLS_GDCALL 38 /* Tag for function call in general \ - dynamic TLS code. */ -#define R_390_TLS_LDCALL 39 /* Tag for function call in local \ - dynamic TLS code. */ -#define R_390_TLS_GD32 40 /* Direct 32 bit for general dynamic \ - thread local data. */ -#define R_390_TLS_GD64 41 /* Direct 64 bit for general dynamic \ - thread local data. */ -#define R_390_TLS_GOTIE12 42 /* 12 bit GOT offset for static TLS \ - block offset. */ -#define R_390_TLS_GOTIE32 43 /* 32 bit GOT offset for static TLS \ - block offset. */ -#define R_390_TLS_GOTIE64 44 /* 64 bit GOT offset for static TLS \ - block offset. */ -#define R_390_TLS_LDM32 45 /* Direct 32 bit for local dynamic \ - thread local data in LE code. */ -#define R_390_TLS_LDM64 46 /* Direct 64 bit for local dynamic \ - thread local data in LE code. */ -#define R_390_TLS_IE32 47 /* 32 bit address of GOT entry for \ - negated static TLS block offset. */ -#define R_390_TLS_IE64 48 /* 64 bit address of GOT entry for \ - negated static TLS block offset. */ -#define R_390_TLS_IEENT 49 /* 32 bit rel. offset to GOT entry for \ - negated static TLS block offset. */ -#define R_390_TLS_LE32 50 /* 32 bit negated offset relative to \ - static TLS block. */ -#define R_390_TLS_LE64 51 /* 64 bit negated offset relative to \ - static TLS block. */ -#define R_390_TLS_LDO32 52 /* 32 bit offset relative to TLS \ - block. */ -#define R_390_TLS_LDO64 53 /* 64 bit offset relative to TLS \ - block. */ -#define R_390_TLS_DTPMOD 54 /* ID of module containing symbol. */ -#define R_390_TLS_DTPOFF 55 /* Offset in TLS block. */ -#define R_390_TLS_TPOFF 56 /* Negated offset in static TLS \ - block. */ +#define R_390_NONE 0 /* No reloc. */ +#define R_390_8 1 /* Direct 8 bit. */ +#define R_390_12 2 /* Direct 12 bit. */ +#define R_390_16 3 /* Direct 16 bit. */ +#define R_390_32 4 /* Direct 32 bit. */ +#define R_390_PC32 5 /* PC relative 32 bit. */ +#define R_390_GOT12 6 /* 12 bit GOT offset. */ +#define R_390_GOT32 7 /* 32 bit GOT offset. */ +#define R_390_PLT32 8 /* 32 bit PC relative PLT address. */ +#define R_390_COPY 9 /* Copy symbol at runtime. */ +#define R_390_GLOB_DAT 10 /* Create GOT entry. */ +#define R_390_JMP_SLOT 11 /* Create PLT entry. */ +#define R_390_RELATIVE 12 /* Adjust by program base. */ +#define R_390_GOTOFF32 13 /* 32 bit offset to GOT. */ +#define R_390_GOTPC 14 /* 32 bit PC relative offset to GOT. */ +#define R_390_GOT16 15 /* 16 bit GOT offset. */ +#define R_390_PC16 16 /* PC relative 16 bit. */ +#define R_390_PC16DBL 17 /* PC relative 16 bit shifted by 1. */ +#define R_390_PLT16DBL 18 /* 16 bit PC rel. PLT shifted by 1. */ +#define R_390_PC32DBL 19 /* PC relative 32 bit shifted by 1. */ +#define R_390_PLT32DBL 20 /* 32 bit PC rel. PLT shifted by 1. */ +#define R_390_GOTPCDBL 21 /* 32 bit PC rel. GOT shifted by 1. */ +#define R_390_64 22 /* Direct 64 bit. */ +#define R_390_PC64 23 /* PC relative 64 bit. */ +#define R_390_GOT64 24 /* 64 bit GOT offset. */ +#define R_390_PLT64 25 /* 64 bit PC relative PLT address. */ +#define R_390_GOTENT 26 /* 32 bit PC rel. to GOT entry >> 1. */ +#define R_390_GOTOFF16 27 /* 16 bit offset to GOT. */ +#define R_390_GOTOFF64 28 /* 64 bit offset to GOT. */ +#define R_390_GOTPLT12 29 /* 12 bit offset to jump slot. */ +#define R_390_GOTPLT16 30 /* 16 bit offset to jump slot. */ +#define R_390_GOTPLT32 31 /* 32 bit offset to jump slot. */ +#define R_390_GOTPLT64 32 /* 64 bit offset to jump slot. */ +#define R_390_GOTPLTENT 33 /* 32 bit rel. offset to jump slot. */ +#define R_390_PLTOFF16 34 /* 16 bit offset from GOT to PLT. */ +#define R_390_PLTOFF32 35 /* 32 bit offset from GOT to PLT. */ +#define R_390_PLTOFF64 36 /* 16 bit offset from GOT to PLT. */ +#define R_390_TLS_LOAD 37 /* Tag for load insn in TLS code. */ +#define R_390_TLS_GDCALL 38 /* Tag for function call in general dynamic TLS code. */ +#define R_390_TLS_LDCALL 39 /* Tag for function call in local dynamic TLS code. */ +#define R_390_TLS_GD32 40 /* Direct 32 bit for general dynamic thread local data. */ +#define R_390_TLS_GD64 41 /* Direct 64 bit for general dynamic thread local data. */ +#define R_390_TLS_GOTIE12 42 /* 12 bit GOT offset for static TLS block offset. */ +#define R_390_TLS_GOTIE32 43 /* 32 bit GOT offset for static TLS block offset. */ +#define R_390_TLS_GOTIE64 44 /* 64 bit GOT offset for static TLS block offset. */ +#define R_390_TLS_LDM32 45 /* Direct 32 bit for local dynamic thread local data in LE code. */ +#define R_390_TLS_LDM64 46 /* Direct 64 bit for local dynamic thread local data in LE code. */ +#define R_390_TLS_IE32 47 /* 32 bit address of GOT entry for negated static TLS block offset. */ +#define R_390_TLS_IE64 48 /* 64 bit address of GOT entry for negated static TLS block offset. */ +#define R_390_TLS_IEENT 49 /* 32 bit rel. offset to GOT entry for negated static TLS block offset. */ +#define R_390_TLS_LE32 50 /* 32 bit negated offset relative to static TLS block. */ +#define R_390_TLS_LE64 51 /* 64 bit negated offset relative to static TLS block. */ +#define R_390_TLS_LDO32 52 /* 32 bit offset relative to TLS block. */ +#define R_390_TLS_LDO64 53 /* 64 bit offset relative to TLS block. */ +#define R_390_TLS_DTPMOD 54 /* ID of module containing symbol. */ +#define R_390_TLS_DTPOFF 55 /* Offset in TLS block. */ +#define R_390_TLS_TPOFF 56 /* Negated offset in static TLS block. */ #define R_390_20 57 /* Direct 20 bit. */ #define R_390_GOT20 58 /* 20 bit GOT offset. */ #define R_390_GOTPLT20 59 /* 20 bit offset to jump slot. */ -#define R_390_TLS_GOTIE20 60 /* 20 bit GOT offset for static TLS \ - block offset. */ -#define R_390_IRELATIVE 61 /* STT_GNU_IFUNC relocation. */ +#define R_390_TLS_GOTIE20 60 /* 20 bit GOT offset for static TLS block offset. */ +#define R_390_IRELATIVE 61 /* STT_GNU_IFUNC relocation. */ /* Keep this the last entry. */ #define R_390_NUM 62 @@ -3684,20 +3586,15 @@ enum { #define R_MN10300_TLS_GD 24 /* 32-bit offset for global dynamic. */ #define R_MN10300_TLS_LD 25 /* 32-bit offset for local dynamic. */ #define R_MN10300_TLS_LDO 26 /* Module-relative offset. */ -#define R_MN10300_TLS_GOTIE 27 /* GOT offset for static TLS block \ - offset. */ -#define R_MN10300_TLS_IE 28 /* GOT address for static TLS block \ - offset. */ -#define R_MN10300_TLS_LE 29 /* Offset relative to static TLS \ - block. */ -#define R_MN10300_TLS_DTPMOD 30 /* ID of module containing symbol. */ -#define R_MN10300_TLS_DTPOFF 31 /* Offset in module TLS block. */ -#define R_MN10300_TLS_TPOFF 32 /* Offset in static TLS block. */ -#define R_MN10300_SYM_DIFF 33 /* Adjustment for next reloc as needed \ - by linker relaxation. */ -#define R_MN10300_ALIGN 34 /* Alignment requirement for linker \ - relaxation. */ -#define R_MN10300_NUM 35 +#define R_MN10300_TLS_GOTIE 27 /* GOT offset for static TLS block offset. */ +#define R_MN10300_TLS_IE 28 /* GOT address for static TLS block offset. */ +#define R_MN10300_TLS_LE 29 /* Offset relative to static TLS block. */ +#define R_MN10300_TLS_DTPMOD 30 /* ID of module containing symbol. */ +#define R_MN10300_TLS_DTPOFF 31 /* Offset in module TLS block. */ +#define R_MN10300_TLS_TPOFF 32 /* Offset in static TLS block. */ +#define R_MN10300_SYM_DIFF 33 /* Adjustment for next reloc as needed by linker relaxation. */ +#define R_MN10300_ALIGN 34 /* Alignment requirement for linker relaxation. */ +#define R_MN10300_NUM 35 /* M32R relocs. */ #define R_M32R_NONE 0 /* No reloc. */ @@ -3728,31 +3625,24 @@ enum { #define R_M32R_RELA_GNU_VTENTRY 44 #define R_M32R_REL32 45 /* PC relative 32 bit. */ -#define R_M32R_GOT24 48 /* 24 bit GOT entry */ -#define R_M32R_26_PLTREL 49 /* 26 bit PC relative to PLT shifted */ -#define R_M32R_COPY 50 /* Copy symbol at runtime */ -#define R_M32R_GLOB_DAT 51 /* Create GOT entry */ -#define R_M32R_JMP_SLOT 52 /* Create PLT entry */ -#define R_M32R_RELATIVE 53 /* Adjust by program base */ -#define R_M32R_GOTOFF 54 /* 24 bit offset to GOT */ -#define R_M32R_GOTPC24 55 /* 24 bit PC relative offset to GOT */ -#define R_M32R_GOT16_HI_ULO 56 /* High 16 bit GOT entry with unsigned \ - low */ -#define R_M32R_GOT16_HI_SLO 57 /* High 16 bit GOT entry with signed \ - low */ -#define R_M32R_GOT16_LO 58 /* Low 16 bit GOT entry */ -#define R_M32R_GOTPC_HI_ULO 59 /* High 16 bit PC relative offset to \ - GOT with unsigned low */ -#define R_M32R_GOTPC_HI_SLO 60 /* High 16 bit PC relative offset to \ - GOT with signed low */ -#define R_M32R_GOTPC_LO 61 /* Low 16 bit PC relative offset to \ - GOT */ -#define R_M32R_GOTOFF_HI_ULO 62 /* High 16 bit offset to GOT \ - with unsigned low */ -#define R_M32R_GOTOFF_HI_SLO 63 /* High 16 bit offset to GOT \ - with signed low */ -#define R_M32R_GOTOFF_LO 64 /* Low 16 bit offset to GOT */ -#define R_M32R_NUM 256 /* Keep this the last entry. */ +#define R_M32R_GOT24 48 /* 24 bit GOT entry */ +#define R_M32R_26_PLTREL 49 /* 26 bit PC relative to PLT shifted */ +#define R_M32R_COPY 50 /* Copy symbol at runtime */ +#define R_M32R_GLOB_DAT 51 /* Create GOT entry */ +#define R_M32R_JMP_SLOT 52 /* Create PLT entry */ +#define R_M32R_RELATIVE 53 /* Adjust by program base */ +#define R_M32R_GOTOFF 54 /* 24 bit offset to GOT */ +#define R_M32R_GOTPC24 55 /* 24 bit PC relative offset to GOT */ +#define R_M32R_GOT16_HI_ULO 56 /* High 16 bit GOT entry with unsigned low */ +#define R_M32R_GOT16_HI_SLO 57 /* High 16 bit GOT entry with signed low */ +#define R_M32R_GOT16_LO 58 /* Low 16 bit GOT entry */ +#define R_M32R_GOTPC_HI_ULO 59 /* High 16 bit PC relative offset to GOT with unsigned low */ +#define R_M32R_GOTPC_HI_SLO 60 /* High 16 bit PC relative offset to GOT with signed low */ +#define R_M32R_GOTPC_LO 61 /* Low 16 bit PC relative offset to GOT */ +#define R_M32R_GOTOFF_HI_ULO 62 /* High 16 bit offset to GOT with unsigned low */ +#define R_M32R_GOTOFF_HI_SLO 63 /* High 16 bit offset to GOT with signed low */ +#define R_M32R_GOTOFF_LO 64 /* Low 16 bit offset to GOT */ +#define R_M32R_NUM 256 /* Keep this the last entry. */ /* MicroBlaze relocations */ #define R_MICROBLAZE_NONE 0 /* No reloc. */ @@ -3811,32 +3701,31 @@ enum { #define R_NIOS2_UJMP 18 /* Unconditional branch. */ #define R_NIOS2_CJMP 19 /* Conditional branch. */ #define R_NIOS2_CALLR 20 /* Indirect call through register. */ -#define R_NIOS2_ALIGN 21 /* Alignment requirement for \ - linker relaxation. */ -#define R_NIOS2_GOT16 22 /* 16 bit GOT entry. */ -#define R_NIOS2_CALL16 23 /* 16 bit GOT entry for function. */ -#define R_NIOS2_GOTOFF_LO 24 /* %lo of offset to GOT pointer. */ -#define R_NIOS2_GOTOFF_HA 25 /* %hiadj of offset to GOT pointer. */ -#define R_NIOS2_PCREL_LO 26 /* %lo of PC relative offset. */ -#define R_NIOS2_PCREL_HA 27 /* %hiadj of PC relative offset. */ -#define R_NIOS2_TLS_GD16 28 /* 16 bit GOT offset for TLS GD. */ -#define R_NIOS2_TLS_LDM16 29 /* 16 bit GOT offset for TLS LDM. */ -#define R_NIOS2_TLS_LDO16 30 /* 16 bit module relative offset. */ -#define R_NIOS2_TLS_IE16 31 /* 16 bit GOT offset for TLS IE. */ -#define R_NIOS2_TLS_LE16 32 /* 16 bit LE TP-relative offset. */ -#define R_NIOS2_TLS_DTPMOD 33 /* Module number. */ -#define R_NIOS2_TLS_DTPREL 34 /* Module-relative offset. */ -#define R_NIOS2_TLS_TPREL 35 /* TP-relative offset. */ -#define R_NIOS2_COPY 36 /* Copy symbol at runtime. */ -#define R_NIOS2_GLOB_DAT 37 /* Create GOT entry. */ -#define R_NIOS2_JUMP_SLOT 38 /* Create PLT entry. */ -#define R_NIOS2_RELATIVE 39 /* Adjust by program base. */ -#define R_NIOS2_GOTOFF 40 /* 16 bit offset to GOT pointer. */ -#define R_NIOS2_CALL26_NOAT 41 /* Direct call in .noat section. */ -#define R_NIOS2_GOT_LO 42 /* %lo() of GOT entry. */ -#define R_NIOS2_GOT_HA 43 /* %hiadj() of GOT entry. */ -#define R_NIOS2_CALL_LO 44 /* %lo() of function GOT entry. */ -#define R_NIOS2_CALL_HA 45 /* %hiadj() of function GOT entry. */ +#define R_NIOS2_ALIGN 21 /* Alignment requirement for linker relaxation. */ +#define R_NIOS2_GOT16 22 /* 16 bit GOT entry. */ +#define R_NIOS2_CALL16 23 /* 16 bit GOT entry for function. */ +#define R_NIOS2_GOTOFF_LO 24 /* %lo of offset to GOT pointer. */ +#define R_NIOS2_GOTOFF_HA 25 /* %hiadj of offset to GOT pointer. */ +#define R_NIOS2_PCREL_LO 26 /* %lo of PC relative offset. */ +#define R_NIOS2_PCREL_HA 27 /* %hiadj of PC relative offset. */ +#define R_NIOS2_TLS_GD16 28 /* 16 bit GOT offset for TLS GD. */ +#define R_NIOS2_TLS_LDM16 29 /* 16 bit GOT offset for TLS LDM. */ +#define R_NIOS2_TLS_LDO16 30 /* 16 bit module relative offset. */ +#define R_NIOS2_TLS_IE16 31 /* 16 bit GOT offset for TLS IE. */ +#define R_NIOS2_TLS_LE16 32 /* 16 bit LE TP-relative offset. */ +#define R_NIOS2_TLS_DTPMOD 33 /* Module number. */ +#define R_NIOS2_TLS_DTPREL 34 /* Module-relative offset. */ +#define R_NIOS2_TLS_TPREL 35 /* TP-relative offset. */ +#define R_NIOS2_COPY 36 /* Copy symbol at runtime. */ +#define R_NIOS2_GLOB_DAT 37 /* Create GOT entry. */ +#define R_NIOS2_JUMP_SLOT 38 /* Create PLT entry. */ +#define R_NIOS2_RELATIVE 39 /* Adjust by program base. */ +#define R_NIOS2_GOTOFF 40 /* 16 bit offset to GOT pointer. */ +#define R_NIOS2_CALL26_NOAT 41 /* Direct call in .noat section. */ +#define R_NIOS2_GOT_LO 42 /* %lo() of GOT entry. */ +#define R_NIOS2_GOT_HA 43 /* %hiadj() of GOT entry. */ +#define R_NIOS2_CALL_LO 44 /* %lo() of function GOT entry. */ +#define R_NIOS2_CALL_HA 45 /* %hiadj() of function GOT entry. */ /* TILEPro relocations. */ #define R_TILEPRO_NONE 0 /* No reloc */ diff --git a/librz/bin/format/java/class_attribute.h b/librz/bin/format/java/class_attribute.h index 3e0fedfbbb..b9550e4b1f 100644 --- a/librz/bin/format/java/class_attribute.h +++ b/librz/bin/format/java/class_attribute.h @@ -102,7 +102,7 @@ typedef struct java_attribute_module_t { ut16 module_version_index; ut16 requires_count; - ModuleRequire *requires; + ModuleRequire * requires; ut16 exports_count; ModuleExport *exports; diff --git a/librz/bin/format/mach0/mach0_defines.h b/librz/bin/format/mach0/mach0_defines.h index a0417b5dd0..bd1485565b 100644 --- a/librz/bin/format/mach0/mach0_defines.h +++ b/librz/bin/format/mach0/mach0_defines.h @@ -1055,7 +1055,7 @@ static inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc) { } static inline void SET_LIBRARY_ORDINAL(uint16_t *n_desc, uint8_t ordinal) { - *n_desc = (((*n_desc) & 0x00ff) | (((ordinal)&0xff) << 8)); + *n_desc = (((*n_desc) & 0x00ff) | (((ordinal) & 0xff) << 8)); } static inline uint8_t GET_COMM_ALIGN(uint16_t n_desc) { diff --git a/librz/bin/format/mdmp/mdmp_pe.c b/librz/bin/format/mdmp/mdmp_pe.c index bc1ff7d869..7156cccd2b 100644 --- a/librz/bin/format/mdmp/mdmp_pe.c +++ b/librz/bin/format/mdmp/mdmp_pe.c @@ -70,8 +70,7 @@ RzPVector /**/ *PE_(rz_bin_mdmp_pe_get_entrypoint)(struct PE_(rz_bi rz_pvector_push(ret, ptr); } - PE_(add_tls_callbacks) - (pe_bin->bin, ret); + PE_(add_tls_callbacks)(pe_bin->bin, ret); free(entry); @@ -135,8 +134,7 @@ RzPVector /**/ *PE_(rz_bin_mdmp_pe_get_sections)(struct PE_(rz_b rz_pvector_free(ret); return NULL; } - PE_(rz_bin_pe_check_sections) - (pe_bin->bin, §ions); + PE_(rz_bin_pe_check_sections)(pe_bin->bin, §ions); for (i = 0; !sections[i].last; i++) { if (!(ptr = RZ_NEW0(RzBinSection))) { break; diff --git a/librz/bin/format/objc/mach0_classes.c b/librz/bin/format/objc/mach0_classes.c index 86b0f66af3..e8c86ab61e 100644 --- a/librz/bin/format/objc/mach0_classes.c +++ b/librz/bin/format/objc/mach0_classes.c @@ -18,7 +18,7 @@ #define METHOD_LIST_FLAG_IS_PREOPT 0x3 #define METHOD_LIST_ENTSIZE_FLAG_MASK 0xffff0003 -#define RO_DATA_PTR(x) ((x)&FAST_DATA_MASK) +#define RO_DATA_PTR(x) ((x) & FAST_DATA_MASK) #if RZ_BIN_MACH064 #define rz_buf_read_mach0_ut_offset rz_buf_read_ble64_offset diff --git a/librz/bin/format/pe/pe.c b/librz/bin/format/pe/pe.c index 9488ac4f8f..36b5270736 100644 --- a/librz/bin/format/pe/pe.c +++ b/librz/bin/format/pe/pe.c @@ -60,29 +60,19 @@ static int bin_pe_init(RzBinPEObj *bin) { return false; } bin->sections = PE_(rz_bin_pe_get_sections)(bin); - PE_(bin_pe_init_imports) - (bin); - PE_(bin_pe_init_exports) - (bin); - PE_(bin_pe_init_resource) - (bin); - PE_(bin_pe_init_security) - (bin); - PE_(bin_pe_init_relocs) - (bin); + PE_(bin_pe_init_imports)(bin); + PE_(bin_pe_init_exports)(bin); + PE_(bin_pe_init_resource)(bin); + PE_(bin_pe_init_security)(bin); + PE_(bin_pe_init_relocs)(bin); bin->big_endian = PE_(rz_bin_pe_is_big_endian)(bin); - PE_(bin_pe_init_rich_info) - (bin); - PE_(bin_pe_init_tls) - (bin); - PE_(bin_pe_init_clr) - (bin); - PE_(bin_pe_init_overlay) - (bin); - PE_(bin_pe_parse_resource) - (bin); + PE_(bin_pe_init_rich_info)(bin); + PE_(bin_pe_init_tls)(bin); + PE_(bin_pe_init_clr)(bin); + PE_(bin_pe_init_overlay)(bin); + PE_(bin_pe_parse_resource)(bin); return true; } @@ -96,8 +86,7 @@ void *PE_(rz_bin_pe_free)(RzBinPEObj *bin) { free(bin->export_directory); free(bin->import_directory); free(bin->resource_directory); - PE_(free_security_directory) - (bin->security_directory); + PE_(free_security_directory)(bin->security_directory); free(bin->delay_import_directory); bin_pe_dotnet_destroy_clr(bin->clr); free(bin->tls_directory); diff --git a/librz/bin/format/pe/pe.h b/librz/bin/format/pe/pe.h index 11c1ac90ce..f3f57f100b 100644 --- a/librz/bin/format/pe/pe.h +++ b/librz/bin/format/pe/pe.h @@ -78,7 +78,7 @@ typedef struct rz_bin_pe_reloc_block_t { // encoding is 12 bits for type and 4 bits for offset. #define PE_RELOC_ENT_TYPE(val) ((val) >> 12) -#define PE_RELOC_ENT_OFFSET(val) ((val)&0xfff) +#define PE_RELOC_ENT_OFFSET(val) ((val) & 0xfff) typedef struct rz_bin_pe_reloc_ent_t { ut16 raw_val; ///< Type + Offset of the relocation entry diff --git a/librz/bin/format/pe/pe_rsrc.c b/librz/bin/format/pe/pe_rsrc.c index 9a1a37c6ec..6c437da07b 100644 --- a/librz/bin/format/pe/pe_rsrc.c +++ b/librz/bin/format/pe/pe_rsrc.c @@ -129,7 +129,7 @@ static void free_StringFileInfo(StringFileInfo *stringFileInfo) { } } -#define align32(x) x = (((x)&0x3) == 0) ? (x) : ((x) & ~0x3) + 0x4; +#define align32(x) x = (((x) & 0x3) == 0) ? (x) : ((x) & ~0x3) + 0x4; static void free_VS_VERSIONINFO(PE_VS_VERSIONINFO *vs_VersionInfo) { if (vs_VersionInfo) { diff --git a/librz/bin/format/pe/pemixed.c b/librz/bin/format/pe/pemixed.c index 64b0e7f40d..3efee9bcc5 100644 --- a/librz/bin/format/pe/pemixed.c +++ b/librz/bin/format/pe/pemixed.c @@ -45,8 +45,7 @@ RzBinPEObj *rz_bin_pemixed_init_dos(RzBinPEObj *pe_bin) { RzBinPEObj *sub_bin_dos = RZ_NEW0(RzBinPEObj); if (!(sub_bin_dos->b = rz_buf_new_with_bytes(tmp_buf, pe_hdr_off))) { - PE_(rz_bin_pe_free) - (sub_bin_dos); + PE_(rz_bin_pe_free)(sub_bin_dos); return NULL; } @@ -141,8 +140,7 @@ void *rz_bin_pemixed_free(struct rz_bin_pemixed_obj_t *bin) { // only one free is nessescary since they all point // to the same original pe struct // possible memleak here - PE_(rz_bin_pe_free) - (bin->sub_bin_net); + PE_(rz_bin_pe_free)(bin->sub_bin_net); if (bin->sub_bin_dos) { rz_buf_free(bin->sub_bin_dos->b); // dos is the only one with its own buf } @@ -169,26 +167,22 @@ struct rz_bin_pemixed_obj_t *rz_bin_pemixed_from_bytes_new(const ut8 *buf, ut64 bin->size = size; pe_bin = PE_(rz_bin_pe_new_buf)(bin->b, true); if (!pe_bin) { - PE_(rz_bin_pe_free) - (pe_bin); + PE_(rz_bin_pe_free)(pe_bin); return rz_bin_pemixed_free(bin); } if (!pe_bin->clr || !pe_bin->clr->header) { - PE_(rz_bin_pe_free) - (pe_bin); + PE_(rz_bin_pe_free)(pe_bin); return rz_bin_pemixed_free(bin); } // check if binary only contains managed code // check implemented here cuz we need to intialize // the pe header to access the clr hdr if (check_il_only(pe_bin->clr->header->Flags)) { - PE_(rz_bin_pe_free) - (pe_bin); + PE_(rz_bin_pe_free)(pe_bin); return rz_bin_pemixed_free(bin); } if (!rz_bin_pemixed_init(bin, pe_bin)) { - PE_(rz_bin_pe_free) - (pe_bin); + PE_(rz_bin_pe_free)(pe_bin); return rz_bin_pemixed_free(bin); } return bin; diff --git a/librz/bin/p/bin_elf.inc b/librz/bin/p/bin_elf.inc index c9d758c057..47f2495a0d 100644 --- a/librz/bin/p/bin_elf.inc +++ b/librz/bin/p/bin_elf.inc @@ -1176,7 +1176,7 @@ static RzBinInfo *info(RzBinFile *bf) { return ret; } -static bool add_fields_aux(ELFOBJ *bin, RzPVector /**/ *result, ut64 offset, size_t size, const char *name, char *(get_value)(ELFOBJ *bin), const char *fmt) { +static bool add_fields_aux(ELFOBJ *bin, RzPVector /**/ *result, ut64 offset, size_t size, const char *name, char *(get_value)(ELFOBJ * bin), const char *fmt) { char *value = get_value(bin); if (!value) { return false; diff --git a/librz/bin/p/bin_pe.inc b/librz/bin/p/bin_pe.inc index e870100b04..febf5cfaba 100644 --- a/librz/bin/p/bin_pe.inc +++ b/librz/bin/p/bin_pe.inc @@ -32,8 +32,7 @@ static bool pe_load_buffer(RzBinFile *bf, RzBinObject *obj, RzBuffer *buf, Sdb * } static void pe_destroy(RzBinFile *bf) { - PE_(rz_bin_pe_free) - ((struct PE_(rz_bin_pe_obj_t) *)bf->o->bin_obj); + PE_(rz_bin_pe_free)((struct PE_(rz_bin_pe_obj_t) *)bf->o->bin_obj); } static ut64 pe_baddr(RzBinFile *bf) { @@ -166,8 +165,7 @@ static RzPVector /**/ *pe_maps(RzBinFile *bf) { map->vsize = RZ_ROUND(map->psize, 4096); map->perm = RZ_PERM_R; rz_pvector_push(ret, map); - PE_(rz_bin_pe_check_sections) - (bin, §ions); + PE_(rz_bin_pe_check_sections)(bin, §ions); for (size_t i = 0; !sections[i].last; i++) { RzBinMap *map = RZ_NEW0(RzBinMap); if (!map) { @@ -210,8 +208,7 @@ static RzPVector /**/ *pe_sections(RzBinFile *bf) { rz_pvector_free(ret); return NULL; } - PE_(rz_bin_pe_check_sections) - (bin, §ions); + PE_(rz_bin_pe_check_sections)(bin, §ions); for (i = 0; !sections[i].last; i++) { if (!(ptr = RZ_NEW0(RzBinSection))) { break; diff --git a/librz/core/cannotated_code.c b/librz/core/cannotated_code.c index 3ef0f0ef84..cf75f0c9f3 100644 --- a/librz/core/cannotated_code.c +++ b/librz/core/cannotated_code.c @@ -134,8 +134,7 @@ static void print_offset_in_binary_line_bar(RzAnnotatedCode *code, ut64 offset, width--; } } else { - PRINT_COLOR(PALETTE(offset) - : Color_GREEN); + PRINT_COLOR(PALETTE(offset) : Color_GREEN); rz_cons_printf(fmt[width], offset); PRINT_COLOR(Color_RESET); } diff --git a/librz/core/cbin.c b/librz/core/cbin.c index 6e62d14464..24215fd0b2 100644 --- a/librz/core/cbin.c +++ b/librz/core/cbin.c @@ -25,11 +25,11 @@ #define LOAD_BSS_MALLOC 0 -#define IS_MODE_SET(mode) ((mode)&RZ_MODE_SET) -#define IS_MODE_SIMPLE(mode) ((mode)&RZ_MODE_SIMPLE) -#define IS_MODE_SIMPLEST(mode) ((mode)&RZ_MODE_SIMPLEST) -#define IS_MODE_JSON(mode) ((mode)&RZ_MODE_JSON) -#define IS_MODE_RZCMD(mode) ((mode)&RZ_MODE_RIZINCMD) +#define IS_MODE_SET(mode) ((mode) & RZ_MODE_SET) +#define IS_MODE_SIMPLE(mode) ((mode) & RZ_MODE_SIMPLE) +#define IS_MODE_SIMPLEST(mode) ((mode) & RZ_MODE_SIMPLEST) +#define IS_MODE_JSON(mode) ((mode) & RZ_MODE_JSON) +#define IS_MODE_RZCMD(mode) ((mode) & RZ_MODE_RIZINCMD) #define IS_MODE_NORMAL(mode) (!(mode)) // dup from cmd_info diff --git a/librz/core/linux_heap_glibc.c b/librz/core/linux_heap_glibc.c index fba577275b..b2fc2fe2a0 100644 --- a/librz/core/linux_heap_glibc.c +++ b/librz/core/linux_heap_glibc.c @@ -280,8 +280,7 @@ static RZ_BORROW RzList /**/ *GH(fill_tcache_entries)(RzCore *core, GH bin->bin_num = i; bin->chunks = rz_list_newf((RzListFree)GH(rz_heap_chunk_free)); if (!bin->chunks) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); goto error; } rz_list_append(tcache_bins_list, bin); @@ -292,8 +291,7 @@ static RZ_BORROW RzList /**/ *GH(fill_tcache_entries)(RzCore *core, GH // get first chunk RzHeapChunkListItem *chunk = RZ_NEW0(RzHeapChunkListItem); if (!chunk) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); goto error; } chunk->addr = (ut64)(entry - GH(HDR_SZ)); @@ -367,8 +365,7 @@ static void GH(print_tcache)(RzCore *core, RzList /**/ *bins, PJ *pj, if (!pj) { rz_cons_printf(" -> "); } - GH(print_heap_chunk_simple) - (core, pos->addr, NULL, pj); + GH(print_heap_chunk_simple)(core, pos->addr, NULL, pj); if (!pj) { rz_cons_newline(); } @@ -527,8 +524,7 @@ RZ_API bool GH(rz_heap_update_main_arena)(RzCore *core, GHT m_arena, MallocState if (!cmain_arena->next) { return false; } - GH(update_arena_with_tc) - (cmain_arena, main_arena); + GH(update_arena_with_tc)(cmain_arena, main_arena); free(cmain_arena); } else { GH(RzHeap_MallocState) *cmain_arena = RZ_NEW0(GH(RzHeap_MallocState)); @@ -536,8 +532,7 @@ RZ_API bool GH(rz_heap_update_main_arena)(RzCore *core, GHT m_arena, MallocState return false; } (void)rz_io_read_at(core->io, m_arena, (ut8 *)cmain_arena, sizeof(GH(RzHeap_MallocState))); - GH(update_arena_without_tc) - (cmain_arena, main_arena); + GH(update_arena_without_tc)(cmain_arena, main_arena); free(cmain_arena); } return true; @@ -783,8 +778,7 @@ RZ_API bool GH(rz_heap_resolve_main_arena)(RzCore *core, GHT *m_arena) { return false; } - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); if (brk_start == GHT_MAX || brk_end == GHT_MAX) { RZ_LOG_ERROR("core: no heap section\n"); return false; @@ -798,16 +792,14 @@ RZ_API bool GH(rz_heap_resolve_main_arena)(RzCore *core, GHT *m_arena) { } if (main_arena_sym != GHT_MAX) { - GH(rz_heap_update_main_arena) - (core, main_arena_sym, ta); + GH(rz_heap_update_main_arena)(core, main_arena_sym, ta); *m_arena = main_arena_sym; core->dbg->main_arena_resolved = true; free(ta); return true; } while (addr_srch < libc_addr_end) { - GH(rz_heap_update_main_arena) - (core, addr_srch, ta); + GH(rz_heap_update_main_arena)(core, addr_srch, ta); if (ta->top > brk_start && ta->top < brk_end && ta->system_mem == heap_sz) { @@ -866,18 +858,15 @@ static bool GH(parse_tcache_from_addr)(RzCore *core, const GHT tls_addr, const G #endif tcache_heap = GH(tcache_new)(core); if (!GH(tcache_read)(core, tcache_guess, tcache_heap)) { - GH(tcache_free) - (tcache_heap); + GH(tcache_free)(tcache_heap); tcache_heap = NULL; } break; } if (tcache_heap != NULL) { RzList *bins = GH(fill_tcache_entries)(core, tcache_heap); - GH(print_tcache) - (core, bins, NULL, tid); - GH(tcache_free) - (tcache_heap); + GH(print_tcache)(core, bins, NULL, tid); + GH(tcache_free)(tcache_heap); tcache_heap = NULL; return true; } @@ -954,8 +943,7 @@ static void GH(resolve_tcache_perthread)(RZ_NONNULL RzCore *core) { RzList *thread_list = rz_debug_native_threads(dbg, dbg->pid); RzDebugPid *thread_dbg = rz_debug_get_thread(thread_list, th->pid); if (thread_dbg) { - GH(parse_tls_data) - (core, thread_dbg, tid); + GH(parse_tls_data)(core, thread_dbg, tid); } } } @@ -965,15 +953,13 @@ RZ_API RZ_OWN bool GH(resolve_heap_tcache)(RZ_NONNULL RzCore *core, GHT arena_ba RzDebug *dbg = core->dbg; if (dbg->threads) { - GH(resolve_tcache_perthread) - (core); + GH(resolve_tcache_perthread)(core); return true; } // Only main thread is present RzList *bins = GH(rz_heap_tcache_content)(core, arena_base); - GH(print_tcache) - (core, bins, NULL, 0); + GH(print_tcache)(core, bins, NULL, 0); return true; } @@ -1263,8 +1249,7 @@ static int GH(print_double_linked_list_bin)(RzCore *core, MallocState *main_aren return -1; } - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); if (brk_start == GHT_MAX || brk_end == GHT_MAX) { RZ_LOG_ERROR("core: no heap section\n"); return -1; @@ -1313,8 +1298,7 @@ static void GH(print_heap_bin)(RzCore *core, GHT m_arena, MallocState *main_aren PRINT_YA("Bins {\n"); for (size_t i = 0; i < NBINS - 1; i++) { PRINTF_YA(" Bin %03" PFMTSZu ":\n", i); - GH(print_double_linked_list_bin) - (core, main_arena, m_arena, offset, i, print_graph); + GH(print_double_linked_list_bin)(core, main_arena, m_arena, offset, i, print_graph); } PRINT_YA("\n}\n"); } else { @@ -1324,8 +1308,7 @@ static void GH(print_heap_bin)(RzCore *core, GHT m_arena, MallocState *main_aren return; } PRINTF_YA(" Bin %03" PFMT64u ":\n", (ut64)num_bin); - GH(print_double_linked_list_bin) - (core, main_arena, m_arena, offset, num_bin, print_graph); + GH(print_double_linked_list_bin)(core, main_arena, m_arena, offset, num_bin, print_graph); } return; } @@ -1359,8 +1342,7 @@ RZ_API RzHeapBin *GH(rz_heap_fastbin_content)(RzCore *core, MallocState *main_ar free(cnk); return heap_bin; } - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); heap_bin->fd = next; if (brk_start == GHT_MAX || brk_end == GHT_MAX) { free(cnk); @@ -1468,8 +1450,7 @@ void GH(print_heap_fastbin)(RzCore *core, GHT m_arena, MallocState *main_arena, if (!pj) { rz_cons_printf(" -> "); } - GH(print_heap_chunk_simple) - (core, pos->addr, NULL, pj); + GH(print_heap_chunk_simple)(core, pos->addr, NULL, pj); if (!pj) { rz_cons_newline(); } @@ -1482,8 +1463,7 @@ void GH(print_heap_fastbin)(RzCore *core, GHT m_arena, MallocState *main_arena, pj_end(pj); pj_end(pj); } - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); } } @@ -1553,8 +1533,7 @@ RZ_API RzList /**/ *GH(rz_heap_tcache_content)(RzCore *core, GHT ar } GHT brk_start = GHT_MAX, brk_end = GHT_MAX, initial_brk = GHT_MAX; - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); GHT fc_offset = GH(tcache_chunk_size)(core, brk_start); initial_brk = brk_start + fc_offset; if (brk_start == GHT_MAX || brk_end == GHT_MAX || initial_brk == GHT_MAX) { @@ -1587,8 +1566,7 @@ RZ_API RzList /**/ *GH(rz_heap_tcache_content)(RzCore *core, GHT ar // Get rz_tcache struct GH(RTcache) *tcache = GH(tcache_new)(core); if (!GH(tcache_read)(core, tcache_start, tcache)) { - GH(tcache_free) - (tcache); + GH(tcache_free)(tcache); return NULL; } @@ -1608,8 +1586,7 @@ RZ_API RzList /**/ *GH(rz_heap_tcache_content)(RzCore *core, GHT ar bin->bin_num = i; bin->chunks = rz_list_newf((RzListFree)GH(rz_heap_chunk_free)); if (!bin->chunks) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); goto error; } @@ -1673,8 +1650,7 @@ static void GH(print_tcache_content)(RzCore *core, GHT arena_base, GHT main_aren } PRINTF_YA("0x%" PFMT64x "\n", (ut64)arena_base); } - GH(print_tcache) - (core, bins, pj, 0); + GH(print_tcache)(core, bins, pj, 0); } void GH(print_malloc_states)(RzCore *core, GHT m_arena, MallocState *main_arena, bool json) { @@ -1792,8 +1768,7 @@ void GH(print_malloc_info)(RzCore *core, GHT m_state, GHT malloc_state) { return; } rz_io_read_at(core->io, h_info, (ut8 *)heap_info, sizeof(GH(RzHeapInfo))); - GH(print_inst_minfo) - (core, heap_info, h_info); + GH(print_inst_minfo)(core, heap_info, h_info); MallocState *ms = RZ_NEW0(MallocState); if (!ms) { free(heap_info); @@ -1809,8 +1784,7 @@ void GH(print_malloc_info)(RzCore *core, GHT m_state, GHT malloc_state) { if ((ms->top >> 16) << 16 != h_info) { h_info = (ms->top >> 16) << 16; rz_io_read_at(core->io, h_info, (ut8 *)heap_info, sizeof(GH(RzHeapInfo))); - GH(print_inst_minfo) - (core, heap_info, h_info); + GH(print_inst_minfo)(core, heap_info, h_info); } } free(heap_info); @@ -1868,8 +1842,7 @@ RZ_API RzHeapBin *GH(rz_heap_bin_content)(RzCore *core, MallocState *main_arena, bin->chunks = rz_list_newf(free); GH(RzHeapChunk) *head = RZ_NEW0(GH(RzHeapChunk)); if (!head) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); return NULL; } @@ -1880,13 +1853,11 @@ RZ_API RzHeapBin *GH(rz_heap_bin_content)(RzCore *core, MallocState *main_arena, } GH(RzHeapChunk) *cnk = RZ_NEW0(GH(RzHeapChunk)); if (!cnk) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); return NULL; } GHT brk_start = GHT_MAX, brk_end = GHT_MAX, initial_brk = GHT_MAX; - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); if (brk_start == GHT_MAX || brk_end == GHT_MAX) { free(cnk); return bin; @@ -1936,8 +1907,7 @@ static int GH(print_bin_content)(RzCore *core, MallocState *main_arena, int bin_ RzHeapBin *bin = GH(rz_heap_bin_content)(core, main_arena, bin_num, m_arena); RzList *chunks = bin->chunks; if (rz_list_length(chunks) == 0) { - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); return 0; } int chunks_cnt = 0; @@ -1967,8 +1937,7 @@ static int GH(print_bin_content)(RzCore *core, MallocState *main_arena, int bin_ if (!pj) { rz_cons_printf(" -> "); } - GH(print_heap_chunk_simple) - (core, pos->addr, NULL, pj); + GH(print_heap_chunk_simple)(core, pos->addr, NULL, pj); if (!pj) { rz_cons_newline(); } @@ -1977,8 +1946,7 @@ static int GH(print_bin_content)(RzCore *core, MallocState *main_arena, int bin_ if (bin->message) { PRINTF_RA("%s\n", bin->message); } - GH(rz_heap_bin_free) - (bin); + GH(rz_heap_bin_free)(bin); if (pj) { pj_end(pj); } @@ -2098,31 +2066,26 @@ static void GH(print_main_arena_bins)(RzCore *core, GHT m_arena, MallocState *ma pj_ka(pj, "bins"); } if (format == RZ_HEAP_BIN_ANY || format == RZ_HEAP_BIN_TCACHE) { - GH(print_tcache_content) - (core, m_arena, main_arena_base, pj); + GH(print_tcache_content)(core, m_arena, main_arena_base, pj); rz_cons_newline(); } if (format == RZ_HEAP_BIN_ANY || format == RZ_HEAP_BIN_FAST) { char *input = rz_str_newlen("", 1); bool main_arena_only = true; - GH(print_heap_fastbin) - (core, m_arena, main_arena, global_max_fast, input, main_arena_only, pj); + GH(print_heap_fastbin)(core, m_arena, main_arena, global_max_fast, input, main_arena_only, pj); free(input); rz_cons_newline(); } if (format == RZ_HEAP_BIN_ANY || format == RZ_HEAP_BIN_UNSORTED) { - GH(print_unsortedbin_description) - (core, m_arena, main_arena, pj); + GH(print_unsortedbin_description)(core, m_arena, main_arena, pj); rz_cons_newline(); } if (format == RZ_HEAP_BIN_ANY || format == RZ_HEAP_BIN_SMALL) { - GH(print_smallbin_description) - (core, m_arena, main_arena, pj); + GH(print_smallbin_description)(core, m_arena, main_arena, pj); rz_cons_newline(); } if (format == RZ_HEAP_BIN_ANY || format == RZ_HEAP_BIN_LARGE) { - GH(print_largebin_description) - (core, m_arena, main_arena, pj); + GH(print_largebin_description)(core, m_arena, main_arena, pj); rz_cons_newline(); } if (json) { @@ -2215,8 +2178,7 @@ RZ_API RzList /**/ *GH(rz_heap_chunks_list)(RzCore *core, int glibc_version = core->dbg->glibc_version; if (m_arena == m_state) { - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); if (tcache) { initial_brk = ((brk_start >> 12) << 12) + GH(HDR_SZ); if (rz_config_get_b(core->config, "cfg.debug")) { @@ -2324,8 +2286,7 @@ RZ_API RzList /**/ *GH(rz_heap_chunks_list)(RzCore *core, free(cnk_next); return chunks; } - GH(tcache_read) - (core, tcache_initial_brk, tcache_heap); + GH(tcache_read)(core, tcache_initial_brk, tcache_heap); size_t i; for (i = 0; i < TCACHE_MAX_BINS; i++) { int count = GH(tcache_get_count)(tcache_heap, i); @@ -2355,8 +2316,7 @@ RZ_API RzList /**/ *GH(rz_heap_chunks_list)(RzCore *core, } } } - GH(tcache_free) - (tcache_heap); + GH(tcache_free)(tcache_heap); } next_chunk += size_tmp; @@ -2477,8 +2437,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_chunks_print_handler)(RzCore *core, int argc, } GHT brk_start, brk_end; if (m_arena == m_state) { - GH(get_brks) - (core, &brk_start, &brk_end); + GH(get_brks)(core, &brk_start, &brk_end); } else { brk_start = ((m_state >> 16) << 16); @@ -2534,8 +2493,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_chunks_print_handler)(RzCore *core, int argc, } rz_list_foreach (chunks, iter, pos) { if (mode == RZ_OUTPUT_MODE_STANDARD || mode == RZ_OUTPUT_MODE_LONG) { - GH(print_heap_chunk_simple) - (core, pos->addr, pos->status, NULL); + GH(print_heap_chunk_simple)(core, pos->addr, pos->status, NULL); rz_cons_newline(); if (mode == RZ_OUTPUT_MODE_LONG) { int size = 0x10; @@ -2577,8 +2535,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_chunks_print_handler)(RzCore *core, int argc, } } if (mode == RZ_OUTPUT_MODE_STANDARD || mode == RZ_OUTPUT_MODE_LONG) { - GH(print_heap_chunk_simple) - (core, main_arena->top, "free", NULL); + GH(print_heap_chunk_simple)(core, main_arena->top, "free", NULL); PRINT_RA("[top]"); rz_cons_printf("[brk_start: "); PRINTF_YA("0x%" PFMT64x, (ut64)brk_start); @@ -2644,8 +2601,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_main_arena_print_handler)(RzCore *core, int argc, c free(main_arena); return RZ_CMD_STATUS_ERROR; } - GH(print_arena_stats) - (core, m_state, main_arena, global_max_fast, mode); + GH(print_arena_stats)(core, m_state, main_arena, global_max_fast, mode); free(main_arena); return RZ_CMD_STATUS_OK; } @@ -2661,8 +2617,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_chunk_print_handler)(RzCore *core, int argc, c return RZ_CMD_STATUS_ERROR; } ut64 addr = core->offset; - GH(print_heap_chunk) - (core, addr); + GH(print_heap_chunk)(core, addr); free(main_arena); return RZ_CMD_STATUS_OK; } @@ -2692,8 +2647,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_info_print_handler)(RzCore *core, int argc, co free(main_arena); return RZ_CMD_STATUS_ERROR; } - GH(print_malloc_info) - (core, m_arena, m_state); + GH(print_malloc_info)(core, m_arena, m_state); free(main_arena); return RZ_CMD_STATUS_OK; } @@ -2747,8 +2701,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_bins_list_print_handler)(RzCore *core, const c free(dup); return RZ_CMD_STATUS_ERROR; } - GH(print_heap_bin) - (core, m_state, main_arena, dup, mode == RZ_OUTPUT_MODE_GRAPH); + GH(print_heap_bin)(core, m_state, main_arena, dup, mode == RZ_OUTPUT_MODE_GRAPH); } else { PRINT_RA("This address is not part of the arenas\n"); free(main_arena); @@ -2792,8 +2745,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_fastbins_print_handler)(void *data, const char free(main_arena); return RZ_CMD_STATUS_ERROR; } - GH(print_heap_fastbin) - (core, m_state, main_arena, global_max_fast, dup, main_arena_only, NULL); + GH(print_heap_fastbin)(core, m_state, main_arena, global_max_fast, dup, main_arena_only, NULL); } else { PRINT_RA("This address is not part of the arenas\n"); free(dup); @@ -2851,8 +2803,7 @@ RZ_IPI RzCmdStatus GH(rz_cmd_heap_arena_bins_print_handler)(RzCore *core, int ar bin_format = RZ_HEAP_BIN_LARGE; } } - GH(print_main_arena_bins) - (core, m_state, main_arena, m_arena, global_max_fast, bin_format, json); + GH(print_main_arena_bins)(core, m_state, main_arena, m_arena, global_max_fast, bin_format, json); free(main_arena); return RZ_CMD_STATUS_OK; } diff --git a/librz/core/linux_heap_jemalloc.c b/librz/core/linux_heap_jemalloc.c index adc7f18fcd..9ce44e90e7 100644 --- a/librz/core/linux_heap_jemalloc.c +++ b/librz/core/linux_heap_jemalloc.c @@ -497,16 +497,13 @@ static void GH(jemalloc_get_runs)(RzCore *core, const char *input) { static void GH(cmd_dbg_map_jemalloc)(RzCore *core, char dmx_variant, const char *arg) { switch (dmx_variant) { case 'a': // dmxa - GH(jemalloc_print_narenas) - (core, arg); + GH(jemalloc_print_narenas)(core, arg); break; case 'b': // dmxb - GH(jemalloc_get_bins) - (core, arg); + GH(jemalloc_get_bins)(core, arg); break; case 'c': // dmxc - GH(jemalloc_get_chunks) - (core, arg); + GH(jemalloc_get_chunks)(core, arg); break; } } diff --git a/librz/core/windows_heap.c b/librz/core/windows_heap.c index a11b7861e4..08e113a60d 100644 --- a/librz/core/windows_heap.c +++ b/librz/core/windows_heap.c @@ -76,11 +76,11 @@ } #define UPDATE_FLAGS(hb, flags) \ - if (((flags)&0xf1) || ((flags)&0x0200)) { \ + if (((flags) & 0xf1) || ((flags) & 0x0200)) { \ hb->dwFlags = LF32_FIXED; \ - } else if ((flags)&0x20) { \ + } else if ((flags) & 0x20) { \ hb->dwFlags = LF32_MOVEABLE; \ - } else if ((flags)&0x0100) { \ + } else if ((flags) & 0x0100) { \ hb->dwFlags = LF32_FREE; \ } \ hb->dwFlags |= ((flags) >> SHIFT) << SHIFT; diff --git a/librz/crypto/des.c b/librz/crypto/des.c index 17d3107b70..8241045762 100644 --- a/librz/crypto/des.c +++ b/librz/crypto/des.c @@ -253,7 +253,7 @@ RZ_API void rz_des_pc2(RZ_OUT ut32 *keylo, RZ_OUT ut32 *keyhi, RZ_IN ut32 deslo, ((deslo << 2) & 0x00020000) | ((deslo >> 10) & 0x00010000) | ((deshi >> 13) & 0x00002000) | ((deshi >> 4) & 0x00001000) | ((deshi << 6) & 0x00000800) | ((deshi >> 1) & 0x00000400) | - ((deshi >> 14) & 0x00000200) | ((deshi)&0x00000100) | + ((deshi >> 14) & 0x00000200) | ((deshi) & 0x00000100) | ((deshi >> 5) & 0x00000020) | ((deshi >> 10) & 0x00000010) | ((deshi >> 3) & 0x00000008) | ((deshi >> 18) & 0x00000004) | ((deshi >> 26) & 0x00000002) | ((deshi >> 24) & 0x00000001); @@ -266,7 +266,7 @@ RZ_API void rz_des_pc2(RZ_OUT ut32 *keylo, RZ_OUT ut32 *keyhi, RZ_IN ut32 deslo, ((deslo << 15) & 0x00020000) | ((deslo >> 4) & 0x00010000) | ((deshi >> 2) & 0x00002000) | ((deshi << 8) & 0x00001000) | ((deshi >> 14) & 0x00000808) | ((deshi >> 9) & 0x00000400) | - ((deshi)&0x00000200) | ((deshi << 7) & 0x00000100) | + ((deshi) & 0x00000200) | ((deshi << 7) & 0x00000100) | ((deshi >> 7) & 0x00000020) | ((deshi >> 3) & 0x00000011) | ((deshi << 2) & 0x00000004) | ((deshi >> 21) & 0x00000002); } diff --git a/librz/crypto/p/crypto_blowfish.c b/librz/crypto/p/crypto_blowfish.c index 2b100d87a3..bca4fc8b8c 100644 --- a/librz/crypto/p/crypto_blowfish.c +++ b/librz/crypto/p/crypto_blowfish.c @@ -169,7 +169,7 @@ static ut32 F(struct blowfish_state *const state, const ut32 inbuf) { ut8 a = (inbuf >> 24) & 0xff; ut8 b = (inbuf >> 16) & 0xff; ut8 c = (inbuf >> 8) & 0xff; - ut8 d = (inbuf)&0xff; + ut8 d = (inbuf) & 0xff; return ((state->s[0][a] + state->s[1][b]) ^ state->s[2][c]) + state->s[3][d]; } diff --git a/librz/debug/p/native/windows/windows_debug.h b/librz/debug/p/native/windows/windows_debug.h index 5e542c3c65..9fa40cc166 100644 --- a/librz/debug/p/native/windows/windows_debug.h +++ b/librz/debug/p/native/windows/windows_debug.h @@ -114,10 +114,8 @@ typedef struct { } LIB_ITEM, *PLIB_ITEM; // Vista -BOOL(WINAPI *w32_ProcessIdToSessionId) -(DWORD, DWORD *); -BOOL(WINAPI *w32_QueryFullProcessImageNameW) -(HANDLE, DWORD, LPWSTR, PDWORD); +BOOL(WINAPI *w32_ProcessIdToSessionId)(DWORD, DWORD *); +BOOL(WINAPI *w32_QueryFullProcessImageNameW)(HANDLE, DWORD, LPWSTR, PDWORD); // Internal NT functions (winternl.h) NTSTATUS(WINAPI *w32_NtQuerySystemInformation) (ULONG, PVOID, ULONG, PULONG); @@ -129,14 +127,11 @@ NTSTATUS(WINAPI *w32_NtQueryObject) (HANDLE, ULONG, PVOID, ULONG, PULONG); // fpu access API (Windows 7) ut64(WINAPI *w32_GetEnabledXStateFeatures)(); -BOOL(WINAPI *w32_InitializeContext) -(PVOID, DWORD, PCONTEXT *, PDWORD); -BOOL(WINAPI *w32_GetXStateFeaturesMask) -(PCONTEXT Context, PDWORD64); +BOOL(WINAPI *w32_InitializeContext)(PVOID, DWORD, PCONTEXT *, PDWORD); +BOOL(WINAPI *w32_GetXStateFeaturesMask)(PCONTEXT Context, PDWORD64); PVOID(WINAPI *w32_LocateXStateFeature) (PCONTEXT Context, DWORD, PDWORD); -BOOL(WINAPI *w32_SetXStateFeaturesMask) -(PCONTEXT Context, DWORD64); +BOOL(WINAPI *w32_SetXStateFeaturesMask)(PCONTEXT Context, DWORD64); // APIs int w32_init(RzDebug *dbg); diff --git a/librz/egg/emit_x86.c b/librz/egg/emit_x86.c index dba98ab6fd..096c685667 100644 --- a/librz/egg/emit_x86.c +++ b/librz/egg/emit_x86.c @@ -170,7 +170,7 @@ static void emit_string(RzEgg *egg, const char *dstvar, const char *str, int j) /* XXX: Hack: Adjust offset in RZ_BP correctly for 64b addresses */ #define BPOFF (RZ_SZ - 4) -#define M32(x) (unsigned int)((x)&0xffffffff) +#define M32(x) (unsigned int)((x) & 0xffffffff) /* XXX: Assumes sizeof(ut32) == 4 */ for (i = 4; i <= oj; i += 4) { /* XXX endian issues (non-portable asm) */ diff --git a/librz/hash/algorithms/sm3/sm3.c b/librz/hash/algorithms/sm3/sm3.c index 81153ddaaf..1317998bca 100644 --- a/librz/hash/algorithms/sm3/sm3.c +++ b/librz/hash/algorithms/sm3/sm3.c @@ -182,7 +182,7 @@ static void sm3_process_block(const void *buffer, ut64 len, sm3_ctx_t *ctx) { ctx->total[0] += low_len; ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < low_len); -#define rol(x, n) (((x) << ((n)&31)) | ((x) >> ((32 - (n)) & 31))) +#define rol(x, n) (((x) << ((n) & 31)) | ((x) >> ((32 - (n)) & 31))) #define P0(x) ((x) ^ rol(x, 9) ^ rol(x, 17)) #define P1(x) ((x) ^ rol(x, 15) ^ rol(x, 23)) diff --git a/librz/hash/algorithms/ssdeep/fnv_hash.h b/librz/hash/algorithms/ssdeep/fnv_hash.h index 117a66235f..ce5eaa8554 100644 --- a/librz/hash/algorithms/ssdeep/fnv_hash.h +++ b/librz/hash/algorithms/ssdeep/fnv_hash.h @@ -40,707 +40,4291 @@ #define FNV_B64_00 \ { \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ } #define FNV_B64_01 \ { \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ } #define FNV_B64_02 \ { \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ } #define FNV_B64_03 \ { \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ } #define FNV_B64_04 \ { \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ } #define FNV_B64_05 \ { \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ } #define FNV_B64_06 \ { \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ } #define FNV_B64_07 \ { \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ } #define FNV_B64_08 \ { \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ } #define FNV_B64_09 \ { \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ } #define FNV_B64_0A \ { \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ } #define FNV_B64_0B \ { \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ } #define FNV_B64_0C \ { \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ } #define FNV_B64_0D \ { \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ } #define FNV_B64_0E \ { \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ } #define FNV_B64_0F \ { \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ } #define FNV_B64_10 \ { \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ } #define FNV_B64_11 \ { \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ } #define FNV_B64_12 \ { \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ } #define FNV_B64_13 \ { \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ } #define FNV_B64_14 \ { \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ } #define FNV_B64_15 \ { \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ } #define FNV_B64_16 \ { \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ } #define FNV_B64_17 \ { \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ } #define FNV_B64_18 \ { \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ } #define FNV_B64_19 \ { \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ } #define FNV_B64_1A \ { \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ } #define FNV_B64_1B \ { \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ } #define FNV_B64_1C \ { \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ } #define FNV_B64_1D \ { \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ } #define FNV_B64_1E \ { \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ } #define FNV_B64_1F \ { \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ } #define FNV_B64_20 \ { \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ } #define FNV_B64_21 \ { \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ } #define FNV_B64_22 \ { \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ } #define FNV_B64_23 \ { \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ } #define FNV_B64_24 \ { \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ } #define FNV_B64_25 \ { \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ } #define FNV_B64_26 \ { \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ } #define FNV_B64_27 \ { \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ } #define FNV_B64_28 \ { \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ } #define FNV_B64_29 \ { \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ } #define FNV_B64_2A \ { \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ } #define FNV_B64_2B \ { \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ } #define FNV_B64_2C \ { \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ } #define FNV_B64_2D \ { \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ } #define FNV_B64_2E \ { \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ } #define FNV_B64_2F \ { \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ } #define FNV_B64_30 \ { \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ } #define FNV_B64_31 \ { \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ } #define FNV_B64_32 \ { \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ } #define FNV_B64_33 \ { \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ } #define FNV_B64_34 \ { \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ } #define FNV_B64_35 \ { \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ } #define FNV_B64_36 \ { \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ } #define FNV_B64_37 \ { \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ } #define FNV_B64_38 \ { \ - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, \ - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, \ - 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, \ - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, \ - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, \ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, \ - 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, \ - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ } #define FNV_B64_39 \ { \ - 0x3b, 0x3a, 0x39, 0x38, 0x3f, 0x3e, 0x3d, 0x3c, \ - 0x33, 0x32, 0x31, 0x30, 0x37, 0x36, 0x35, 0x34, \ - 0x2b, 0x2a, 0x29, 0x28, 0x2f, 0x2e, 0x2d, 0x2c, \ - 0x23, 0x22, 0x21, 0x20, 0x27, 0x26, 0x25, 0x24, \ - 0x1b, 0x1a, 0x19, 0x18, 0x1f, 0x1e, 0x1d, 0x1c, \ - 0x13, 0x12, 0x11, 0x10, 0x17, 0x16, 0x15, 0x14, \ - 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c, \ - 0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ } #define FNV_B64_3A \ { \ - 0x0e, 0x0f, 0x0c, 0x0d, 0x0a, 0x0b, 0x08, 0x09, \ - 0x06, 0x07, 0x04, 0x05, 0x02, 0x03, 0x00, 0x01, \ - 0x1e, 0x1f, 0x1c, 0x1d, 0x1a, 0x1b, 0x18, 0x19, \ - 0x16, 0x17, 0x14, 0x15, 0x12, 0x13, 0x10, 0x11, \ - 0x2e, 0x2f, 0x2c, 0x2d, 0x2a, 0x2b, 0x28, 0x29, \ - 0x26, 0x27, 0x24, 0x25, 0x22, 0x23, 0x20, 0x21, \ - 0x3e, 0x3f, 0x3c, 0x3d, 0x3a, 0x3b, 0x38, 0x39, \ - 0x36, 0x37, 0x34, 0x35, 0x32, 0x33, 0x30, 0x31, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ } #define FNV_B64_3B \ { \ - 0x21, 0x20, 0x23, 0x22, 0x25, 0x24, 0x27, 0x26, \ - 0x29, 0x28, 0x2b, 0x2a, 0x2d, 0x2c, 0x2f, 0x2e, \ - 0x31, 0x30, 0x33, 0x32, 0x35, 0x34, 0x37, 0x36, \ - 0x39, 0x38, 0x3b, 0x3a, 0x3d, 0x3c, 0x3f, 0x3e, \ - 0x01, 0x00, 0x03, 0x02, 0x05, 0x04, 0x07, 0x06, \ - 0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e, \ - 0x11, 0x10, 0x13, 0x12, 0x15, 0x14, 0x17, 0x16, \ - 0x19, 0x18, 0x1b, 0x1a, 0x1d, 0x1c, 0x1f, 0x1e, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ } #define FNV_B64_3C \ { \ - 0x34, 0x35, 0x36, 0x37, 0x30, 0x31, 0x32, 0x33, \ - 0x3c, 0x3d, 0x3e, 0x3f, 0x38, 0x39, 0x3a, 0x3b, \ - 0x24, 0x25, 0x26, 0x27, 0x20, 0x21, 0x22, 0x23, \ - 0x2c, 0x2d, 0x2e, 0x2f, 0x28, 0x29, 0x2a, 0x2b, \ - 0x14, 0x15, 0x16, 0x17, 0x10, 0x11, 0x12, 0x13, \ - 0x1c, 0x1d, 0x1e, 0x1f, 0x18, 0x19, 0x1a, 0x1b, \ - 0x04, 0x05, 0x06, 0x07, 0x00, 0x01, 0x02, 0x03, \ - 0x0c, 0x0d, 0x0e, 0x0f, 0x08, 0x09, 0x0a, 0x0b, \ + 0x34, \ + 0x35, \ + 0x36, \ + 0x37, \ + 0x30, \ + 0x31, \ + 0x32, \ + 0x33, \ + 0x3c, \ + 0x3d, \ + 0x3e, \ + 0x3f, \ + 0x38, \ + 0x39, \ + 0x3a, \ + 0x3b, \ + 0x24, \ + 0x25, \ + 0x26, \ + 0x27, \ + 0x20, \ + 0x21, \ + 0x22, \ + 0x23, \ + 0x2c, \ + 0x2d, \ + 0x2e, \ + 0x2f, \ + 0x28, \ + 0x29, \ + 0x2a, \ + 0x2b, \ + 0x14, \ + 0x15, \ + 0x16, \ + 0x17, \ + 0x10, \ + 0x11, \ + 0x12, \ + 0x13, \ + 0x1c, \ + 0x1d, \ + 0x1e, \ + 0x1f, \ + 0x18, \ + 0x19, \ + 0x1a, \ + 0x1b, \ + 0x04, \ + 0x05, \ + 0x06, \ + 0x07, \ + 0x00, \ + 0x01, \ + 0x02, \ + 0x03, \ + 0x0c, \ + 0x0d, \ + 0x0e, \ + 0x0f, \ + 0x08, \ + 0x09, \ + 0x0a, \ + 0x0b, \ } #define FNV_B64_3D \ { \ - 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, \ - 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, \ - 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, \ - 0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, \ - 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0x20, \ - 0x2f, 0x2e, 0x2d, 0x2c, 0x2b, 0x2a, 0x29, 0x28, \ - 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x30, \ - 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, \ + 0x07, \ + 0x06, \ + 0x05, \ + 0x04, \ + 0x03, \ + 0x02, \ + 0x01, \ + 0x00, \ + 0x0f, \ + 0x0e, \ + 0x0d, \ + 0x0c, \ + 0x0b, \ + 0x0a, \ + 0x09, \ + 0x08, \ + 0x17, \ + 0x16, \ + 0x15, \ + 0x14, \ + 0x13, \ + 0x12, \ + 0x11, \ + 0x10, \ + 0x1f, \ + 0x1e, \ + 0x1d, \ + 0x1c, \ + 0x1b, \ + 0x1a, \ + 0x19, \ + 0x18, \ + 0x27, \ + 0x26, \ + 0x25, \ + 0x24, \ + 0x23, \ + 0x22, \ + 0x21, \ + 0x20, \ + 0x2f, \ + 0x2e, \ + 0x2d, \ + 0x2c, \ + 0x2b, \ + 0x2a, \ + 0x29, \ + 0x28, \ + 0x37, \ + 0x36, \ + 0x35, \ + 0x34, \ + 0x33, \ + 0x32, \ + 0x31, \ + 0x30, \ + 0x3f, \ + 0x3e, \ + 0x3d, \ + 0x3c, \ + 0x3b, \ + 0x3a, \ + 0x39, \ + 0x38, \ } #define FNV_B64_3E \ { \ - 0x1a, 0x1b, 0x18, 0x19, 0x1e, 0x1f, 0x1c, 0x1d, \ - 0x12, 0x13, 0x10, 0x11, 0x16, 0x17, 0x14, 0x15, \ - 0x0a, 0x0b, 0x08, 0x09, 0x0e, 0x0f, 0x0c, 0x0d, \ - 0x02, 0x03, 0x00, 0x01, 0x06, 0x07, 0x04, 0x05, \ - 0x3a, 0x3b, 0x38, 0x39, 0x3e, 0x3f, 0x3c, 0x3d, \ - 0x32, 0x33, 0x30, 0x31, 0x36, 0x37, 0x34, 0x35, \ - 0x2a, 0x2b, 0x28, 0x29, 0x2e, 0x2f, 0x2c, 0x2d, \ - 0x22, 0x23, 0x20, 0x21, 0x26, 0x27, 0x24, 0x25, \ + 0x1a, \ + 0x1b, \ + 0x18, \ + 0x19, \ + 0x1e, \ + 0x1f, \ + 0x1c, \ + 0x1d, \ + 0x12, \ + 0x13, \ + 0x10, \ + 0x11, \ + 0x16, \ + 0x17, \ + 0x14, \ + 0x15, \ + 0x0a, \ + 0x0b, \ + 0x08, \ + 0x09, \ + 0x0e, \ + 0x0f, \ + 0x0c, \ + 0x0d, \ + 0x02, \ + 0x03, \ + 0x00, \ + 0x01, \ + 0x06, \ + 0x07, \ + 0x04, \ + 0x05, \ + 0x3a, \ + 0x3b, \ + 0x38, \ + 0x39, \ + 0x3e, \ + 0x3f, \ + 0x3c, \ + 0x3d, \ + 0x32, \ + 0x33, \ + 0x30, \ + 0x31, \ + 0x36, \ + 0x37, \ + 0x34, \ + 0x35, \ + 0x2a, \ + 0x2b, \ + 0x28, \ + 0x29, \ + 0x2e, \ + 0x2f, \ + 0x2c, \ + 0x2d, \ + 0x22, \ + 0x23, \ + 0x20, \ + 0x21, \ + 0x26, \ + 0x27, \ + 0x24, \ + 0x25, \ } #define FNV_B64_3F \ { \ - 0x2d, 0x2c, 0x2f, 0x2e, 0x29, 0x28, 0x2b, 0x2a, \ - 0x25, 0x24, 0x27, 0x26, 0x21, 0x20, 0x23, 0x22, \ - 0x3d, 0x3c, 0x3f, 0x3e, 0x39, 0x38, 0x3b, 0x3a, \ - 0x35, 0x34, 0x37, 0x36, 0x31, 0x30, 0x33, 0x32, \ - 0x0d, 0x0c, 0x0f, 0x0e, 0x09, 0x08, 0x0b, 0x0a, \ - 0x05, 0x04, 0x07, 0x06, 0x01, 0x00, 0x03, 0x02, \ - 0x1d, 0x1c, 0x1f, 0x1e, 0x19, 0x18, 0x1b, 0x1a, \ - 0x15, 0x14, 0x17, 0x16, 0x11, 0x10, 0x13, 0x12, \ + 0x2d, \ + 0x2c, \ + 0x2f, \ + 0x2e, \ + 0x29, \ + 0x28, \ + 0x2b, \ + 0x2a, \ + 0x25, \ + 0x24, \ + 0x27, \ + 0x26, \ + 0x21, \ + 0x20, \ + 0x23, \ + 0x22, \ + 0x3d, \ + 0x3c, \ + 0x3f, \ + 0x3e, \ + 0x39, \ + 0x38, \ + 0x3b, \ + 0x3a, \ + 0x35, \ + 0x34, \ + 0x37, \ + 0x36, \ + 0x31, \ + 0x30, \ + 0x33, \ + 0x32, \ + 0x0d, \ + 0x0c, \ + 0x0f, \ + 0x0e, \ + 0x09, \ + 0x08, \ + 0x0b, \ + 0x0a, \ + 0x05, \ + 0x04, \ + 0x07, \ + 0x06, \ + 0x01, \ + 0x00, \ + 0x03, \ + 0x02, \ + 0x1d, \ + 0x1c, \ + 0x1f, \ + 0x1e, \ + 0x19, \ + 0x18, \ + 0x1b, \ + 0x1a, \ + 0x15, \ + 0x14, \ + 0x17, \ + 0x16, \ + 0x11, \ + 0x10, \ + 0x13, \ + 0x12, \ } #endif /* FNV_HASH_H */ diff --git a/librz/hash/p/algo_crca.c b/librz/hash/p/algo_crca.c index 14079ea249..e297375364 100644 --- a/librz/hash/p/algo_crca.c +++ b/librz/hash/p/algo_crca.c @@ -25,7 +25,7 @@ #define plugin_crca_preset_small_block(crcalgo, preset) \ static bool plugin_crca_##crcalgo##_small_block(const ut8 *data, ut64 size, ut8 **digest, RzHashSize *digest_size) { \ - rz_return_val_if_fail(data &&digest, false); \ + rz_return_val_if_fail(data && digest, false); \ RzCrc ctx; \ crc_init_preset(&ctx, preset); \ ut8 *dgst = malloc(plugin_crca_digest_size(&ctx)); \ diff --git a/librz/hash/p/algo_fletcher.c b/librz/hash/p/algo_fletcher.c index 6224d916b2..b7ee998a18 100644 --- a/librz/hash/p/algo_fletcher.c +++ b/librz/hash/p/algo_fletcher.c @@ -30,21 +30,21 @@ #define rz_fletcher_common_plugin_update(bits) \ static bool plugin_fletcher##bits##_update(void *context, const ut8 *data, ut64 size) { \ - rz_return_val_if_fail(context &&data, false); \ + rz_return_val_if_fail(context && data, false); \ rz_fletcher##bits##_update((RzFletcher##bits *)context, data, size); \ return true; \ } #define rz_fletcher_common_plugin_final(bits) \ static bool plugin_fletcher##bits##_final(void *context, ut8 *digest) { \ - rz_return_val_if_fail(context &&digest, false); \ + rz_return_val_if_fail(context && digest, false); \ rz_fletcher##bits##_final(digest, (RzFletcher##bits *)context); \ return true; \ } #define rz_fletcher_common_plugin_small_block(bits) \ static bool plugin_fletcher##bits##_small_block(const ut8 *data, ut64 size, ut8 **digest, RzHashSize *digest_size) { \ - rz_return_val_if_fail(data &&digest, false); \ + rz_return_val_if_fail(data && digest, false); \ ut8 *dgst = malloc(RZ_HASH_FLETCHER##bits##_DIGEST_SIZE); \ if (!dgst) { \ return false; \ diff --git a/librz/include/rz_bin.h b/librz/include/rz_bin.h index 6d6c0a718d..f9f3d1c4d4 100644 --- a/librz/include/rz_bin.h +++ b/librz/include/rz_bin.h @@ -165,7 +165,7 @@ typedef enum { } RzBinLanguage; #define RZ_BIN_LANGUAGE_MASK(x) ((x) & ~RZ_BIN_LANGUAGE_BLOCKS) -#define RZ_BIN_LANGUAGE_HAS_BLOCKS(x) ((x)&RZ_BIN_LANGUAGE_BLOCKS) +#define RZ_BIN_LANGUAGE_HAS_BLOCKS(x) ((x) & RZ_BIN_LANGUAGE_BLOCKS) enum { RZ_BIN_CLASS_PRIVATE, diff --git a/librz/include/rz_cons.h b/librz/include/rz_cons.h index 6d492efc6c..e6f1c01325 100644 --- a/librz/include/rz_cons.h +++ b/librz/include/rz_cons.h @@ -764,8 +764,8 @@ typedef struct rz_cons_t { #define Colors_PLAIN \ { \ Color_BLACK, Color_RED, Color_WHITE, \ - Color_GREEN, Color_MAGENTA, Color_YELLOW, \ - Color_CYAN, Color_BLUE, Color_GRAY \ + Color_GREEN, Color_MAGENTA, Color_YELLOW, \ + Color_CYAN, Color_BLUE, Color_GRAY \ } enum { diff --git a/librz/include/rz_magic.h b/librz/include/rz_magic.h index 0c0c4da0c6..3a00715ed9 100644 --- a/librz/include/rz_magic.h +++ b/librz/include/rz_magic.h @@ -71,9 +71,8 @@ struct rz_magic { #define INDIROFFADD 0x04 /* if '>&(' appears */ #define UNSIGNED 0x08 /* comparison is unsigned */ #define NOSPACE 0x10 /* suppress space character before output */ -#define BINTEST 0x20 /* test is for a binary type (set only \ - for top-level tests) */ -#define TEXTTEST 0 /* for passing to file_softmagic */ +#define BINTEST 0x20 /* test is for a binary type (set only for top-level tests) */ +#define TEXTTEST 0 /* for passing to file_softmagic */ ut8 dummy1; diff --git a/librz/include/rz_types.h b/librz/include/rz_types.h index 0f2392bf1e..5e5d55a791 100644 --- a/librz/include/rz_types.h +++ b/librz/include/rz_types.h @@ -219,7 +219,7 @@ extern "C" { typedef int (*PrintfCallback)(const char *str, ...) RZ_PRINTF_CHECK(1, 2); /* compile-time introspection helpers */ -#define CTO(y, z) ((size_t) & ((y *)0)->z) +#define CTO(y, z) ((size_t)&((y *)0)->z) #define CTA(x, y, z) (x + CTO(y, z)) #define CTI(x, y, z) (*((size_t *)(CTA(x, y, z)))) #define CTS(x, y, z, t, v) \ @@ -664,7 +664,7 @@ static inline void rz_run_call10(void *fcn, void *arg1, void *arg2, void *arg3, #ifndef container_of #ifdef _MSC_VER -#define container_of(ptr, type, member) ((type *)((char *)(ptr)-offsetof(type, member))) +#define container_of(ptr, type, member) ((type *)((char *)(ptr) - offsetof(type, member))) #else #define container_of(ptr, type, member) ((type *)((char *)(__typeof__(((type *)0)->member) *){ ptr } - offsetof(type, member))) #endif diff --git a/librz/include/rz_types_base.h b/librz/include/rz_types_base.h index 5afb67fe2e..451091236d 100644 --- a/librz/include/rz_types_base.h +++ b/librz/include/rz_types_base.h @@ -125,7 +125,7 @@ typedef struct _utX { #define UT32_ALIGN(x) (x + (x - (x % sizeof(ut32)))) #define UT16_ALIGN(x) (x + (x - (x % sizeof(ut16)))) -#define UT32_LO(x) ((ut32)((x)&UT32_MAX)) +#define UT32_LO(x) ((ut32)((x) & UT32_MAX)) #define UT32_HI(x) ((ut32)(((ut64)(x)) >> 32) & UT32_MAX) #define RZ_BETWEEN(x, y, z) (((y) >= (x)) && ((y) <= (z))) @@ -148,7 +148,7 @@ typedef struct _utX { /* copied from bithacks.h */ #define B_IS_SET(x, n) (((x) & (1ULL << (n))) ? 1 : 0) #define B_SET(x, n) ((x) |= (1ULL << (n))) -#define B_EVEN(x) (((x)&1) == 0) +#define B_EVEN(x) (((x) & 1) == 0) #define B_ODD(x) (!B_EVEN((x))) #define B_UNSET(x, n) ((x) &= ~(1ULL << (n))) #define B_TOGGLE(x, n) ((x) ^= (1ULL << (n))) diff --git a/librz/include/rz_util/ht_inc.h b/librz/include/rz_util/ht_inc.h index e5172112c8..4cdff7bbb2 100644 --- a/librz/include/rz_util/ht_inc.h +++ b/librz/include/rz_util/ht_inc.h @@ -113,8 +113,7 @@ typedef struct Ht_(kv) { VALUE_TYPE value; ut32 key_len; ut32 value_len; -} -HT_(Kv); +} HT_(Kv); typedef void (*HT_(FiniKv))(HT_(Kv) *kv, void *user); typedef KEY_TYPE (*HT_(DupKey))(const KEY_TYPE); @@ -129,8 +128,7 @@ typedef bool (*HT_(ForeachCallback))(void *user, const KEY_TYPE, const VALUE_TYP typedef struct Ht_(bucket_t) { HT_(Kv) *arr; ut32 count; -} -HT_(Bucket); +} HT_(Bucket); /** * Options contain all the settings of the hashtable. @@ -155,8 +153,7 @@ typedef struct Ht_(options_t) { void *finiKV_user; ///< RZ_NULLABLE. User data which is passed into finiKV. size_t elem_size; ///< Size of each HtKv element (useful for subclassing like SdbKv). ///< Zero value means to use default size of HtKv. -} -HT_(Options); +} HT_(Options); /* Ht is the hashtable structure */ typedef struct Ht_(t) { @@ -165,24 +162,21 @@ typedef struct Ht_(t) { HT_(Bucket) *table; ///< Actual table. ut32 prime_idx; HT_(Options) opt; -} -HtName_(Ht); +} HtName_(Ht); typedef struct Ht_(iter_mut_t) { HtName_(Ht) *ht; ///< The hash table to iterate over. ut32 ti; ///< Table index ut32 bi; ///< Bucket index HT_(Kv) *kv; ///< Current Key-Value-pair. -} -HT_(IterMutState); +} HT_(IterMutState); typedef struct Ht_(iter_t) { const HtName_(Ht) *ht; ///< The hash table to iterate over. ut32 ti; ///< Table index ut32 bi; ///< Bucket index const HT_(Kv) *kv; ///< Current Key-Value-pair. -} -HT_(IterState); +} HT_(IterState); // Create a new Ht with the provided Options RZ_API RZ_OWN HtName_(Ht) *Ht_(new_opt)(RZ_NONNULL HT_(Options) *opt); diff --git a/librz/include/rz_util/rz_buf.h b/librz/include/rz_util/rz_buf.h index 60fca808eb..e232e57063 100644 --- a/librz/include/rz_util/rz_buf.h +++ b/librz/include/rz_util/rz_buf.h @@ -188,7 +188,7 @@ static inline st64 rz_buf_sleb128_at(RzBuffer *b, ut64 addr, st64 *v) { #define DEFINE_RZ_BUF_READ_BLE(size) \ static inline bool rz_buf_read_ble##size(RZ_NONNULL RzBuffer *b, RZ_NONNULL RZ_OUT ut##size *result, bool big_endian) { \ - rz_return_val_if_fail(b &&result, false); \ + rz_return_val_if_fail(b && result, false); \ \ ut8 tmp[sizeof(ut##size)]; \ if (rz_buf_read(b, tmp, sizeof(tmp)) != sizeof(tmp)) { \ @@ -200,7 +200,7 @@ static inline st64 rz_buf_sleb128_at(RzBuffer *b, ut64 addr, st64 *v) { } \ \ static inline bool rz_buf_read_ble##size##_at(RZ_NONNULL RzBuffer *b, ut64 addr, RZ_NONNULL RZ_OUT ut##size *result, bool big_endian) { \ - rz_return_val_if_fail(b &&result, false); \ + rz_return_val_if_fail(b && result, false); \ \ ut8 tmp[sizeof(ut##size)]; \ if (rz_buf_read_at(b, addr, tmp, sizeof(tmp)) != sizeof(tmp)) { \ @@ -254,7 +254,7 @@ DEFINE_RZ_BUF_WRITE_BLE(128) #define DEFINE_RZ_BUF_READ_OFFSET_BLE(size) \ static inline bool rz_buf_read_ble##size##_offset(RZ_NONNULL RzBuffer *b, RZ_NONNULL RZ_INOUT ut64 *offset, RZ_NONNULL RZ_OUT ut##size *result, bool big_endian) { \ - rz_return_val_if_fail(b &&offset &&result, false); \ + rz_return_val_if_fail(b && offset && result, false); \ if (!rz_buf_read_ble##size##_at(b, *offset, result, big_endian)) { \ return false; \ } \ @@ -273,7 +273,7 @@ static inline bool rz_buf_read_offset(RZ_NONNULL RzBuffer *b, RZ_NONNULL RZ_INOU #define DEFINE_RZ_BUF_WRITE_OFFSET_BLE(size) \ static inline bool rz_buf_write_ble##size##_offset(RZ_NONNULL RzBuffer *b, RZ_NONNULL RZ_INOUT ut64 *offset, ut##size value, bool big_endian) { \ - rz_return_val_if_fail(b &&offset, false); \ + rz_return_val_if_fail(b && offset, false); \ if (!rz_buf_write_ble##size##_at(b, *offset, value, big_endian)) { \ return false; \ } \ diff --git a/librz/include/rz_util/rz_sys.h b/librz/include/rz_util/rz_sys.h index e4b92af8ca..5b7a5a32fb 100644 --- a/librz/include/rz_util/rz_sys.h +++ b/librz/include/rz_util/rz_sys.h @@ -154,7 +154,9 @@ RZ_API void rz_sys_backtrace(void); #ifndef rz_sys_breakpoint #if __WINDOWS__ #define rz_sys_breakpoint() \ - { __debugbreak(); } + { \ + __debugbreak(); \ + } #else #if __GNUC__ #define rz_sys_breakpoint() __builtin_trap() diff --git a/librz/io/p/io_self.c b/librz/io/p/io_self.c index d9d09cfd1d..8ff05e6838 100644 --- a/librz/io/p/io_self.c +++ b/librz/io/p/io_self.c @@ -389,14 +389,14 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { rz_sys_dlclose(lib); } if (argc == 1) { - size_t (*cb)() = (size_t(*)())cbptr; + size_t (*cb)() = (size_t (*)())cbptr; if (cb) { result = cb(); } else { eprintf("No callback defined\n"); } } else if (argc == 2) { - size_t (*cb)(size_t a0) = (size_t(*)(size_t))cbptr; + size_t (*cb)(size_t a0) = (size_t (*)(size_t))cbptr; if (cb) { ut64 a0 = rz_num_math(NULL, rz_str_word_get0(argv, 1)); result = cb(a0); @@ -404,7 +404,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { eprintf("No callback defined\n"); } } else if (argc == 3) { - size_t (*cb)(size_t a0, size_t a1) = (size_t(*)(size_t, size_t))cbptr; + size_t (*cb)(size_t a0, size_t a1) = (size_t (*)(size_t, size_t))cbptr; ut64 a0 = rz_num_math(NULL, rz_str_word_get0(argv, 1)); ut64 a1 = rz_num_math(NULL, rz_str_word_get0(argv, 2)); if (cb) { @@ -414,7 +414,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } } else if (argc == 4) { size_t (*cb)(size_t a0, size_t a1, size_t a2) = - (size_t(*)(size_t, size_t, size_t))cbptr; + (size_t (*)(size_t, size_t, size_t))cbptr; ut64 a0 = rz_num_math(NULL, rz_str_word_get0(argv, 1)); ut64 a1 = rz_num_math(NULL, rz_str_word_get0(argv, 2)); ut64 a2 = rz_num_math(NULL, rz_str_word_get0(argv, 3)); @@ -425,7 +425,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } } else if (argc == 5) { size_t (*cb)(size_t a0, size_t a1, size_t a2, size_t a3) = - (size_t(*)(size_t, size_t, size_t, size_t))cbptr; + (size_t (*)(size_t, size_t, size_t, size_t))cbptr; ut64 a0 = rz_num_math(NULL, rz_str_word_get0(argv, 1)); ut64 a1 = rz_num_math(NULL, rz_str_word_get0(argv, 2)); ut64 a2 = rz_num_math(NULL, rz_str_word_get0(argv, 3)); @@ -437,7 +437,7 @@ static char *__system(RzIO *io, RzIODesc *fd, const char *cmd) { } } else if (argc == 6) { size_t (*cb)(size_t a0, size_t a1, size_t a2, size_t a3, size_t a4) = - (size_t(*)(size_t, size_t, size_t, size_t, size_t))cbptr; + (size_t (*)(size_t, size_t, size_t, size_t, size_t))cbptr; ut64 a0 = rz_num_math(NULL, rz_str_word_get0(argv, 1)); ut64 a1 = rz_num_math(NULL, rz_str_word_get0(argv, 2)); ut64 a2 = rz_num_math(NULL, rz_str_word_get0(argv, 3)); diff --git a/librz/magic/magic.c b/librz/magic/magic.c index a3ab8a8f9b..61e3a1fb03 100644 --- a/librz/magic/magic.c +++ b/librz/magic/magic.c @@ -11,10 +11,10 @@ RZ_LIB_VERSION(rz_magic); #ifdef _MSC_VER #include #include -#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) -#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #define S_IFIFO (-1) -#define S_ISFIFO(m) (((m)&S_IFIFO) == S_IFIFO) +#define S_ISFIFO(m) (((m) & S_IFIFO) == S_IFIFO) #define MAXPATHLEN 255 #endif diff --git a/librz/util/bitvector.c b/librz/util/bitvector.c index 070d0a7120..66ba9493f9 100644 --- a/librz/util/bitvector.c +++ b/librz/util/bitvector.c @@ -5,12 +5,12 @@ #include #include -#define NELEM(N, ELEMPER) ((N + (ELEMPER)-1) / (ELEMPER)) +#define NELEM(N, ELEMPER) ((N + (ELEMPER) - 1) / (ELEMPER)) #define BV_ELEM_SIZE 8U // optimization for reversing 8 bits which uses 32 bits // https://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits -#define reverse_byte(x) ((((x)*0x0802LU & 0x22110LU) | ((x)*0x8020LU & 0x88440LU)) * 0x10101LU >> 16) +#define reverse_byte(x) ((((x) * 0x0802LU & 0x22110LU) | ((x) * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16) // https://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious // With changes. diff --git a/librz/util/mem.c b/librz/util/mem.c index 58d2f49108..df3aa90ef2 100644 --- a/librz/util/mem.c +++ b/librz/util/mem.c @@ -327,7 +327,7 @@ RZ_API void rz_mem_memzero(void *dst, size_t l) { #else memset(dst, 0, l); __asm__ volatile("" ::"r"(dst) - : "memory"); + : "memory"); #endif #endif } diff --git a/librz/util/print.c b/librz/util/print.c index 7998460685..a4da197940 100644 --- a/librz/util/print.c +++ b/librz/util/print.c @@ -294,14 +294,11 @@ static bool isAllZeros(const ut8 *buf, int len) { RZ_API void rz_print_hexii(RzPrint *rp, ut64 addr, const ut8 *buf, int len, int step) { PrintfCallback p = (PrintfCallback)rp->cb_printf; bool c = rp->flags & RZ_PRINT_FLAGS_COLOR; - const char *color_0xff = c ? (Pal(rp, b0xff) - : Color_RED) + const char *color_0xff = c ? (Pal(rp, b0xff) : Color_RED) : ""; - const char *color_text = c ? (Pal(rp, btext) - : Color_MAGENTA) + const char *color_text = c ? (Pal(rp, btext) : Color_MAGENTA) : ""; - const char *color_other = c ? (Pal(rp, other) - : Color_WHITE) + const char *color_other = c ? (Pal(rp, other) : Color_WHITE) : ""; const char *color_reset = c ? Color_RESET : ""; int i, j; diff --git a/librz/util/sdb/src/cdb_make.c b/librz/util/sdb/src/cdb_make.c index 8f39bfe91a..f7486a860c 100644 --- a/librz/util/sdb/src/cdb_make.c +++ b/librz/util/sdb/src/cdb_make.c @@ -69,7 +69,7 @@ static int pack_kvlen(ut8 *buf, ut32 klen, ut32 vlen) { return 0; } buf[0] = (ut8)klen; - buf[1] = (ut8)((vlen)&0xff); + buf[1] = (ut8)((vlen) & 0xff); buf[2] = (ut8)((vlen >> 8) & 0xff); buf[3] = (ut8)((vlen >> 16) & 0xff); return 1; diff --git a/librz/util/sdb/src/text.c b/librz/util/sdb/src/text.c index 9ee2fe194e..b384d3c1fb 100644 --- a/librz/util/sdb/src/text.c +++ b/librz/util/sdb/src/text.c @@ -107,10 +107,10 @@ static void write_path(int fd, RzList /**/ *path) { write_(fd, "/", 1); } ESCAPE_LOOP(fd, path_token, - ESCAPE('\\', "\\", 1); - ESCAPE('/', "/", 1); - ESCAPE('\n', "n", 1); - ESCAPE('\r', "r", 1);); + ESCAPE('\\', "\\", 1); + ESCAPE('/', "/", 1); + ESCAPE('\n', "n", 1); + ESCAPE('\r', "r", 1);); } } @@ -120,17 +120,17 @@ static void write_key(int fd, const char *k) { write_(fd, "\\", 1); } ESCAPE_LOOP(fd, k, - ESCAPE('\\', "\\", 1); - ESCAPE('=', "=", 1); - ESCAPE('\n', "n", 1); - ESCAPE('\r', "r", 1);); + ESCAPE('\\', "\\", 1); + ESCAPE('=', "=", 1); + ESCAPE('\n', "n", 1); + ESCAPE('\r', "r", 1);); } static void write_value(int fd, const char *v) { ESCAPE_LOOP(fd, v, - ESCAPE('\\', "\\", 1); - ESCAPE('\n', "n", 1); - ESCAPE('\r', "r", 1);); + ESCAPE('\\', "\\", 1); + ESCAPE('\n', "n", 1); + ESCAPE('\r', "r", 1);); } #undef FLUSH #undef ESCAPE_LOOP diff --git a/librz/util/sys.c b/librz/util/sys.c index c5ee77a82b..9769176a5d 100644 --- a/librz/util/sys.c +++ b/librz/util/sys.c @@ -129,8 +129,8 @@ RZ_LIB_VERSION(rz_util); #else #define RZ_SYS_ASM_START_ROP() \ __asm__ __volatile__("leaq %0, %%rsp; ret" \ - : \ - : "m"(*bufptr)); + : \ + : "m"(*bufptr)); #endif #elif __i386__ #ifdef _MSC_VER @@ -142,8 +142,8 @@ RZ_LIB_VERSION(rz_util); #else #define RZ_SYS_ASM_START_ROP() \ __asm__ __volatile__("leal %0, %%esp; ret" \ - : \ - : "m"(*bufptr)); + : \ + : "m"(*bufptr)); #endif #else #define RZ_SYS_ASM_START_ROP() \ diff --git a/librz/util/unum.c b/librz/util/unum.c index ee86479263..6c1ddbe4e8 100644 --- a/librz/util/unum.c +++ b/librz/util/unum.c @@ -637,7 +637,7 @@ RZ_API ut64 rz_num_get_input_value(RzNum *num, const char *input_value) { return value; } -#define NIBBLE_TO_HEX(n) (((n)&0xf) > 9 ? 'a' + ((n)&0xf) - 10 : '0' + ((n)&0xf)) +#define NIBBLE_TO_HEX(n) (((n) & 0xf) > 9 ? 'a' + ((n) & 0xf) - 10 : '0' + ((n) & 0xf)) static int escape_char(char *dst, char byte) { const char escape_map[] = "abtnvfr"; if (byte >= 7 && byte <= 13) { diff --git a/subprojects/rzqnx/include/core.h b/subprojects/rzqnx/include/core.h index fcaf19d748..9841f97937 100644 --- a/subprojects/rzqnx/include/core.h +++ b/subprojects/rzqnx/include/core.h @@ -20,7 +20,7 @@ #include "arch.h" #ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) & ((TYPE *)0)->MEMBER) +#define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) #endif enum Breakpoint { diff --git a/subprojects/rzwinkd/transport.h b/subprojects/rzwinkd/transport.h index e196172524..c1ae6733d7 100644 --- a/subprojects/rzwinkd/transport.h +++ b/subprojects/rzwinkd/transport.h @@ -10,7 +10,9 @@ #ifndef HAVE_EPRINTF #include #define eprintf(...) \ - { fprintf(stderr, ##__VA_ARGS__); } + { \ + fprintf(stderr, ##__VA_ARGS__); \ + } #define HAVE_EPRINTF 1 #endif diff --git a/test/unit/test_bitvector.c b/test/unit/test_bitvector.c index 57b916fd04..fd6cdc51b6 100644 --- a/test/unit/test_bitvector.c +++ b/test/unit/test_bitvector.c @@ -179,7 +179,7 @@ bool test_rz_bv_init_signed(void) { bool test_rz_bv_logic(void) { RzBitVector *x, *y; RzBitVector *result; - RzBitVector *and, * or, *xor, *neg, *not, *ls, *rs, *ls_fill, *rs_fill; + RzBitVector *and, *or, *xor, *neg, *not, *ls, *rs, *ls_fill, *rs_fill; // x : 0101 0101 x = rz_bv_new(8); @@ -196,11 +196,11 @@ bool test_rz_bv_logic(void) { rz_bv_set(y, 7, true); // and : 0000 0001 - and = rz_bv_new(8); + and= rz_bv_new(8); rz_bv_set(and, 0, true); // xor : 1111 1100 - xor = rz_bv_new(8); + xor= rz_bv_new(8); rz_bv_toggle_all(xor); rz_bv_set(xor, 0, false); rz_bv_set(xor, 1, false); @@ -211,7 +211,7 @@ bool test_rz_bv_logic(void) { rz_bv_set(or, 1, false); // not of x : 1010 1010 - not = rz_bv_new(8); + not= rz_bv_new(8); rz_bv_set(not, 1, true); rz_bv_set(not, 3, true); rz_bv_set(not, 5, true); @@ -267,9 +267,9 @@ bool test_rz_bv_logic(void) { rz_bv_free(xor); result = rz_bv_not(x); - mu_assert("not x", is_equal_bv(result, not )); + mu_assert("not x", is_equal_bv(result, not)); rz_bv_free(result); - rz_bv_free(not ); + rz_bv_free(not); result = rz_bv_neg(x); mu_assert("neg x", is_equal_bv(result, neg)); diff --git a/test/unit/test_debug.c b/test/unit/test_debug.c index ba84bd8bc8..92c4fd8778 100644 --- a/test/unit/test_debug.c +++ b/test/unit/test_debug.c @@ -7,7 +7,7 @@ #include #ifndef offsetof -#define offsetof(type, field) ((size_t) & ((type *)0)->field) +#define offsetof(type, field) ((size_t)&((type *)0)->field) #endif #endif //__linux__