public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Robert Lipe <robertl@dgii.com>
To: "H.J. Lu" <hjl@lucon.org>
Cc: gas2@cygnus.com
Subject: Re: pushl computed immediate address on 2.8.1
Date: Fri, 09 Jan 1998 23:02:00 -0000	[thread overview]
Message-ID: <19980110010126.03024@dgii.com> (raw)
In-Reply-To: <m0xqskW-0004ecC@ocean.lucon.org>

Re: Test case containing cryptic assembler to exercise a GAS problem.

> > // This is the aproach that works, and is what GCC should emit.
> > // registers
> > 	leal .LC0@GOTOFF(%ebx),%eax
> > 	pushl %eax
> > 	call printf@PLT
> > 
> > // This what GCC does emit, but seems to be nonsensical.
> > // assembler.
> > 	pushl $.LC0@GOTOFF(%ebx)
> > 	call printf@PLT
> > 
> 
> Which gcc are you using? How did you get gcc to emit that?

We have to try really hard. :-)

I can see this behaviour specifically on EGCS 1.0.1 under g77
when targeted for i586-pc-sco3.2v5.0.4.  It does not equate 
exactly to the test case that I submitted to the GAS2 list as 
I was trying to show an assembler problem, not the gcc problem.
As an aside, Richard Henderson did take an interest just this
morning in solving the gcc problem.   See the thread at:
	http://www.cygnus.com/ml/egcs/1998-Jan/0208.html
	

Looking at the example I gave more, I implied that this was from 
"hello world" compiled as PIC.    This was wrong.   I apologize.
I grafted the failure from a f77 test case into a C hello world 
and didn't make that clear.   I was focusing on the gas issue on 
this list and the gcc issues in the egcs list.   In trying to 
simplify the gas test case, I obscured the actual case where 
gcc/egcs would emit this.

You can see one real example of this failure by running g77 with -fPIC 
and -O3:

$ g77 -O3 -fPIC /play/egcs/gcc/testsuite/g77.f-torture/execute/short.f -o /tm>
/usr/tmp/cca003D7.s:136:syntax error at (
/usr/tmp/cca003D7.s:151:syntax error at (
/usr/tmp/cca003D7.s:162:syntax error at (
/usr/tmp/cca003D7.s:173:syntax error at (
(robertl) rjlhome:/play/egcs/gcc/testsuite/g77.f-torture/execute
$ g77 --version
egcs-2.90.23 980102 (egcs-1.0.1 release)

The lines it wails about are of the form:
        pushl $.LC4@GOTOFF(%ebx)

The assembler in the case above is not  GAS.  It's the OpenServer 5.0.4
assembler.     GAS should complain about this as well.


Does EGCS 1.0.1 for GNU/Linux for x86 really emit something different,
or did you get tripped up in my obscurity in the test case?  If so, I'm
sorry to have wasted your time.

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com

  reply	other threads:[~1998-01-09 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-02 12:41 Robert Lipe
1998-01-02 13:06 ` Ian Lance Taylor
1998-01-02 13:26   ` Robert Lipe
1998-01-09 20:42 ` H.J. Lu
1998-01-09 23:02   ` Robert Lipe [this message]
1998-01-10 14:25     ` H.J. Lu

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=19980110010126.03024@dgii.com \
    --to=robertl@dgii.com \
    --cc=gas2@cygnus.com \
    --cc=hjl@lucon.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).