summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-27 22:03:31 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-27 22:03:31 (GMT)
commit5c7ea8e2137e4e5bb2887de0d1ffd8a0b277636e (patch)
tree86d788e395f009c773cccd4310d56477c55552b5 /src/arch
parent7f35f8d2f211fdf087252ede7665e9c81f35cdc7 (diff)
Reduced the quantity of used variables in decompiled code.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@332 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/dalvik/context.c6
-rw-r--r--src/arch/dalvik/decomp/iget.c2
-rw-r--r--src/arch/dalvik/decomp/iput.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/dalvik/context.c b/src/arch/dalvik/context.c
index 7918467..a21f8e9 100644
--- a/src/arch/dalvik/context.c
+++ b/src/arch/dalvik/context.c
@@ -526,7 +526,7 @@ static GDecInstruction *g_dalvik_dcontext_convert_register(GDalvikDContext *ctx,
this = g_binary_variable_new(/* FIXME */g_basic_type_new(BTP_OTHER) /* FIXME */);
g_binary_variable_set_name(this, "this");
- ctx->this = g_pseudo_register_new();
+ ctx->this = g_pseudo_register_new(PRU_THIS);
g_pseudo_register_set_variable(G_PSEUDO_REGISTER(ctx->this), this);
}
@@ -548,7 +548,7 @@ static GDecInstruction *g_dalvik_dcontext_convert_register(GDalvikDContext *ctx,
}
else
{
- result = g_pseudo_register_new();
+ result = g_pseudo_register_new(PRU_ARG);
g_pseudo_register_set_basename(G_PSEUDO_REGISTER(result), "arg");
g_pseudo_register_set_index(G_PSEUDO_REGISTER(result), DVI_INDEX(info));
@@ -582,7 +582,7 @@ static GDecInstruction *g_dalvik_dcontext_convert_register(GDalvikDContext *ctx,
if (result == NULL)
{
- result = g_pseudo_register_new();
+ result = g_pseudo_register_new(PRU_LOCAL);
g_pseudo_register_set_basename(G_PSEUDO_REGISTER(result), "var");
g_pseudo_register_set_index(G_PSEUDO_REGISTER(result), ctx->locals_count);
diff --git a/src/arch/dalvik/decomp/iget.c b/src/arch/dalvik/decomp/iget.c
index 9cf603d..6d2ce30 100644
--- a/src/arch/dalvik/decomp/iget.c
+++ b/src/arch/dalvik/decomp/iget.c
@@ -65,7 +65,7 @@ GDecInstruction *dalvik_decomp_instr_iget(const GArchInstruction *instr, GDecCon
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand));
var = get_field_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);
- field = g_pseudo_register_new();
+ field = g_pseudo_register_new(PRU_FIXED);
g_pseudo_register_set_variable(G_PSEUDO_REGISTER(field), var);
operand = g_arch_instruction_get_operand(instr, 0);
diff --git a/src/arch/dalvik/decomp/iput.c b/src/arch/dalvik/decomp/iput.c
index ed0830c..68ad4f0 100644
--- a/src/arch/dalvik/decomp/iput.c
+++ b/src/arch/dalvik/decomp/iput.c
@@ -68,7 +68,7 @@ GDecInstruction *dalvik_decomp_instr_iput(const GArchInstruction *instr, GDecCon
index = g_dalvik_pool_operand_get_index(G_DALVIK_POOL_OPERAND(operand));
var = get_field_from_dex_pool(G_DEX_FORMAT(g_dec_context_get_format(ctx)), index);
- field = g_pseudo_register_new();
+ field = g_pseudo_register_new(PRU_FIXED);
g_pseudo_register_set_variable(G_PSEUDO_REGISTER(field), var);
access = g_access_expression_new(G_DEC_EXPRESSION(dest), G_DEC_EXPRESSION(field));