summaryrefslogtreecommitdiff
path: root/src/arch/x86/op_nop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/op_nop.c')
-rw-r--r--src/arch/x86/op_nop.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/arch/x86/op_nop.c b/src/arch/x86/op_nop.c
index 3c1b989..1c2d4c1 100644
--- a/src/arch/x86/op_nop.c
+++ b/src/arch/x86/op_nop.c
@@ -21,9 +21,6 @@
*/
-#include <malloc.h>
-
-
#include "../instruction-int.h"
#include "opcodes.h"
@@ -34,7 +31,8 @@
* Paramètres : data = flux de données à analyser. *
* pos = position courante dans ce flux. [OUT] *
* len = taille totale des données à analyser. *
-* offset = adresse virtuelle de l'instruction. *
+* addr = adresse virtuelle de l'instruction. *
+* prefix = éventuel(s) préfixe(s) remarqué(s). *
* proc = architecture ciblée par le désassemblage. *
* *
* Description : Décode une instruction de type 'nop'. *
@@ -45,13 +43,11 @@
* *
******************************************************************************/
-asm_x86_instr *x86_read_instr_nop(const uint8_t *data, off_t *pos, off_t len, uint64_t offset, const asm_x86_processor *proc)
+GArchInstruction *x86_read_instr_nop(const bin_t *data, off_t *pos, off_t len, vmpa_t addr, X86Prefix prefix, const GX86Processor *proc)
{
- asm_x86_instr *result;
-
- result = (asm_x86_instr *)calloc(1, sizeof(asm_x86_instr));
+ GArchInstruction *result; /* Instruction à retourner */
- ASM_INSTRUCTION(result)->opcode = data[(*pos)++];
+ result = g_x86_instruction_new(XOP_NOP);
return result;