public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Miso <klampiar@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: xadd instruction in 80386 code
Date: Wed, 13 Aug 2008 18:22:00 -0000	[thread overview]
Message-ID: <81784be80808131027n7b90d273i7a95cdb6ce61cce0@mail.gmail.com> (raw)

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=<value optimized out>, __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.

                 reply	other threads:[~2008-08-13 17:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81784be80808131027n7b90d273i7a95cdb6ce61cce0@mail.gmail.com \
    --to=klampiar@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).