summaryrefslogtreecommitdiff
path: root/src/arch/x86/op_int.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/op_int.c')
-rw-r--r--src/arch/x86/op_int.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/arch/x86/op_int.c b/src/arch/x86/op_int.c
index 6fb868a..7c2ae1d 100644
--- a/src/arch/x86/op_int.c
+++ b/src/arch/x86/op_int.c
@@ -49,25 +49,17 @@
asm_x86_instr *x86_read_instr_int(const uint8_t *data, off_t *pos, off_t len, uint64_t offset, const asm_x86_processor *proc)
{
asm_x86_instr *result; /* Instruction à retourner */
- asm_x86_operand *syscall; /* Indice de l'appel système */
result = (asm_x86_instr *)calloc(1, sizeof(asm_x86_instr));
ASM_INSTRUCTION(result)->opcode = data[(*pos)++];
- syscall = create_new_x86_operand();
- if (!fill_imm_operand(ASM_OPERAND(syscall), AOS_8_BITS, data, pos, len))
+ if (!x86_read_one_operand(result, data, pos, len, X86_OTP_IMM8))
{
- free(syscall);
free(result);
return NULL;
}
- ASM_INSTRUCTION(result)->operands = (asm_operand **)calloc(1, sizeof(asm_operand *));
- ASM_INSTRUCTION(result)->operands_count = 1;
-
- ASM_INSTRUCTION(result)->operands[0] = ASM_OPERAND(syscall);
-
return result;
}