continue using is_class helper
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 18 Oct 2009 08:41:14 +0000 (12:41 +0400)
committerCyrill Gorcunov <gorcunov@gmail.com>
Sun, 18 Oct 2009 08:41:14 +0000 (12:41 +0400)
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
assemble.c
disasm.c

index 821f019..ca2b909 100644 (file)
@@ -2557,7 +2557,7 @@ static void add_asp(insn *ins, int addrbits)
     }
 
     for (j = 0; j < ins->operands; j++) {
-       if (!(MEMORY & ~ins->oprs[j].type)) {
+       if (is_class(MEMORY, ins->oprs[j].type)) {
            opflags_t i, b;
 
            /* Verify as Register */
index ede485a..561851a 100644 (file)
--- a/disasm.c
+++ b/disasm.c
@@ -1180,7 +1180,7 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
                        /* If it's a mem-only EA but we have a
                           register, die. */
                        ((tmp_ins.oprs[i].segment & SEG_RMREG) &&
-                        !(MEMORY & ~(*p)->opd[i])) ||
+                        is_class(MEMORY, (*p)->opd[i])) ||
                        /* If it's a reg-only EA but we have a memory
                           ref, die. */
                        (!(tmp_ins.oprs[i].segment & SEG_RMREG) &&
@@ -1343,7 +1343,7 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
                          o->disp_size == 32 ? "dword " :
                          o->disp_size == 16 ? "word " : ""), offs);
             segover = NULL;
-        } else if (!(REGMEM & ~t)) {
+        } else if (is_class(REGMEM, t)) {
             int started = false;
             if (t & BITS8)
                 slen +=