public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: hjl@lucon.org (H.J. Lu)
To: mikeg@weiden.de (Michael L. Galbraith)
Cc: alan@spri.levels.unisa.edu.au, gas2@cygnus.com, egcs@cygnus.com,
	libc-linux@gnu.org (GNU C Library),
	gcc2@cygnus.com
Subject: Re: gcc generates invalid i386 fmulp
Date: Tue, 14 Apr 1998 20:44:00 -0000	[thread overview]
Message-ID: <m0yPJ74-00059BC@ocean.lucon.org> (raw)
In-Reply-To: <Pine.LNX.3.95.980415045709.450A-100000@mikeg.weiden.de>

> 
> On Wed, 15 Apr 1998, Alan Modra wrote:
> 
> > >hjl@lucon.org (H.J. Lu):
> > > > For anyone who's interested, the gas patches can be found at
> > > > ftp://mullet.levels.unisa.edu.au/private/teabag/gas-980407-alan.diff.gz
> > > > They should apply to binutils-2.9 without problems too.
> > > > 
> > > > The gcc problem (found by mikeg@weiden.de (Michael L. Galbraith)),
> > > > when compiling glibc2 is that gcc will generate instructions like
> > > > 	`fsubp %st(1),%st'
> > > > 
> > > 
> > > Can you show me a small test case please? It is very tricky. Here are
> > > the ChangeLog entries:
> > > [deleted]
> > 
> > Yes, I know it's tricky.  Basically, Unixware got their assembler
> > wrong, and we're stuck with an inconsistent syntax.  A test case for
> > fmulp is glibc-2.0.6/sysdeps/libm-ieee754/s_nextafterf.c.  I put the
> > preprocessed file at
> > ftp://mullet.levels.unisa.edu.au/private/teabag/s_nextafterf.i
> > Mike Galbraith may be able to give you a .i file for the fsubp case;
> > I didn't have the right version of glibc.
> > 
> 
> I can generate a .i file if H.J wants it, but the fsubp %st(1), %st
> instances are human generated. (3 .S files)
> 

When you write x86 fp asm code, you have to know what you are doing.
It is very very tricky since the x86 fp asm syntax is very very very
different from Intel and it doesn't make much sense sometimes. But
it is the way how AT&T did it years ago. I don't think it can be easily
fixed. You can use "objdump -d" to check opcode against the Intel
reference manual if you are not familar with the A&T x86 asm syntax.


-- 
H.J. Lu (hjl@gnu.org)

  parent reply	other threads:[~1998-04-14 20:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-14  0:15 Alan Modra
1998-04-14  8:19 ` H.J. Lu
1998-04-14 16:45   ` Alan Modra
1998-04-14 20:18     ` Michael L. Galbraith
1998-04-14 20:30       ` H.J. Lu
1998-04-14 21:35         ` Michael L. Galbraith
1998-04-14 20:44       ` H.J. Lu [this message]
1998-04-15  7:18   ` Alan Modra
1998-04-15  9:01     ` Robert Lipe
1998-04-15 10:05       ` Ulrich Drepper

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=m0yPJ74-00059BC@ocean.lucon.org \
    --to=hjl@lucon.org \
    --cc=alan@spri.levels.unisa.edu.au \
    --cc=egcs@cygnus.com \
    --cc=gas2@cygnus.com \
    --cc=gcc2@cygnus.com \
    --cc=libc-linux@gnu.org \
    --cc=mikeg@weiden.de \
    /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).