+} while (0)
+
+#define emith_add_r_imm(r, imm) \
+ emith_arith_r_imm(0, r, imm)
+
+#define emith_or_r_imm(r, imm) \
+ emith_arith_r_imm(1, r, imm)
+
+#define emith_adc_r_imm(r, imm) \
+ emith_arith_r_imm(2, r, imm)
+
+#define emith_sbc_r_imm(r, imm) \
+ emith_arith_r_imm(3, r, imm) // sbb
+
+#define emith_and_r_imm(r, imm) \
+ emith_arith_r_imm(4, r, imm)
+
+#define emith_sub_r_imm(r, imm) \
+ emith_arith_r_imm(5, r, imm)
+
+#define emith_eor_r_imm(r, imm) \
+ emith_arith_r_imm(6, r, imm)
+
+#define emith_cmp_r_imm(r, imm) \
+ emith_arith_r_imm(7, r, imm)
+
+#define emith_tst_r_imm(r, imm) do { \
+ EMIT_OP_MODRM(0xf7, 3, 0, r); \
+ EMIT(imm, u32); \
+} while (0)
+
+// fake
+#define emith_bic_r_imm(r, imm) \
+ emith_arith_r_imm(4, r, ~(imm))
+
+// fake conditionals (using SJMP instead)
+#define emith_move_r_imm_c(cond, r, imm) { \
+ (void)(cond); \
+ emith_move_r_imm(r, imm); \
+}
+
+#define emith_add_r_imm_c(cond, r, imm) { \
+ (void)(cond); \
+ emith_add_r_imm(r, imm); \
+}
+
+#define emith_sub_r_imm_c(cond, r, imm) { \
+ (void)(cond); \
+ emith_sub_r_imm(r, imm); \
+}
+
+#define emith_or_r_imm_c(cond, r, imm) \
+ emith_or_r_imm(r, imm)
+#define emith_eor_r_imm_c(cond, r, imm) \
+ emith_eor_r_imm(r, imm)
+#define emith_bic_r_imm_c(cond, r, imm) \
+ emith_bic_r_imm(r, imm)
+#define emith_ror_c(cond, d, s, cnt) \
+ emith_ror(d, s, cnt)
+
+#define emith_read_r_r_offs_c(cond, r, rs, offs) \
+ emith_read_r_r_offs(r, rs, offs)
+#define emith_write_r_r_offs_c(cond, r, rs, offs) \
+ emith_write_r_r_offs(r, rs, offs)
+#define emith_read8_r_r_offs_c(cond, r, rs, offs) \
+ emith_read8_r_r_offs(r, rs, offs)
+#define emith_write8_r_r_offs_c(cond, r, rs, offs) \
+ emith_write8_r_r_offs(r, rs, offs)
+#define emith_read16_r_r_offs_c(cond, r, rs, offs) \
+ emith_read16_r_r_offs(r, rs, offs)
+#define emith_write16_r_r_offs_c(cond, r, rs, offs) \
+ emith_write16_r_r_offs(r, rs, offs)
+#define emith_jump_reg_c(cond, r) \
+ emith_jump_reg(r)
+#define emith_jump_ctx_c(cond, offs) \
+ emith_jump_ctx(offs)
+#define emith_ret_c(cond) \
+ emith_ret()
+
+// _r_r_imm
+#define emith_add_r_r_imm(d, s, imm) { \
+ if (d != s) \
+ emith_move_r_r(d, s); \
+ emith_add_r_imm(d, imm); \
+}
+
+#define emith_and_r_r_imm(d, s, imm) { \
+ if (d != s) \
+ emith_move_r_r(d, s); \
+ emith_and_r_imm(d, imm); \