diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-02-01 22:39:57 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-02-01 22:39:57 (GMT) |
commit | 5511e355e7810f06bd610b79bcc94402c88d7ec9 (patch) | |
tree | 59023590f49f01cbd4ebfa9c1e82f797315e6f36 /src/arch/arm/v7/helpers.h | |
parent | 21a05df6423bdc13ca148ff2b96aec80bf7af2b2 (diff) |
Added some development assertions and avoided to load code twice.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@464 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/helpers.h')
-rw-r--r-- | src/arch/arm/v7/helpers.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/arch/arm/v7/helpers.h b/src/arch/arm/v7/helpers.h index 0a1d934..b4fe9b4 100644 --- a/src/arch/arm/v7/helpers.h +++ b/src/arch/arm/v7/helpers.h @@ -32,6 +32,7 @@ #include "operands/maccess.h" #include "operands/offset.h" #include "operands/reglist.h" +#include "operands/rotation.h" #include "operands/shift.h" #include "../../operand.h" @@ -196,6 +197,38 @@ return shift_t; + + +#define BuildRotation(val5) \ + ({ \ + GArchOperand *__result; \ + uint8_t __rot; \ + GArchOperand *__rot_op; \ + __rot = val5; \ + __rot_op = g_imm_operand_new_from_value(MDS_8_BITS_UNSIGNED, __rot); \ + __result = g_armv7_rotation_operand_new(__rot_op); \ + if (__result == NULL) \ + g_object_unref(G_OBJECT(__rot_op)); \ + __result; \ + }) + + + + +// type == '10', pas 2 ! (FIXME) +#define FixedShift(type, imm5) \ + ({ \ + GArchOperand *__result; \ + uint32_t __shift_n; \ + __shift_n = imm5; \ + __result = g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, __shift_n); \ + __result; \ + }) + + + + + /** * Glue purement interne pour les listes de registres. */ |