mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
py: Implement "it" instruction for inline Thumb assembler.
This commit is contained in:
@@ -84,6 +84,7 @@ void asm_thumb_data(asm_thumb_t* as, uint bytesize, uint val);
|
||||
// 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_IT (0xbf00)
|
||||
#define ASM_THUMB_OP_ITE_EQ (0xbf0c)
|
||||
#define ASM_THUMB_OP_ITE_CS (0xbf2c)
|
||||
#define ASM_THUMB_OP_ITE_MI (0xbf4c)
|
||||
@@ -100,6 +101,9 @@ void asm_thumb_data(asm_thumb_t* as, uint bytesize, uint val);
|
||||
void asm_thumb_op16(asm_thumb_t *as, uint op);
|
||||
void asm_thumb_op32(asm_thumb_t *as, uint op1, uint op2);
|
||||
|
||||
static inline void asm_thumb_it_cc(asm_thumb_t *as, uint cc, uint mask)
|
||||
{ asm_thumb_op16(as, ASM_THUMB_OP_IT | (cc << 4) | mask); }
|
||||
|
||||
// FORMAT 2: add/subtract
|
||||
|
||||
#define ASM_THUMB_FORMAT_2_ADD (0x1800)
|
||||
|
||||
Reference in New Issue
Block a user