This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: i386 - subtle bug with asm volatile constraints
- To: law at cygnus dot com
- Subject: Re: i386 - subtle bug with asm volatile constraints
- From: "Markus F.X.J. Oberhumer" <markus dot oberhumer at jk dot uni-linz dot ac dot at>
- Date: Tue, 13 Apr 1999 09:42:12 +0200 (CEST)
- Cc: ml1050 at freemail dot c3 dot hu, egcs-bugs at egcs dot cygnus dot com
- Reply-To: markus dot oberhumer at jk dot uni-linz dot ac dot at
- Return-Read-To: markus.oberhumer@jk.uni-linz.ac.at
- Return-Received-To: markus.oberhumer@jk.uni-linz.ac.at
On 13-Apr-99 Jeffrey A Law wrote:
> > > > below you will find a new test.c and the output from
> > > > gcc '-DEAX="a"' -O2 -S -o test_a.s test.c
> > > > and
> > > > gcc '-DEAX="0"' -O2 -S -o test_0.s test.c
> > > >
> > > > You will see that missing `int $80' problem when you run a diff
> > > > between test_a.s and test_0.s.
> > > Still no good. I don't get any missing int $80 instructions.
> >
> > This is somewhat surprising - does this mean that your version
> > generates identical code (as it should be) ?
>
> No. But the int80s are the same. The differences were not relavent to the
> correct operation of the code.
My previous mail to egcs-bugs also contains both assembler output files as
generated on my machine. They are identical except 2 missing `int $80'.
If you can't reproduce this behaviour using the compile statements above
then you should get identical output because hte EAX="0" and EAX="a"
constraints are equivalent in this test program.
> > I can spot the missing basic blocks in test.c.jump2 and test.c.stack, but
> > as I'm completely unfamiliar with gcc internals (and RTL) this about
> > all I can tell. test.c.greg also seems to contain some interesting
> > differences.
>
> It's not the differences that you need to look for. You need to look for the
> first dump which does not have the proper number of int80 instructions. The
> differences between dumps are not interesting for this problem.
I've compiled with -dap -DEAX="0" in one directory and with -dap -DEAX="a" in
another directory and run a diff on the two directories. And I can spot
the missing `int $80' basic blocks in the -DEAX="0" case in the .jump2 and
.stack files (as compared to the -DEAX="a" version).
> > Well, I could mail you the intermediate -dap files of both versions, but
> > this might not be very useful unless you can reproduce the problem.
> > Any suggestions on how to procede ?
>
> You're going to have to do the debugging on this -- I've already wasted too
> much time on a wild goose chase.
I'm sorry to waste anybodys time, either by unclear instructions or because
the bug might be fixed in the latest snapshot, but unfortunately I am not
able to debug this any deeper as I don't know anything about gcc internals.
All I can tell you that this code generation problem is reproducible
on my machine with both egcs 1.1.1 and gcc 2.7.2, and reportedly with
a March egcs snapshot as well. Maybe someone else on this list can
find out what is happening here.
Markus
----- Markus F.X.J. Oberhumer <markus.oberhumer@jk.uni-linz.ac.at> -----
----- http://wildsau.idv.uni-linz.ac.at/mfx/ -----
----- 5E CB 5C 85 DE AF 9E BF E9 DA 7E 6A 39 F8 CC 67 -----
3 WARPS TO URANUS