summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-06-26 18:26:01 +1000
committerDamien George <damien@micropython.org>2020-06-27 00:24:04 +1000
commitb3b8706d27cffbfc4cdd447b204ae7083283d13c (patch)
treed267a49a4e3d87ae6a0565b6404aa3bb9285ff5b /py
parentaa26fe62d8728c95d447475ced9b4a03380025ea (diff)
py/asm: Add condition codes for signed comparisons.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r--py/asmthumb.h7
-rw-r--r--py/asmx64.h3
-rw-r--r--py/asmx86.h3
3 files changed, 13 insertions, 0 deletions
diff --git a/py/asmthumb.h b/py/asmthumb.h
index 9e6f242cc..17b694a74 100644
--- a/py/asmthumb.h
+++ b/py/asmthumb.h
@@ -80,12 +80,19 @@ void asm_thumb_exit(asm_thumb_t *as);
#define ASM_THUMB_OP_IT (0xbf00)
#define ASM_THUMB_OP_ITE_EQ (0xbf0c)
+#define ASM_THUMB_OP_ITE_NE (0xbf14)
#define ASM_THUMB_OP_ITE_CS (0xbf2c)
+#define ASM_THUMB_OP_ITE_CC (0xbf34)
#define ASM_THUMB_OP_ITE_MI (0xbf4c)
+#define ASM_THUMB_OP_ITE_PL (0xbf54)
#define ASM_THUMB_OP_ITE_VS (0xbf6c)
+#define ASM_THUMB_OP_ITE_VC (0xbf74)
#define ASM_THUMB_OP_ITE_HI (0xbf8c)
+#define ASM_THUMB_OP_ITE_LS (0xbf94)
#define ASM_THUMB_OP_ITE_GE (0xbfac)
+#define ASM_THUMB_OP_ITE_LT (0xbfb4)
#define ASM_THUMB_OP_ITE_GT (0xbfcc)
+#define ASM_THUMB_OP_ITE_LE (0xbfd4)
#define ASM_THUMB_OP_NOP (0xbf00)
#define ASM_THUMB_OP_WFI (0xbf30)
diff --git a/py/asmx64.h b/py/asmx64.h
index e73e3c5c5..1a4987f5c 100644
--- a/py/asmx64.h
+++ b/py/asmx64.h
@@ -61,10 +61,13 @@
// condition codes, used for jcc and setcc (despite their j-name!)
#define ASM_X64_CC_JB (0x2) // below, unsigned
+#define ASM_X64_CC_JAE (0x3) // above or equal, unsigned
#define ASM_X64_CC_JZ (0x4)
#define ASM_X64_CC_JE (0x4)
#define ASM_X64_CC_JNZ (0x5)
#define ASM_X64_CC_JNE (0x5)
+#define ASM_X64_CC_JBE (0x6) // below or equal, unsigned
+#define ASM_X64_CC_JA (0x7) // above, unsigned
#define ASM_X64_CC_JL (0xc) // less, signed
#define ASM_X64_CC_JGE (0xd) // greater or equal, signed
#define ASM_X64_CC_JLE (0xe) // less or equal, signed
diff --git a/py/asmx86.h b/py/asmx86.h
index f28040abf..8f1b06d22 100644
--- a/py/asmx86.h
+++ b/py/asmx86.h
@@ -63,10 +63,13 @@
// condition codes, used for jcc and setcc (despite their j-name!)
#define ASM_X86_CC_JB (0x2) // below, unsigned
+#define ASM_X86_CC_JAE (0x3) // above or equal, unsigned
#define ASM_X86_CC_JZ (0x4)
#define ASM_X86_CC_JE (0x4)
#define ASM_X86_CC_JNZ (0x5)
#define ASM_X86_CC_JNE (0x5)
+#define ASM_X86_CC_JBE (0x6) // below or equal, unsigned
+#define ASM_X86_CC_JA (0x7) // above, unsigned
#define ASM_X86_CC_JL (0xc) // less, signed
#define ASM_X86_CC_JGE (0xd) // greater or equal, signed
#define ASM_X86_CC_JLE (0xe) // less or equal, signed