summaryrefslogtreecommitdiff
path: root/py/asmthumb.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-18 16:56:54 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-18 16:56:54 +0100
commit90edf9e13b5bdf9009a43465abc4c5dc59aabadb (patch)
tree4195e746d83b52e3c01bcde156ed65650088ba37 /py/asmthumb.h
parent906d383850971f9f034cae346bac50cc5c90d369 (diff)
inlinethumb: Add wfi, cpsid and cpsie instructions.
Diffstat (limited to 'py/asmthumb.h')
-rw-r--r--py/asmthumb.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/py/asmthumb.h b/py/asmthumb.h
index 6b4f5506b..ca81b847f 100644
--- a/py/asmthumb.h
+++ b/py/asmthumb.h
@@ -58,6 +58,14 @@ void asm_thumb_label_assign(asm_thumb_t *as, uint label);
// argument order follows ARM, in general dest is first
// note there is a difference between movw and mov.w, and many others!
+#define ASM_THUMB_OP_NOP (0xbf00)
+#define ASM_THUMB_OP_WFI (0xbf30)
+#define ASM_THUMB_OP_CPSID_I (0xb672) // cpsid i, disable irq
+#define ASM_THUMB_OP_CPSIE_I (0xb662) // cpsie i, enable irq
+
+void asm_thumb_op16(asm_thumb_t *as, uint op);
+void asm_thumb_op32(asm_thumb_t *as, uint op1, uint op2);
+
// FORMAT 2: add/subtract
#define ASM_THUMB_FORMAT_2_ADD (0x1800)