#define SIZE(n)                ((n) << 12)
 #define GETSIZE(w)     ((w) >> 12)
 
+#define GETTYPE(t)     ((t) & INSTR_TYPE_MASK)
+
 #define MKOP(t, f, s)  ((t) | (f) | SIZE(s))
 
 struct instruction_op {
 
        if (r < 0)
                return -EINVAL;
 
-       type = op.type & INSTR_TYPE_MASK;
+       type = GETTYPE(op.type);
        if (!OP_IS_LOAD_STORE(type)) {
                if (op.type != CACHEOP + DCBZ)
                        return -EINVAL;
 
        unsigned long next_pc;
 
        next_pc = truncate_if_32bit(regs->msr, regs->nip + 4);
-       switch (op->type & INSTR_TYPE_MASK) {
+       switch (GETTYPE(op->type)) {
        case COMPUTE:
                if (op->type & SETREG)
                        regs->gpr[op->reg] = op->val;
 
        err = 0;
        size = GETSIZE(op->type);
-       type = op->type & INSTR_TYPE_MASK;
+       type = GETTYPE(op->type);
        cross_endian = (regs->msr & MSR_LE) != (MSR_KERNEL & MSR_LE);
        ea = truncate_if_32bit(regs->msr, op->ea);
 
        }
 
        err = 0;
-       type = op.type & INSTR_TYPE_MASK;
+       type = GETTYPE(op.type);
 
        if (OP_IS_LOAD_STORE(type)) {
                err = emulate_loadstore(regs, &op);