summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/opdefs/b_A8818.d
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-08 08:27:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-08 08:27:56 (GMT)
commit096f123b87437cf25cd008a6dea710286fbefcf0 (patch)
treea79c3b401b44d5aa513e3931b8422134d2f24936 /src/arch/arm/v7/opdefs/b_A8818.d
parent0a7b9b66bdcf386a36ec13ec480b52aa17406385 (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/opdefs/b_A8818.d')
-rw-r--r--src/arch/arm/v7/opdefs/b_A8818.d125
1 files changed, 125 insertions, 0 deletions
diff --git a/src/arch/arm/v7/opdefs/b_A8818.d b/src/arch/arm/v7/opdefs/b_A8818.d
new file mode 100644
index 0000000..50600d4
--- /dev/null
+++ b/src/arch/arm/v7/opdefs/b_A8818.d
@@ -0,0 +1,125 @@
+
+/* Chrysalide - Outil d'analyse de fichiers binaires
+ * ##FILE## - traduction d'instructions ARMv7
+ *
+ * Copyright (C) 2014 Cyrille Bagard
+ *
+ * This file is part of Chrysalide.
+ *
+ * Chrysalide 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.
+ *
+ * Chrysalide 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 <http://www.gnu.org/licenses/>.
+ */
+
+
+@title B
+
+@encoding(t1) {
+
+ @half 1 1 0 1 cond(4) top(1) imm8(7)
+
+ @syntax {c} <label>
+
+ @conv {
+
+ c = Condition(cond)
+ label = SignExtend(top:imm8:'0', top, 32)
+
+ }
+
+ @rules {
+
+ //if cond == '1110' then UNDEFINED;
+ //if cond == '1111' then SEE SVC;
+
+ }
+
+}
+
+@encoding(t2) {
+
+ @half 1 1 1 0 0 top(1) imm11(10)
+
+ @syntax <label>
+
+ @conv {
+
+ label = SignExtend(top:imm11:'0', top, 32)
+
+ }
+
+ @rules {
+
+ //if InITBlock() && !LastInITBlock() then UNPREDICTABLE;
+
+ }
+
+}
+
+@encoding(T3) {
+
+ @word 1 1 1 1 0 S(1) cond(4) imm6(6) 1 0 J1(1) 0 J2(1) imm11(11)
+
+ @syntax {c} ".W" <label>
+
+ @conv {
+
+ c = Condition(cond)
+ label = SignExtend(S:J2:J1:imm6:imm11:'0', S, 32)
+
+ }
+
+ @rules {
+
+ //if cond<3:1> == '111' then SEE "Related encodings";
+ //if InITBlock() then UNPREDICTABLE;
+
+ }
+
+}
+
+@encoding(T4) {
+
+ @word 1 1 1 1 0 S(1) imm10(10) 1 0 J1(1) 1 J2(1) imm11(11)
+
+ @syntax "b.W" <label>
+
+ @conv {
+
+ I1 = NOT(J1 EOR S)
+ I2 = NOT(J2 EOR S)
+ label = SignExtend(S:I1:I2:imm10:imm11:'0', S, 32)
+
+ }
+
+ @rules {
+
+ //if InITBlock() && !LastInITBlock() then UNPREDICTABLE;
+
+ }
+
+}
+
+@encoding(A1) {
+
+ @word cond(4) 1 0 1 0 top(1) imm24(23)
+
+ @syntax {c} <label>
+
+ @conv {
+
+ c = Condition(cond)
+ label = SignExtend(top:imm24:'00', top, 32)
+
+ }
+
+}