summaryrefslogtreecommitdiff
path: root/src/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-10-28 20:20:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-10-28 20:20:41 (GMT)
commit2c70e3332b43bdcbe215081b697395d254418e48 (patch)
treed3287462eccd65d189f82de8428692bbaf477cbc /src/analysis
parent0f0cb560006c0ef5eb690f89c4ce720936c9d6f6 (diff)
Cleaned the structure for instructions a little bit.
Diffstat (limited to 'src/analysis')
-rw-r--r--src/analysis/blocks/flow.c4
-rw-r--r--src/analysis/decomp/il.c6
-rw-r--r--src/analysis/disass/dragon.c4
-rw-r--r--src/analysis/disass/links.c2
-rw-r--r--src/analysis/disass/loop.c2
-rw-r--r--src/analysis/disass/macro.c2
-rw-r--r--src/analysis/disass/rank.c4
7 files changed, 13 insertions, 11 deletions
diff --git a/src/analysis/blocks/flow.c b/src/analysis/blocks/flow.c
index bc14648..970fc21 100644
--- a/src/analysis/blocks/flow.c
+++ b/src/analysis/blocks/flow.c
@@ -575,7 +575,7 @@ bool g_flow_block_is_looping_to(GFlowBlock *block, const GInstrBlock *list, GFlo
result = (block == target);
g_arch_instruction_rlock_dest(block->last);
- dcount = g_arch_instruction_get_destinations(block->last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(block->last, &dests, &types);
for (i = 0; i < dcount && !result; i++)
switch (types[i])
@@ -638,7 +638,7 @@ bool g_flow_block_follow(GFlowBlock *block, const GInstrBlock *list, BlockFollow
result = callback(block, BFP_ENTER, data);
g_arch_instruction_rlock_dest(block->last);
- dcount = g_arch_instruction_get_destinations(block->last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(block->last, &dests, &types);
for (i = 0; i < dcount && result; i++)
switch (types[i])
diff --git a/src/analysis/decomp/il.c b/src/analysis/decomp/il.c
index 37110f2..36b5dfe 100644
--- a/src/analysis/decomp/il.c
+++ b/src/analysis/decomp/il.c
@@ -638,7 +638,7 @@ static void close_case_decomp_instructions(GDecInstruction *case_dinstr, GInstrB
for (i = 0; i < lcount && is_common; i++)
{
g_flow_block_get_boundary(G_FLOW_BLOCK(leafs[i]), NULL, &last);
- dcount = g_arch_instruction_get_destinations(last, &dests, NULL, NULL);
+ dcount = g_arch_instruction_get_destinations(last, &dests, NULL);
for (j = 0; j < dcount && is_common; j++)
{
@@ -701,6 +701,8 @@ static void close_case_decomp_instructions(GDecInstruction *case_dinstr, GInstrB
static void build_switch_branches(GSwitchInstruction *decomp, GFlowBlock *block, GDecContext *ctx)
{
+#if 0
+
GArchInstruction *last; /* Dernière instruction du lot */
GInstrBlock *sub_parent; /* Groupe des sous-branches */
GHashTable *sub_shared; /* Allocations communes */
@@ -752,5 +754,5 @@ static void build_switch_branches(GSwitchInstruction *decomp, GFlowBlock *block,
}
g_hash_table_unref(sub_shared);
-
+#endif
}
diff --git a/src/analysis/disass/dragon.c b/src/analysis/disass/dragon.c
index 58c293e..c817727 100644
--- a/src/analysis/disass/dragon.c
+++ b/src/analysis/disass/dragon.c
@@ -209,7 +209,7 @@ static dragon_node *create_dragon_nodes(const GArchProcessor *proc, const instr_
/* Analyse des destinations */
g_arch_instruction_rlock_dest(iter);
- dcount = g_arch_instruction_get_destinations(iter, NULL, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(iter, NULL, &types);
cut = false;
@@ -439,7 +439,7 @@ void compute_all_paths(dragon_node *nodes, size_t count)
size_t id; /* Indice du bit associé */
g_arch_instruction_rlock_dest(node->last);
- dcount = g_arch_instruction_get_destinations(node->last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(node->last, &dests, &types);
for (i = 0; i < dcount; i++)
switch (types[i])
diff --git a/src/analysis/disass/links.c b/src/analysis/disass/links.c
index 0ce107a..294274f 100644
--- a/src/analysis/disass/links.c
+++ b/src/analysis/disass/links.c
@@ -85,7 +85,7 @@ void establish_natural_link(GArchInstruction *instr, GArchInstruction *prev)
*/
g_arch_instruction_rlock_dest(prev);
- count = g_arch_instruction_get_destinations(prev, &others, &types, NULL);
+ count = g_arch_instruction_get_destinations(prev, &others, &types);
for (i = 0; i < count; i++)
{
diff --git a/src/analysis/disass/loop.c b/src/analysis/disass/loop.c
index 01fca07..99121a8 100644
--- a/src/analysis/disass/loop.c
+++ b/src/analysis/disass/loop.c
@@ -65,7 +65,7 @@ static void detect_back_edges(dragon_node *nodes, size_t count)
get_dragon_node_bounding_instructions(node, NULL, &last);
g_arch_instruction_wlock_dest(last);
- dcount = g_arch_instruction_get_destinations(last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(last, &dests, &types);
for (i = 0; i < dcount; i++)
switch (types[i])
diff --git a/src/analysis/disass/macro.c b/src/analysis/disass/macro.c
index 6ac1fb2..4c4ba66 100644
--- a/src/analysis/disass/macro.c
+++ b/src/analysis/disass/macro.c
@@ -228,7 +228,7 @@ static GInstrBlock *build_instruction_blocks(GArchProcessor *proc, const dragon_
others = NULL;
g_arch_instruction_rlock_dest(last);
- dcount = g_arch_instruction_get_destinations(last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(last, &dests, &types);
for (i = 0; i < dcount && others == NULL; i++)
switch (types[i])
diff --git a/src/analysis/disass/rank.c b/src/analysis/disass/rank.c
index 7504231..3721ca0 100644
--- a/src/analysis/disass/rank.c
+++ b/src/analysis/disass/rank.c
@@ -79,7 +79,7 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns
g_flow_block_get_boundary(block, NULL, &last);
g_arch_instruction_rlock_dest(last);
- dcount = g_arch_instruction_get_destinations(last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(last, &dests, &types);
for (i = 0; i < dcount; i++)
{
@@ -317,7 +317,7 @@ void rank_routine_block(const GBlockList *list, GBasicBlock *block)
g_basic_block_get_boundary(block, NULL, &last);
g_arch_instruction_rlock_dest(last);
- dcount = g_arch_instruction_get_destinations(last, &dests, &types, NULL);
+ dcount = g_arch_instruction_get_destinations(last, &dests, &types);
for (i = 0; i < dcount; i++)
{