Rizin
unix-like reverse engineering framework and cli tools
analysis_tricore.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2020 curly <bhattrishi8@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <string.h>
5 #include <rz_types.h>
6 #include <rz_lib.h>
7 #include <rz_asm.h>
8 #include <rz_analysis.h>
9 //#include "../../asm/arch/tricore/gnu/tricore-opc.c"
10 
11 static char *get_reg_profile(RzAnalysis *analysis) {
12  const char *p =
13  "=PC pc\n"
14  "=SP a10\n"
15  "=A0 a0\n"
16  "gpr p0 .64 0 0\n"
17  "gpr a0 .32 0 0\n"
18  "gpr a1 .32 4 0\n"
19  "gpr p2 .64 8 0\n"
20  "gpr a2 .32 8 0\n"
21  "gpr a3 .32 12 0\n"
22  "gpr p4 .64 16 0\n"
23  "gpr a4 .32 16 0\n"
24  "gpr a5 .32 20 0\n"
25  "gpr p6 .64 24 0\n"
26  "gpr a6 .32 24 0\n"
27  "gpr a7 .32 28 0\n"
28  "gpr p8 .64 32 0\n"
29  "gpr a8 .32 32 0\n"
30  "gpr a9 .32 36 0\n"
31  "gpr p10 .64 40 0\n"
32  "gpr a10 .32 40 0\n"
33  "gpr a11 .32 44 0\n"
34  "gpr p12 .64 48 0\n"
35  "gpr a12 .32 48 0\n"
36  "gpr a13 .32 52 0\n"
37  "gpr p14 .64 56 0\n"
38  "gpr a14 .32 56 0\n"
39  "gpr a15 .32 60 0\n"
40  "gpr e0 .64 64 0\n"
41  "gpr d0 .32 64 0\n"
42  "gpr d1 .32 68 0\n"
43  "gpr e2 .64 72 0\n"
44  "gpr d2 .32 72 0\n"
45  "gpr d3 .32 76 0\n"
46  "gpr e4 .64 80 0\n"
47  "gpr d4 .32 80 0\n"
48  "gpr d5 .32 84 0\n"
49  "gpr e6 .64 88 0\n"
50  "gpr d6 .32 88 0\n"
51  "gpr d7 .32 92 0\n"
52  "gpr e8 .64 96 0\n"
53  "gpr d8 .32 96 0\n"
54  "gpr d9 .32 100 0\n"
55  "gpr e10 .64 104 0\n"
56  "gpr d10 .32 104 0\n"
57  "gpr d11 .32 108 0\n"
58  "gpr e12 .64 112 0\n"
59  "gpr d12 .32 112 0\n"
60  "gpr d13 .32 114 0\n"
61  "gpr e14 .64 118 0\n"
62  "gpr d14 .32 118 0\n"
63  "gpr d15 .32 120 0\n"
64  "gpr PSW .32 124 0\n"
65  "gpr PCXI .32 128 0\n"
66  "gpr FCX .32 132 0\n"
67  "gpr LCX .32 136 0\n"
68  "gpr ISP .32 140 0\n"
69  "gpr ICR .32 144 0\n"
70  "gpr PIPN .32 148 0\n"
71  "gpr BIV .32 152 0\n"
72  "gpr BTV .32 156 0\n"
73  "gpr pc .32 160 0\n";
74  return strdup(p);
75 }
76 
78  .name = "tricore",
79  .desc = "TRICORE analysis plugin",
80  .license = "LGPL3",
81  .arch = "tricore",
82  .bits = 32,
83  .get_reg_profile = get_reg_profile,
84 };
85 
86 #ifndef RZ_PLUGIN_INCORE
91 };
92 #endif
static char * get_reg_profile(RzAnalysis *analysis)
RzAnalysisPlugin rz_analysis_plugin_tricore
RZ_API RzLibStruct rizin_plugin
#define RZ_API
void * p
Definition: libc.cpp:67
return strdup("=SP r13\n" "=LR r14\n" "=PC r15\n" "=A0 r0\n" "=A1 r1\n" "=A2 r2\n" "=A3 r3\n" "=ZF zf\n" "=SF nf\n" "=OF vf\n" "=CF cf\n" "=SN or0\n" "gpr lr .32 56 0\n" "gpr pc .32 60 0\n" "gpr cpsr .32 64 0 ____tfiae_________________qvczn\n" "gpr or0 .32 68 0\n" "gpr tf .1 64.5 0 thumb\n" "gpr ef .1 64.9 0 endian\n" "gpr jf .1 64.24 0 java\n" "gpr qf .1 64.27 0 sticky_overflow\n" "gpr vf .1 64.28 0 overflow\n" "gpr cf .1 64.29 0 carry\n" "gpr zf .1 64.30 0 zero\n" "gpr nf .1 64.31 0 negative\n" "gpr itc .4 64.10 0 if_then_count\n" "gpr gef .4 64.16 0 great_or_equal\n" "gpr r0 .32 0 0\n" "gpr r1 .32 4 0\n" "gpr r2 .32 8 0\n" "gpr r3 .32 12 0\n" "gpr r4 .32 16 0\n" "gpr r5 .32 20 0\n" "gpr r6 .32 24 0\n" "gpr r7 .32 28 0\n" "gpr r8 .32 32 0\n" "gpr r9 .32 36 0\n" "gpr r10 .32 40 0\n" "gpr r11 .32 44 0\n" "gpr r12 .32 48 0\n" "gpr r13 .32 52 0\n" "gpr r14 .32 56 0\n" "gpr r15 .32 60 0\n" "gpr r16 .32 64 0\n" "gpr r17 .32 68 0\n")
@ RZ_LIB_TYPE_ANALYSIS
Definition: rz_lib.h:73
#define RZ_VERSION
Definition: rz_version.h:8
const char * version
Definition: rz_analysis.h:1239