Date: Thu, 13 Oct 1994 08:21:58 +0100 From: terra AT diku DOT dk To: dj AT stealth DOT ctron DOT com Cc: babcock AT cfa DOT harvard DOT edu, buers AT dg1 DOT chemie DOT uni-konstanz DOT de, djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Intel's Manuals on Conditional Jumps Like Jcxz Hi! There seem to be some confusion about the movedata.s bug. Let me first say that it *is* a bug and has *nothing* to do with recompilation of the libraries. The Intel manuals say that the operation is if then eip = eip + signextend(rel8/rel16/rel32) if then eip = eip & 0000FFFFh modulo my memory. Note that it is the *operand size* (not the address size, not the size of the relative address) that determines whether the high bits are masked. This means that "Jcxz" (not "Jecxz") is no good in 32-bit programs. (And by the way, there is no Jcxz that has a 16-bit or 32-bit relative address.) In libc.a you will twice find the sequence 66 E2? 02 Jcxz over ?? ?? Rep movs? over: ... Note that the operand size prefix (66) is present (to select cx over ecx) and that the high bits are therefore masked. That is bad, and incidently: "jz over" would have worked just find. I hope I have spread some light. Morten Welinder terra AT diku DOT dk