From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11366 invoked by alias); 13 Aug 2008 17:27:58 -0000 Received: (qmail 11320 invoked by uid 22791); 13 Aug 2008 17:27:54 -0000 X-Spam-Check-By: sourceware.org Received: from mail-gx0-f17.google.com (HELO mail-gx0-f17.google.com) (209.85.217.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 13 Aug 2008 17:27:23 +0000 Received: by gxk10 with SMTP id 10so1103804gxk.8 for ; Wed, 13 Aug 2008 10:27:21 -0700 (PDT) Received: by 10.150.52.10 with SMTP id z10mr95077ybz.130.1218648441321; Wed, 13 Aug 2008 10:27:21 -0700 (PDT) Received: by 10.150.146.12 with HTTP; Wed, 13 Aug 2008 10:27:21 -0700 (PDT) Message-ID: <81784be80808131027n7b90d273i7a95cdb6ce61cce0@mail.gmail.com> Date: Wed, 13 Aug 2008 18:22:00 -0000 From: Miso To: gcc-help@gcc.gnu.org Subject: xadd instruction in 80386 code MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-08/txt/msg00131.txt.bz2 Hi, I have build system (gentoo) based on uclibc for my 80386. System runs ok except of ctorrent and openssl. Ctorrent particularly crash with "Illegal instruction" message. Here is gdb output: Program received signal SIGILL, Illegal instruction. __gnu_cxx::__exchange_and_add (__mem=0xb7f32a8c, __val=1) at atomicity.cc:41 41 atomicity.cc: No such file or directory. in atomicity.cc x/i $pc: 0xb7eff13d <_ZN9__gnu_cxx18__exchange_and_addEPVii+9>: lock xadd %eax,(%edx) backtrace: #0 __gnu_cxx::__exchange_and_add (__mem=0xb7f32a8c, __val=1) at atomicity.cc:41 #1 0xb7ec5b27 in Init (this=0xb7f32adc) at /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libstdc++-v3/src/ios_init.cc:85 #2 0xb7ed43bb in __static_initialization_and_destruction_0 ( __initialize_p=, __priority=-1208800628) at /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/i386-gentoo-linux-uclibc/libstdc++-v3/include/iostream:78 #3 0xb7f08c97 in __do_global_ctors_aux () from /usr/lib/gcc/i386-gentoo-linux-uclibc/4.1.2/libstdc++.so.6 #4 0xb7eb9f75 in _init () from /usr/lib/gcc/i386-gentoo-linux-uclibc/4.1.2/libstdc++.so.6 #5 0xb7f7726d in _dl_get_ready_to_run () from /lib/ld-uClibc.so.0 #6 0xb7f77541 in ?? () from /lib/ld-uClibc.so.0 #7 0xbff36cf0 in ?? () #8 0xb7f74000 in ?? () #9 0xbff36dd4 in ?? () #10 0xbff36e6c in ?? () #11 0xbff36e64 in ?? () #12 0x6fee8a4c in ?? () #13 0xb7f74000 in ?? () #14 0x00000002 in ?? () #15 0x00000000 in ?? () It seems so there is xadd in code, which is 486+ instruction. My make.conf : CFLAGS="-Os -march=i386 -pipe -ggdb" CXXFLAGS="-Os -march=i386 -pipe -ggdb" LDFLAGS="-Wl,-O1" CHOST="i386-gentoo-linux-uclibc" UCLIBC_CPU="386" Gcc version is 4.1.2. What should I do in order to fix this problem? Thanks in advance.