Rizin
unix-like reverse engineering framework and cli tools
decode.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2013-2021 th0rpe <josediazfer@yahoo.es>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef DECODE_H
5 #define DECODE_H
6 
7 #include <rz_types.h>
8 
9 char *decode(ut32 ins_pos, ut32 *next_ins_pos);
10 
11 #ifndef USE_DECODE
12 
13 static bool is_linear_circular(ut32 ins_bits);
14 static bool is_hash(st32 hash_code);
15 static bool check_arg(ut32 ins_bits, int *err_code);
16 
17 static ut32 get_ins_bits(ut32 hash_code, ut32 ins_pos, char *ins, ut32 ins_len, ut32 magic_value, int *err_code);
18 static ut32 get_q_bits(ut32 val, char *ins, ut32 ins_len, int *err_code);
19 
20 static char *do_decode(ut32 ins_off, ut32 ins_pos, ut32 two_ins, ut32 *next_ins_pos, st32 *ins_hash_code, int *err_code);
21 static char *decode_ins(st32 hash_code, ut32 ins_pos, ut32 ins_off, ut32 *ins_len_dec, ut32 *reg_len_dec, ut32 *ret_ins_bits, ut32 magic_value, ut8 two_ins, int *err_code);
22 
23 static char *decode_regis(char *reg_arg, st32 hash_code, ut32 ins_bits, ut32 *ret_ins_bits, int *err_code);
24 
25 static char *get_token_decoded(st32 hash_code, char *ins_token, ut32 ins_token_len, char *reg_arg, ut32 *ret_ins_bits, ut32 *ret_reg_len, ut32 magic_value, ut32 ins_pos, ut32 ins_len, ut8 two_ins, int *err_code);
26 
27 #endif
28 
29 #endif
ut16 val
Definition: armass64_const.h:6
static bool is_hash(st32 hash_code)
static char * decode_ins(st32 hash_code, ut32 ins_pos, ut32 ins_off, ut32 *ins_len_dec, ut32 *reg_len_dec, ut32 *ret_ins_bits, ut32 magic_value, ut8 two_ins, int *err_code)
static char * do_decode(ut32 ins_off, ut32 ins_pos, ut32 two_ins, ut32 *next_ins_pos, st32 *ins_hash_code, int *err_code)
static bool check_arg(ut32 ins_bits, int *err_code)
static ut32 get_ins_bits(ut32 hash_code, ut32 ins_pos, char *ins, ut32 ins_len, ut32 magic_value, int *err_code)
char * decode(ut32 ins_pos, ut32 *next_ins_pos)
static bool is_linear_circular(ut32 ins_bits)
static char * decode_regis(char *reg_arg, st32 hash_code, ut32 ins_bits, ut32 *ret_ins_bits, int *err_code)
static ut32 get_q_bits(ut32 val, char *ins, ut32 ins_len, int *err_code)
static char * get_token_decoded(st32 hash_code, char *ins_token, ut32 ins_token_len, char *reg_arg, ut32 *ret_ins_bits, ut32 *ret_reg_len, ut32 magic_value, ut32 ins_pos, ut32 ins_len, ut8 two_ins, int *err_code)
uint32_t ut32
uint8_t ut8
Definition: lh5801.h:11
#define st32
Definition: rz_types_base.h:12