From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Meissner To: hjl@nynexst.com Cc: gas2@cygnus.com Subject: An old gas bug Date: Wed, 17 Aug 1994 06:08:00 -0000 Message-id: <9408171307.AA00342@pasta.osf.org> References: <9408162303.AA17808@titanic.nynexst.com> <9408162303.AA17808@titanic.nynexst.com> X-SW-Source: 1994/msg00070.html | Hi, | | This is a very old bug date back to 1.38.1. The reason no one really | cares is gcc won't generate that kind of code, i.e., jump out of range. | When some Linux people were working on X11R5, they used an Intel x86 | branch/loop instruction, jcxz, which has only byte displacements in | the hand coded asm code. The AT&T as worked fine with expansion. But | gas 1.38.1 generated some bogus codes. I fixed the bug for them. I | think it is correct. The test case is very easy to produce. Please let | me know if you need one. While it should be certainly fixed in the assembler, the X11 code should also replace the jcxz instruction with a compare against 0 and jmp sequence, since that is faster on anything but an original 386. See the optimization guides in the 486/pentium manuals.