diff options
Diffstat (limited to 'src/arch/immediate.c')
-rw-r--r-- | src/arch/immediate.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/arch/immediate.c b/src/arch/immediate.c index d9e36f2..46abe62 100644 --- a/src/arch/immediate.c +++ b/src/arch/immediate.c @@ -148,7 +148,7 @@ static void g_imm_operand_init(GImmOperand *operand) * Paramètres : size = taille de l'opérande souhaitée. * * 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] * * endian = ordre des bits dans la source. * * * @@ -160,7 +160,7 @@ static void g_imm_operand_init(GImmOperand *operand) * * ******************************************************************************/ -GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize size, const bin_t *data, off_t *pos, off_t len, bool *low, SourceEndian endian) +GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize size, const bin_t *data, off_t *pos, off_t end, bool *low, SourceEndian endian) { GImmOperand *result; /* Opérande à retourner */ @@ -171,52 +171,52 @@ GArchOperand *_g_imm_operand_new_from_data(MemoryDataSize size, const bin_t *dat switch (size) { case MDS_4_BITS_UNSIGNED: - if (!read_u4(&result->unsigned_imm.val8, data, pos, len, low, endian)) + if (!read_u4(&result->unsigned_imm.val8, data, pos, end, low, endian)) goto gionfd_error; break; case MDS_8_BITS_UNSIGNED: - if (!read_u8(&result->unsigned_imm.val8, data, pos, len, endian)) + if (!read_u8(&result->unsigned_imm.val8, data, pos, end, endian)) goto gionfd_error; break; case MDS_16_BITS_UNSIGNED: - if (!read_u16(&result->unsigned_imm.val16, data, pos, len, endian)) + if (!read_u16(&result->unsigned_imm.val16, data, pos, end, endian)) goto gionfd_error; break; case MDS_32_BITS_UNSIGNED: - if (!read_u32(&result->unsigned_imm.val32, data, pos, len, endian)) + if (!read_u32(&result->unsigned_imm.val32, data, pos, end, endian)) goto gionfd_error; break; case MDS_64_BITS_UNSIGNED: - if (!read_u64(&result->unsigned_imm.val64, data, pos, len, endian)) + if (!read_u64(&result->unsigned_imm.val64, data, pos, end, endian)) goto gionfd_error; break; case MDS_4_BITS_SIGNED: - if (!read_s4(&result->signed_imm.val8, data, pos, len, low, endian)) + if (!read_s4(&result->signed_imm.val8, data, pos, end, low, endian)) goto gionfd_error; break; case MDS_8_BITS_SIGNED: - if (!read_s8(&result->signed_imm.val8, data, pos, len, endian)) + if (!read_s8(&result->signed_imm.val8, data, pos, end, endian)) goto gionfd_error; break; case MDS_16_BITS_SIGNED: - if (!read_s16(&result->signed_imm.val16, data, pos, len, endian)) + if (!read_s16(&result->signed_imm.val16, data, pos, end, endian)) goto gionfd_error; break; case MDS_32_BITS_SIGNED: - if (!read_s32(&result->signed_imm.val32, data, pos, len, endian)) + if (!read_s32(&result->signed_imm.val32, data, pos, end, endian)) goto gionfd_error; break; case MDS_64_BITS_SIGNED: - if (!read_s64(&result->signed_imm.val64, data, pos, len, endian)) + if (!read_s64(&result->signed_imm.val64, data, pos, end, endian)) goto gionfd_error; break; |