Bug 199897 - crtfastmath.o uses i686-only .align expansions
Summary: crtfastmath.o uses i686-only .align expansions
Keywords:
Status: CLOSED DUPLICATE of bug 200330
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-24 06:17 UTC by Miloslav Trmač
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-08-03 09:36:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miloslav Trmač 2006-07-24 06:17:16 UTC
Disclaimer: I have very little experience with the internals of the GNU
toolchain, and this maybe manifests only in qemu; feel free to close NOTABUG.

Version-Release number of selected component (if applicable):
gcc-4.1.1-9

To reproduce: (/sbin/sysctl) crashes with SIGILL on rawhide in qemu.

binutils have recently started using new byte sequences for .align, at least if
the target architecture is i686.  For some reason the i686-only sequence appears
in crtfastmath.o:
  83:   0f ae 95 e4 fd ff ff    ldmxcsr 0xfffffde4(%ebp)
  8a:   66                      data16
  8b:   0f 1f                   (bad)
  8d:   44                      inc    %esp
  8e:   00 00                   add    %al,(%eax)
This byte sequence is currently executed only if SSE is supported, so this
might cause crashes only in qemu - this is the first time I've heard about
them, I don't know.

Unfortunately I can't find a reason why the i686-only sequence is used;
AFAICS (when rebuilding gcc on fc5) crtfastmath.c is compiled with
-march=i386 -mtune=generic.  Is gas perhaps switching to i686 automatically
after encountering an i686-only instruction?

Comment 1 Jakub Jelinek 2006-08-03 09:36:06 UTC
Should be fixed in gcc-4.1.1-14, which has been rebuilt with a fixed assembler.
Anyway, guess qemu should support the nopl insns, if it pretends to be a '6' or
'f' family CPU.

*** This bug has been marked as a duplicate of 200330 ***


Note You need to log in before you can comment on or make changes to this bug.