diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-07-19 22:28:13 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-07-19 22:28:13 (GMT) |
commit | 59bda76b1a76d796a42ee46b9da7041dbef57253 (patch) | |
tree | 36f7d6eaa7847016b99431b1b489c6a1fdbaf33b /src/arch/x86/operand.c | |
parent | 3a9fe39c6a8923f45e7c96d80b0bfe52b8686ff9 (diff) |
Encapsulated all recognized variables in the stack using a new plugin (need to be continued).
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@99 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/x86/operand.c')
-rw-r--r-- | src/arch/x86/operand.c | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/src/arch/x86/operand.c b/src/arch/x86/operand.c index 8f218fc..24613cf 100644 --- a/src/arch/x86/operand.c +++ b/src/arch/x86/operand.c @@ -29,7 +29,6 @@ #include <stdio.h> -#include "registers.h" #include "../operand.h" #include "../operand-int.h" #include "../../common/extstr.h" @@ -654,6 +653,66 @@ static char *g_x86_mod_rm_operand_get_text(const GX86ModRMOperand *operand, cons } +/****************************************************************************** +* * +* Paramètres : operand = opérande à consulter. * +* scale = facteur sous forme de puissance de deux. [OUT * +* index = register principal de l'opérande. [OUT] * +* * +* Description : Fournit l'indice et l'échelle d'un opérande x86 ModRM. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_x86_mod_rm_operand_get_scale_and_index(const GX86ModRMOperand *operand, uint8_t *scale, const x86_register **index) +{ + *scale = operand->scale; + *index = operand->index; + +} + + +/****************************************************************************** +* * +* Paramètres : operand = opérande à consulter. * +* * +* Description : Fournit le registre de base d'un opérande x86 ModRM. * +* * +* Retour : Registre de base de l'opérande. * +* * +* Remarques : - * +* * +******************************************************************************/ + +const x86_register *g_x86_mod_rm_operand_get_base(const GX86ModRMOperand *operand) +{ + return operand->base; + +} + + +/****************************************************************************** +* * +* Paramètres : operand = opérande à consulter. * +* * +* Description : Fournit le décallage supplémentaire d'un opérande x86 ModRM. * +* * +* Retour : Décallage numérique pour l'opérande. * +* * +* Remarques : - * +* * +******************************************************************************/ + +const GImmOperand *g_x86_mod_rm_operand_get_displacement(const GX86ModRMOperand *operand) +{ + return operand->displacement; + +} + + /* ---------------------------------------------------------------------------------- */ /* OPERANDES D'ADRESSES RELATIVES */ |