/* OpenIDA - Outil d'analyse de fichiers binaires
* operand-int.h - prototypes pour la définition générique interne des opérandes
*
* Copyright (C) 2008 Cyrille Bagard
*
* This file is part of OpenIDA.
*
* OpenIDA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* OpenIDA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Foobar. If not, see .
*/
#ifndef _ARCH_OPERAND_INT_H
#define _ARCH_OPERAND_INT_H
#include
/* Types d'opérandes rencontrables */
typedef enum _AsmOperandType
{
AOT_NONE, /* Type d'opérande inconnu ! */
AOT_IMM, /* Valeur immédiate */
AOT_REG, /* Registre quelconque */
AOT_MEM /* Accès à la mémoire */
} AsmOperandType;
/* Définition générique d'une opérande */
struct _asm_operand
{
AsmOperandType type; /* Type d'opérande */
AsmOperandSize size; /* Taille de l'opérande */
union
{
uint8_t val8; /* Valeur sur 8 bits */
uint16_t val16; /* Valeur sur 16 bits */
uint32_t val32; /* Valeur sur 32 bits */
uint64_t val64; /* Valeur sur 64 bits */
} value;
};
#define ASM_OPERAND(o) ((asm_operand *)o)
#endif /* _ARCH_OPERAND_INT_H */