diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-07-31 05:53:06 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-07-31 05:53:06 (GMT) |
commit | a5d8e3fc30cda2e13d30f099e93ab1b182fdc0bd (patch) | |
tree | cf183906b2301cd3c726af820292fd0f2458bfa1 /src/arch/dalvik/operands/register.c | |
parent | dc436357ff29158dddd836d368d152d42d5b086b (diff) |
Improved the way code is decoded by avoiding to propagate the base address everywhere.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@385 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/dalvik/operands/register.c')
-rw-r--r-- | src/arch/dalvik/operands/register.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/arch/dalvik/operands/register.c b/src/arch/dalvik/operands/register.c index 45e965c..00d5699 100644 --- a/src/arch/dalvik/operands/register.c +++ b/src/arch/dalvik/operands/register.c @@ -113,7 +113,7 @@ static void g_dalvik_register_operand_init(GDalvikRegisterOperand *operand) * * * Paramètres : data = flux de données à analyser. * * pos = position courante dans ce flux. [OUT] * -* len = taille totale des données à analyser. * +* end = limite des données à analyser. * * low = position éventuelle des 4 bits visés. [OUT] * * size = taille de l'opérande, et donc du registre. * * endian = ordre des bits dans la source. * @@ -126,7 +126,7 @@ static void g_dalvik_register_operand_init(GDalvikRegisterOperand *operand) * * ******************************************************************************/ -GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t len, bool *low, MemoryDataSize size, SourceEndian endian) +GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t end, bool *low, MemoryDataSize size, SourceEndian endian) { GDalvikRegisterOperand *result; /* Structure à retourner */ uint8_t index8; /* Indice sur 8 bits */ @@ -136,13 +136,13 @@ GArchOperand *g_dalvik_register_operand_new(const bin_t *data, off_t *pos, off_t switch (size) { case MDS_4_BITS: - test = read_u4(&index8, data, pos, len, low, endian); + test = read_u4(&index8, data, pos, end, low, endian); break; case MDS_8_BITS: - test = read_u8(&index8, data, pos, len, endian); + test = read_u8(&index8, data, pos, end, endian); break; case MDS_16_BITS: - test = read_u16(&index16, data, pos, len, endian); + test = read_u16(&index16, data, pos, end, endian); break; default: test = false; |