diff options
Diffstat (limited to 'src/arch/immediate.c')
-rw-r--r-- | src/arch/immediate.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/arch/immediate.c b/src/arch/immediate.c index cd36de2..40533ae 100644 --- a/src/arch/immediate.c +++ b/src/arch/immediate.c @@ -172,6 +172,8 @@ static void g_imm_operand_class_init(GImmOperandClass *klass) static void g_imm_operand_init(GImmOperand *operand) { operand->zpad = false; + + operand->def_display = IOD_HEX; operand->display = IOD_HEX; } @@ -741,6 +743,8 @@ size_t g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syntax, cha { case IOD_BIN: case IOD_CHAR: + case IOD_OCT: + case IOD_DEC: zpad = ""; break; default: @@ -883,6 +887,33 @@ static void g_imm_operand_print(const GImmOperand *operand, GBufferLine *line, A /****************************************************************************** * * * Paramètres : operand = opérande à traiter. * +* pos = valeur résultante. [OUT] * +* * +* Description : Convertit une valeur immédiate en position de type phys_t. * +* * +* Retour : Bilan de l'opération. * +* * +* Remarques : - * +* * +******************************************************************************/ + +bool g_imm_operand_to_phys_t(const GImmOperand *operand, phys_t *pos) +{ + bool result; /* Bilan à renvoyer */ + + result = !MDS_IS_SIGNED(operand->size); + + if (result) + *pos = operand->raw; + + return result; + +} + + +/****************************************************************************** +* * +* Paramètres : operand = opérande à traiter. * * addr = valeur résultante. [OUT] * * * * Description : Convertit une valeur immédiate en adresse de type virt_t. * |