public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: lupus@debian.org To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: other/7329: fixed or forbidden register bug (and test case) Date: Tue, 16 Jul 2002 08:26:00 -0000 [thread overview] Message-ID: <20020716151828.801DA253B2@luna.wolf.it> (raw) >Number: 7329 >Category: other >Synopsis: fixed or forbidden register bug (and test case) >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Jul 16 08:26:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Paolo Molaro >Release: 3.1.1 20020703 (Debian prerelease) (Debian testing/unstable) >Organization: Ximian >Environment: System: Linux luna 2.4.19-pre5 #1 Tue Apr 2 11:33:31 CEST 2002 i686 unknown unknown GNU/Linux Architecture: i686 host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux The same happens also with gcc 2.7.2 and gcc 2.95.4: gcc -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs gcc version 2.95.4 20011002 (Debian prerelease) gcc272 -v Reading specs from /usr/lib/gcc-lib/i386-linux/2.7.2.3/specs gcc version 2.7.2.3 >Description: As part of the mono project we build a library that needs to detect the x86 processor features. The provided function is compiled correctly when building a static library, but the compilation fails when building a shared library. Until the bug is fixed it would be nce to know if there is a different workaround. Thanks. >How-To-Repeat: Save the following code to a file name cp.c and compile enabling PIC: static int cpuid (int id, int* p_eax, int* p_ebx, int* p_ecx, int* p_edx) { __asm__ __volatile__ ("cpuid" : "=a" (*p_eax), "=b" (*p_ebx), "=c" (*p_ecx), "=d" (*p_edx) : "a" (id)); return 1; } and compile it with: gcc272 -c -fPIC cp.c error: cp.c: In function `cpuid': cp.c:9: fixed or forbidden register was spilled. This may be due to a compiler bug or to impossible asm statements or clauses. gcc-3.1 -c -fPIC cp.c error: cp.c: In function `cpuid': cp.c:5: can't find a register in class `BREG' while reloading `asm' gcc-2.95 -c -fPIC cp.c error: cp.c: In function `cpuid': cp.c:7: Invalid `asm' statement: cp.c:7: fixed or forbidden register 3 (bx) was spilled for class BREG. >Fix: Compile without -fPIC and it builds fine. I tryed compiling with different -O options to no avail. >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-07-16 15:26 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-16 8:26 lupus [this message] 2002-12-09 16:12 ehrhardt
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=20020716151828.801DA253B2@luna.wolf.it \ --to=lupus@debian.org \ --cc=debian-gcc@lists.debian.org \ --cc=gcc-gnats@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: linkBe 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).