diff options
Diffstat (limited to 'src/arch/arm/v7/helpers.h')
-rw-r--r-- | src/arch/arm/v7/helpers.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/arch/arm/v7/helpers.h b/src/arch/arm/v7/helpers.h index fee5aea..919611e 100644 --- a/src/arch/arm/v7/helpers.h +++ b/src/arch/arm/v7/helpers.h @@ -31,6 +31,7 @@ #include "pseudo.h" #include "operands/maccess.h" #include "operands/offset.h" +#include "operands/reglist.h" #include "operands/shift.h" #include "../../operand.h" @@ -188,8 +189,30 @@ return shift_t; +/** + * Glue purement interne pour les listes de registres. + */ + +#define RegistersList(mask) \ + ({ \ + GArchOperand *__result; \ + __result = g_armv7_reglist_operand_new(); \ + if (!g_armv7_reglist_load_registers(G_ARMV7_REGLIST_OPERAND(__result), mask)) \ + { \ + g_object_unref(G_OBJECT(__result)); \ + __result = NULL; \ + } \ + __result; \ + }) +#define ListFromRegister(reg) \ + ({ \ + GArchOperand *__result; \ + __result = g_armv7_reglist_operand_new(); \ + g_armv7_reglist_add_register(G_ARMV7_REGLIST_OPERAND(__result), reg); \ + __result; \ + }) |