i386 - subtle bug with asm volatile constraints
Markus F.X.J. Oberhumer
markus.oberhumer@jk.uni-linz.ac.at
Fri Apr 9 01:06:00 GMT 1999
Jeff,
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.
gcc -v:
Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.91.60/specs
gcc version egcs-2.91.60 Debian 2.1 (egcs-1.1.1 release)
I've also got a report in the meantime that the bug is visible
with snapshot 0328 as well.
Markus
On 09-Apr-99 Jeffrey A Law wrote:
>
> In message <XFMail.990401091916.markus.oberhumer@jk.uni-linz.ac.at>you
> write:
> > I originally had sent this report to the linux-kernel mailing list
> > because I suspected a problem with some asm volatile statement,
> > but it looks like this is indeed a gcc bug.
> >
> > The bug as triggered by the test program attached below can
> > be reproduced at least with gcc 2.7.2, egcs 1.1.1 and egcs 1.1.2.
> >
> > The result of this bug is the generation of wrong code.
> >
> I tried your test program and it did not exhibit the behavior you suggested
> (missing int $0x80) when defining EAX to "0".
>
> I think you need to do some more investigation into the bug, possibly
> providing either a new testcase or enough analysis of the problem so that
> we can identify precisely what part of the compiler is broken and correct it.
>
> jeff
>
----- 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
More information about the Gcc-bugs
mailing list