summaryrefslogtreecommitdiff
path: root/src/arch/dalvik
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-10-01 20:44:39 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-10-01 20:44:39 (GMT)
commitada6b756efd6ca109f6c46aa4d3eb11c17ad6b84 (patch)
treeef182c00ffb3881f6537e96dfa07acb875ac0846 /src/arch/dalvik
parent15c0cc127f0f4551c88de6c0d46b7d38f4b3ed4b (diff)
Prepared the ground for the ARMv7 architecture.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@408 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
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: