diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-06-27 23:27:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-06-27 23:27:38 (GMT) |
commit | f38beea1951f9c323af3d05a3c4d2cf35f407245 (patch) | |
tree | 763a3ffc38b22135a7dccdbc521c8b21c5f37df7 /src/arch/artificial.c | |
parent | a3b128d4f448fa1eee12074a9bf0256b06e222e8 (diff) |
Defined the minimal instruction size for a given architecture.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@171 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/artificial.c')
-rw-r--r-- | src/arch/artificial.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/arch/artificial.c b/src/arch/artificial.c index 65d917e..e588a4e 100644 --- a/src/arch/artificial.c +++ b/src/arch/artificial.c @@ -139,10 +139,13 @@ GArchInstruction *g_db_instruction_new_from_data(const bin_t *data, off_t *pos, result = g_object_new(G_TYPE_DB_INSTRUCTION, NULL); - operand = g_imm_operand_new_from_data(MDS_8_BITS, data, pos, len, + operand = g_imm_operand_new_from_data(g_arch_processor_get_instruction_size(proc), + data, pos, len, g_arch_processor_get_endianness(proc)); if (operand == NULL) goto gdinfd_error; + g_imm_operand_pad(G_IMM_OPERAND(operand), true); + g_arch_instruction_attach_extra_operand(result, operand); return result; |