base/asm-common.h, ...: Add missing `cmov' instruction (and `.CC' variants).
[catacomb] / base / asm-common.h
index 18c61fc..323f2e8 100644 (file)
@@ -1114,6 +1114,11 @@ name:
 .macro endprologue
 .endm
 
+// cmov RD, RN, CC: set RD to RN if CC is satisfied, otherwise do nothing
+.macro cmov    rd, rn, cc
+       csel    \rd, \rn, \rd, \cc
+.endm
+
 // Notational improvement: write `csel.CC' etc., rather than `csel ..., CC'.
 #define _COND(_)                                                       \
        _(eq) _(ne) _(cs) _(cc) _(vs) _(vc) _(mi) _(pl)                 \
@@ -1121,7 +1126,7 @@ name:
        _(hs) _(lo)
 #define _INST(_)                                                       \
        _(ccmp) _(ccmn)                                                 \
-       _(csel)                                                         \
+       _(csel) _(cmov)                                                 \
        _(csinc) _(cinc) _(cset)                                        \
        _(csneg) _(cneg)                                                \
        _(csinv) _(cinv) _(csetm)