core/x86/instr.c
/* this is not conservative -- only considers two memory references to
 * be the same if their constituent components (registers, displacement)
 * are the same.
 * different from opnd_same b/c this routine ignores data size!
 */
this is not conservative -- only considers two memory references to
be the same if their constituent components (registers, displacement)
are the same.
different from opnd_same b/c this routine ignores data size!
this is not conservative -- only considers two memory references to be the same if their constituent components ( registers displacement ) are the same . different from opnd_same b / c this routine ignores data size!
bool opnd_same_address(opnd_t op1, opnd_t op2)
{
    if (op1.kind != op2.kind)
        return false;
    if (!opnd_is_memory_reference(op1) || !opnd_is_memory_reference(op2))
    if (opnd_get_segment(op1) != opnd_get_segment(op2))
        return false;
    if (opnd_is_base_disp(op1)) {
        if (!opnd_is_base_disp(op2))
            return false;
        if (opnd_get_base(op1) != opnd_get_base(op2))
            return false;
        if (opnd_get_index(op1) != opnd_get_index(op2))
            return false;
        if (opnd_get_scale(op1) != opnd_get_scale(op2))
            return false;
        if (opnd_get_disp(op1) != opnd_get_disp(op2))
            return false;
    } else {
#ifdef X64        
        CLIENT_ASSERT(opnd_is_abs_addr(op1) || opnd_is_rel_addr(op1),
                      "internal type error in opnd_same_address");
        if (opnd_get_addr(op1) != opnd_get_addr(op2))
            return false;
#else
        CLIENT_ASSERT(false, "internal type error in opnd_same_address");
#endif
    }
    return true;
}
bool opnd_same_address ( opnd_t op1 , opnd_t op2 ) { if ( op1 . kind != op2 . kind ) return false ; if ( ! opnd_is_memory_reference ( op1 ) || ! opnd_is_memory_reference ( op2 ) ) if ( opnd_get_segment ( op1 ) != opnd_get_segment ( op2 ) ) return false ; if ( opnd_is_base_disp ( op1 ) ) { if ( ! opnd_is_base_disp ( op2 ) ) return false ; if ( opnd_get_base ( op1 ) != opnd_get_base ( op2 ) ) return false ; if ( opnd_get_index ( op1 ) != opnd_get_index ( op2 ) ) return false ; if ( opnd_get_scale ( op1 ) != opnd_get_scale ( op2 ) ) return false ; if ( opnd_get_disp ( op1 ) != opnd_get_disp ( op2 ) ) return false ; } else { #ifdef X64 CLIENT_ASSERT ( opnd_is_abs_addr ( op1 ) || opnd_is_rel_addr ( op1 ) , " " ) ; if ( opnd_get_addr ( op1 ) != opnd_get_addr ( op2 ) ) return false ; #else CLIENT_ASSERT ( false , " " ) ; #endif } return true ; }
this is not conservative -- only considers two memory references to
 be the same if their constituent components (registers, displacement)
 are the same.
this is not conservative -- only considers two memory references to be the same if their constituent components ( registers displacement ) are the same .
/* we ignore size */