From mboxrd@z Thu Jan 1 00:00:00 1970 From: mycroft@gnu.ai.mit.edu To: dj@stealth.ctron.com Cc: gas2@cygnus.com, hjl@nynexst.com, masaki@eie.minolta.co.jp, raeburn@cygnus.com Subject: Re: [masaki@eie.monolta.co.jp: GAS bug and etc] Date: Fri, 11 Nov 1994 13:42:00 -0000 Message-id: <9411112139.AA00683@goldman.gnu.ai.mit.edu> X-SW-Source: 1994/msg00193.html The problem with using the 16-bit jcxz is that, even if the offset is small, if the target isn't in the first 64K of memory, the program is toast. The reason is that %eip is masked to 0x0000ffff AFTER adding the offset. The comment you're referring to: rel16/32 indicates that these instructions map to two; one with a 16-bit relative displacement, the other with a 32-bit relative displacement, depending on the operand-size attribute of the instruction. only applies to the `rel16/32' versions of the conditional jump instructions. The JCXZ and JECXZ instructions do not allow 16- or 32-bit displacements. The `Operation' section for that instruction should be more clear. BTW, why are you using JCXZ or JECXZ at all? The equivalent sequence: testl %ecx,%ecx jz ... is the same speed on the 386, but faster on the Pentium (and probably the 486, but I don't have those timing specs).