summaryrefslogtreecommitdiff
path: root/src/arch/arm/v7/opdefs/ldr_A8864.d
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-01-24 11:19:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-01-24 11:19:32 (GMT)
commit141d2f0fbb2ce3b4ddf85383c55b891fd59dc598 (patch)
tree085fa1a20d77f86825e1a6f4215b1ffd8fd961e8 /src/arch/arm/v7/opdefs/ldr_A8864.d
parent3df9f6dc8548b0562312036abfbfcf9850a81041 (diff)
Introduced conditional calls in instruction definition rules.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@459 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/arch/arm/v7/opdefs/ldr_A8864.d')
-rw-r--r--src/arch/arm/v7/opdefs/ldr_A8864.d32
1 files changed, 31 insertions, 1 deletions
diff --git a/src/arch/arm/v7/opdefs/ldr_A8864.d b/src/arch/arm/v7/opdefs/ldr_A8864.d
index acb6f94..3fbc0e3 100644
--- a/src/arch/arm/v7/opdefs/ldr_A8864.d
+++ b/src/arch/arm/v7/opdefs/ldr_A8864.d
@@ -37,6 +37,13 @@
}
+ @hooks {
+
+ link = handle_links_with_instruction_ldr_literal_from_thumb
+ post = post_process_ldr_instructions
+
+ }
+
}
@encoding(T2) {
@@ -53,9 +60,17 @@
}
+ @hooks {
+
+ link = handle_links_with_instruction_ldr_literal_from_thumb
+ post = post_process_ldr_instructions
+
+ }
+
@rules {
//if t == 15 && InITBlock() && !LastInITBlock() then UNPREDICTABLE;
+ if (Rt == '1111'); call DefineAsReturn(1)
}
@@ -65,14 +80,29 @@
@word cond(4) 0 1 0 1 U(1) 0 0 1 1 1 1 1 Rt(4) imm12(12)
- @syntax <Rgt> <label>
+ @syntax {c} <Rgt> <label>
@conv {
+ c = Condition(cond)
Rgt = Register(Rt)
imm32 = ZeroExtend(imm12, 12, 32)
label = MakeAccessOffset(U, imm32)
}
+ @hooks {
+
+ link = handle_links_with_instruction_ldr_literal_from_arm
+ post = post_process_ldr_instructions
+
+ }
+
+ @rules {
+
+ //if t == 15 && InITBlock() && !LastInITBlock() then UNPREDICTABLE;
+ if (Rt == '1111'); call DefineAsReturn(1)
+
+ }
+
}