diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2014-12-08 08:27:56 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2014-12-08 08:27:56 (GMT) |
commit | 096f123b87437cf25cd008a6dea710286fbefcf0 (patch) | |
tree | a79c3b401b44d5aa513e3931b8422134d2f24936 /src/arch/arm/v7/helpers.h | |
parent | 0a7b9b66bdcf386a36ec13ec480b52aa17406385 (diff) |
Supported new ARMv7 instructions.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@437 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/helpers.h')
-rw-r--r-- | src/arch/arm/v7/helpers.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/arch/arm/v7/helpers.h b/src/arch/arm/v7/helpers.h index 4ef7087..fee5aea 100644 --- a/src/arch/arm/v7/helpers.h +++ b/src/arch/arm/v7/helpers.h @@ -88,6 +88,17 @@ +#define DecodeImmShiftValue(imm5) \ + ({ \ + GArchOperand *__result; \ + uint32_t __shift_n; \ + if (!armv7_decode_imm_shift(0, imm5, (SRType []) { 0 }, &__shift_n)) \ + __result = NULL; \ + else \ + __result = g_imm_operand_new_from_value(MDS_32_BITS_UNSIGNED, __shift_n); \ + __result; \ + }) + #define DecodeImmShift(type, imm5) \ ({ \ GArchOperand *__result; \ @@ -156,16 +167,27 @@ return shift_t; g_armv7_offset_operand_new(add, off) +#define MakeShiftedMemoryAccess(base, off, shift, wr) \ + g_armv7_maccess_operand_new(base, off, shift, wr) + + +#define _MakeMemoryAccess(base, off, wr) \ + MakeShiftedMemoryAccess(base, off, NULL, wr) + + #define MakeMemoryAccess(base, off, add, wr) \ ({ \ GArchOperand *__off; \ __off = MakeAccessOffset(add, off); \ - g_armv7_maccess_operand_new(base, __off, wr); \ + _MakeMemoryAccess(base, __off, wr); \ }) #define MakeMemoryNotIndexed(base, wr) \ - g_armv7_maccess_operand_new(base, NULL, wr) + _MakeMemoryAccess(base, NULL, wr) + + + |