This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

CMP & TEST(for Pentium PC)


What deffrient with CMP and TEST?

p1:
    movl         8(%ebp),%eax
    movw         6(%eax),%dx
    andl         %edx,0x0000ffff /* (%edx) = 0 */
    test         %edx,%edx /* (%eflag = 0x206 */
    jne          .L8 /* ok, not go to .L8 */
     .
     .
     .

p2:
    movl         8(%ebp),%eax
    movw         6(%eax),%dx
    andl         %edx,0x0000ffff /* (%edx) = 0 */
    cmp          %edx,0          /* (%eflag = 0x246 */
    jne          .L8             /* bad, go to .L8 */
     .
     .
     .



(Embedded image moved to file: pic22593.gif)

Compuserve GIF


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]