nolp instruction and i686 cpus

Adam Golebiowski adamg at
Sat Dec 18 15:35:17 CET 2010


Some of the i686 compatible cpus (VIA C3 Nehemiah [0], AMD Geode LX, 
Transmeta Cruose, probably others) lack support for the NOLP instruction 
(optional for i686).

Unfortunately there was a wrong assumption about NOLP in binutils for a 
while, resulting in glibc (and probably other packages) misusing NOLP 
when they shouldn't:

[root at rescue /]# chroot /mnt/
Illegal instruction
[root at rescue /]#

(this is a Nehemiah machine).

This has been fixed in binutils a while ago [1], [2], and 
binutils- seems to behave properly:

[adamg at carme-pld-i686 nopl]$ cat nopl.s
cmove %eax,%edx
.align 8
[adamg at carme-pld-i686 nopl]$

[adamg at carme-pld-i686 nopl]$ cat
for arch in i686 pentium4; do
         for tune in i686 pentium4; do
                 echo "=> --march=$arch --mtune=$tune"
                 as --32 --march=$arch --mtune=$tune nopl.s
                 objdump -dr a.out | grep nopl
[adamg at carme-pld-i686 nopl]$ ./
=> --march=i686 --mtune=i686
=> --march=i686 --mtune=pentium4
=> --march=pentium4 --mtune=i686
    3:   0f 1f 44 00 00          nopl   0x0(%eax,%eax,1)
=> --march=pentium4 --mtune=pentium4
    3:   0f 1f 44 00 00          nopl   0x0(%eax,%eax,1)
[adamg at carme-pld-i686 nopl]$

With our current optflags (--march=i686 --mtune=pentium4) we should be 
safe, so all that's left is to recompile glibc and some unknown number 
of other packages - on carme-i686 I found libggi to be affected as well.

I realize there's probably a handful of users affected by this, and 
eventually the problem will be solved during usual rebuilding of 
affected packages but it would be nice to be able to install th-i686 on 
this machine sooner than later.

Glibc does not compile at this moment [3], which should be fixed anyway. 
Any help with this will be greatly appreciated:

CPP='i686-pld-linux-gcc -E -x c-header' 
/home/users/builder/rpm/BUILD/glibc-2.12.1/builddir/sunrpc/rpcgen -Y 
../scripts -c rpcsvc/nlm_prot.x -o /home/
Memory fault
make[2]: *** 
Error 139


[0] Some of the VIA C3s also don't support CMOV but this is not the case.


More information about the pld-devel-en mailing list