Rizin
unix-like reverse engineering framework and cli tools
libps_internal.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2017 deroad <wargio@libero.it>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #ifndef LIBPS_INTERNAL_H
5 #define LIBPS_INTERNAL_H
6 #include <rz_types.h>
7 
8 #define TYPE_NONE 0
9 #define TYPE_REG 1
10 #define TYPE_IMM 2
11 #define TYPE_MEM 3
12 #define TYPE_CR 4
13 
14 #define OP(x) ((((ut32)(x)) & 0x3f) << 26)
15 #define OP_MASK OP(0x3f)
16 
17 #define OPS(op, xop) (OP(op) | ((((ut32)(xop)) & 0x1f) << 1))
18 #define OPSC(op, xop, rc) (OPS((op), (xop)) | ((rc)&1))
19 #define OPS_MASK OPSC(0x3f, 0x1f, 1)
20 #define OPS_MASK_DOT OPSC(0x3f, 0x1f, 1)
21 
22 #define OPM(op, xop) (OP(op) | ((((ut32)(xop)) & 0x3f) << 1))
23 #define OPMC(op, xop, rc) (OPM((op), (xop)) | ((rc)&1))
24 #define OPM_MASK OPMC(0x3f, 0x3f, 0)
25 
26 #define OPL(op, xop) (OP(op) | ((((ut32)(xop)) & 0x3ff) << 1))
27 #define OPLC(op, xop, rc) (OPL((op), (xop)) | ((rc)&1))
28 #define OPL_MASK OPLC(0x3f, 0x3ff, 1)
29 #define OPL_MASK_DOT OPLC(0x3f, 0x3ff, 1)
30 
31 typedef enum {
48 
49 typedef enum {
58 
89 
116 
117 typedef struct {
119  const char *name;
120  unsigned int opcode;
121  unsigned int mask;
122  unsigned char operands[6];
123  const char *description;
124 } ps_opcode_t;
125 
126 typedef struct {
127  int bits;
128  int shift;
129 } ps_operand_t;
130 
131 #endif /* LIBPS_INTERNAL_H */
ps_insn_type_t
@ ps_nmsub
@ ps_nmadd_dot
@ ps_sum1_dot
@ ps_rsqrte
@ ps_madds1
@ ps_sum1
@ ps_nmsub_dot
@ ps_madd
@ ps_rsqrte_dot
@ ps_res_dot
@ ps_mul
@ ps_div
@ ps_madds1_dot
@ ps_merge10_dot
@ ps_merge11
@ psq_st
@ psq_stx
@ ps_nabs_dot
@ ps_neg_dot
@ ps_mr
@ psq_lu
@ ps_madds0_dot
@ ps_abs
@ ps_merge01_dot
@ ps_add
@ ps_cmpo0
@ ps_neg
@ ps_muls0
@ ps_div_dot
@ ps_sub
@ ps_dcbz_l
@ psq_stux
@ ps_res
@ ps_cmpu1
@ ps_merge00
@ ps_sum0_dot
@ ps_muls1_dot
@ ps_nmadd
@ ps_sel_dot
@ ps_merge10
@ ps_merge11_dot
@ ps_madd_dot
@ ps_add_dot
@ ps_abs_dot
@ ps_sel
@ ps_muls0_dot
@ psq_lx
@ psq_lux
@ ps_madds0
@ psq_stu
@ ps_msub
@ ps_merge00_dot
@ ps_sum0
@ ps_msub_dot
@ ps_sub_dot
@ ps_muls1
@ ps_cmpo1
@ ps_mul_dot
@ ps_cmpu0
@ ps_mr_dot
@ ps_merge01
@ psq_l
@ ps_nabs
ps_operand_id_t
@ OP_DRB
@ OP_FC
@ NO_OPERAND
@ OP_RB
@ OP_WB
@ OP_RA
@ OP_IB
@ OP_FD
@ OP_FB
@ OP_FA
@ OP_DRA
@ OP_WC
@ OP_IC
@ OP_crfD
@ OP_FS
unsigned int mask
const char * name
const char * description
unsigned int opcode
ps_insn_type_t insn