summaryrefslogtreecommitdiff
path: root/src/arch/dalvik
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/dalvik')
-rw-r--r--src/arch/dalvik/instruction.c2
-rw-r--r--src/arch/dalvik/register.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/arch/dalvik/instruction.c b/src/arch/dalvik/instruction.c
index c0c6675..e02619c 100644
--- a/src/arch/dalvik/instruction.c
+++ b/src/arch/dalvik/instruction.c
@@ -445,7 +445,7 @@ static void g_dalvik_instruction_finalize(GDalvikInstruction *instr)
* *
* Description : Crée une instruction pour l'architecture Dalvik. *
* *
-* Retour : Architecture mise en place. *
+* Retour : Adresse de la structure mise en place. *
* *
* Remarques : - *
* *
diff --git a/src/arch/dalvik/register.c b/src/arch/dalvik/register.c
index e0165b4..7c0b601 100644
--- a/src/arch/dalvik/register.c
+++ b/src/arch/dalvik/register.c
@@ -81,6 +81,13 @@ G_DEFINE_TYPE(GDalvikRegister, g_dalvik_register, G_TYPE_ARCH_REGISTER);
static void g_dalvik_register_class_init(GDalvikRegisterClass *klass)
{
+ GArchRegisterClass *register_class; /* Classe de haut niveau */
+
+ register_class = G_ARCH_REGISTER_CLASS(klass);
+
+ register_class->hash = (reg_hash_fc)g_dalvik_register_hash;
+ register_class->compare = (reg_compare_fc)g_dalvik_register_compare;
+ register_class->print = (reg_print_fc)g_dalvik_register_print;
}
@@ -99,13 +106,6 @@ static void g_dalvik_register_class_init(GDalvikRegisterClass *klass)
static void g_dalvik_register_init(GDalvikRegister *reg)
{
- GArchRegister *base; /* Version basique */
-
- base = G_ARCH_REGISTER(reg);
-
- base->hash = (reg_hash_fc)g_dalvik_register_hash;
- base->compare = (reg_compare_fc)g_dalvik_register_compare;
- base->print = (reg_print_fc)g_dalvik_register_print;
}
@@ -224,11 +224,11 @@ void g_dalvik_register_print(const GDalvikRegister *reg, GBufferLine *line, AsmS
switch (syntax)
{
case ASX_INTEL:
- klen = snprintf(key, MAX_REGNAME_LEN, "v%hd", reg->index);
+ klen = snprintf(key, MAX_REGNAME_LEN, "v%hu", reg->index);
break;
case ASX_ATT:
- klen = snprintf(key, MAX_REGNAME_LEN, "%%v%hd", reg->index);
+ klen = snprintf(key, MAX_REGNAME_LEN, "%%v%hu", reg->index);
break;
default: