When compiling applications with inline assembly (mostly mmx/sse/3dnow) the compiler bails out with this error (or close to it): can't find a register in class `BREG' while reloading `asm' attached is the code that gives the error, thoug this example is only polling the cpu for vender identification. uname info: Linux Dark 2.6.1-gentoo-r1 #1 Tue Jan 13 15:47:31 PST 2004 i686 AMD Athlon(tm) Processor AuthenticAMD GNU/Linux (nptl enabled) gcc -v info: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs Configured with: /var/tmp/portage/gcc-3.3.2-r5/work/gcc-3.3.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib --enable-interpreter --enable-java-awt=xlib --with-x --disable-multilib Thread model: posix gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) The command to invoke the error is: gcc -DHAVE_CONFIG_H -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include cpu-accel.c attached are all the files needed to reproduce the error.
Created attachment 24250 [details] code to reproduce the error
uhh, is this your source code ? cause it works over here ;) root@vapier 0 f # gcc -DHAVE_CONFIG_H -I../.. -I../.. -I../../app -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include cpu-accel.c -c root@vapier 0 f # could you include some `emerge info` like the bug reporting page says to ? chances are you should take -fPIC out of your CFLAGS :P
you either have hardened-gcc installed or fPIC in your CFLAGS remove both please if any and report back, thanks, Alex ;-)
yes, the issue was hardened-gcc. Somehow the default gcc profile disapeared, and an unmerge of hardened-gcc failed to leave a valid profile. luckly, i found a binary and was able to remove hcc. bug should be closed.