This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
CMP & TEST(for Pentium PC)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: CMP & TEST(for Pentium PC)
- From: yang dot wanlin at mail dot zte dot com dot cn
- Date: Fri, 18 May 2001 11:01:50 +0800
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