public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* binutils 2.9 is broken on x86
       [not found] <Pine.A32.3.95.980408111418.23610A-100000@ltoi.iap.physik.tu-darmstadt.de>
@ 1998-04-08 11:01 ` H.J. Lu
  1998-04-08 11:05   ` Ian Lance Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: H.J. Lu @ 1998-04-08 11:01 UTC (permalink / raw)
  To: Peter Schmid; +Cc: egcs, Ian Lance Taylor, gas2

> 
> These are the testsuite results for egcs-2.91.22 on the
> i386-pc-linux-gnulibc1 system. I had to add --disable-nls to configure
> to compile egcs. What about making --disable-nls a default option for
> the texinfo configure?
> 
> Peter Schmid
> 
> gcc:
> gcc.sum:FAIL: gcc.c-torture/compile/980329-1.c,  -O2 
> /tmp/cca17739.s: Assembler messages:
> /tmp/cca17739.s:75: Error: register does not match opcode suffix
> 

binutils 2.9 is broken on x86. It silently turns

incb %di

into

incl   %edi

Although my binutils chokes on it, however it didn't generate
bogus opcode. I will make binutils 2.8.1.0.30 to fix it. In
the meantime, please don't go back to old binutils.

Ian, please don't make 2.9 as is. It turns out my worry comes
true. My x86 patch seems quite useful.

Thanks.

H.J.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 11:01 ` binutils 2.9 is broken on x86 H.J. Lu
@ 1998-04-08 11:05   ` Ian Lance Taylor
  1998-04-08 11:15     ` H.J. Lu
  1998-04-08 12:19     ` H.J. Lu
  0 siblings, 2 replies; 8+ messages in thread
From: Ian Lance Taylor @ 1998-04-08 11:05 UTC (permalink / raw)
  To: hjl; +Cc: schmid, egcs, gas2

   From: hjl@lucon.org (H.J. Lu)
   Date: Wed, 8 Apr 1998 11:01:08 -0700 (PDT)

   > These are the testsuite results for egcs-2.91.22 on the
   > i386-pc-linux-gnulibc1 system. I had to add --disable-nls to configure
   > to compile egcs. What about making --disable-nls a default option for
   > the texinfo configure?
   > 
   > Peter Schmid
   > 
   > gcc:
   > gcc.sum:FAIL: gcc.c-torture/compile/980329-1.c,  -O2 
   > /tmp/cca17739.s: Assembler messages:
   > /tmp/cca17739.s:75: Error: register does not match opcode suffix

This is an error which H.J. added to his version of the binutils.  It
is not yet in the GNU binutils.

   binutils 2.9 is broken on x86. It silently turns

   incb %di

   into

   incl   %edi

   Although my binutils chokes on it, however it didn't generate
   bogus opcode. I will make binutils 2.8.1.0.30 to fix it. In
   the meantime, please don't go back to old binutils.

   Ian, please don't make 2.9 as is. It turns out my worry comes
   true. My x86 patch seems quite useful.

Although H.J. doesn't mention it, gas has behaved this way for many
years.

I do not plan to delay the 2.9 release to change this behaviour.  The
potential bad consequences of adding errors, and thus failing to
assemble existing code, are serious.  Turning `incb %di' into `incl
%edi' will almost always be harmless.

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 11:05   ` Ian Lance Taylor
@ 1998-04-08 11:15     ` H.J. Lu
  1998-04-08 12:19     ` H.J. Lu
  1 sibling, 0 replies; 8+ messages in thread
From: H.J. Lu @ 1998-04-08 11:15 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: schmid, egcs, gas2

> 
>    From: hjl@lucon.org (H.J. Lu)
>    Date: Wed, 8 Apr 1998 11:01:08 -0700 (PDT)
> 
>    > These are the testsuite results for egcs-2.91.22 on the
>    > i386-pc-linux-gnulibc1 system. I had to add --disable-nls to configure
>    > to compile egcs. What about making --disable-nls a default option for
>    > the texinfo configure?
>    > 
>    > Peter Schmid
>    > 
>    > gcc:
>    > gcc.sum:FAIL: gcc.c-torture/compile/980329-1.c,  -O2 
>    > /tmp/cca17739.s: Assembler messages:
>    > /tmp/cca17739.s:75: Error: register does not match opcode suffix
> 
> This is an error which H.J. added to his version of the binutils.  It
> is not yet in the GNU binutils.
> 
>    binutils 2.9 is broken on x86. It silently turns
> 
>    incb %di
> 
>    into
> 
>    incl   %edi
> 
>    Although my binutils chokes on it, however it didn't generate
>    bogus opcode. I will make binutils 2.8.1.0.30 to fix it. In
>    the meantime, please don't go back to old binutils.
> 
>    Ian, please don't make 2.9 as is. It turns out my worry comes
>    true. My x86 patch seems quite useful.
> 
> Although H.J. doesn't mention it, gas has behaved this way for many
> years.
> 
> I do not plan to delay the 2.9 release to change this behaviour.  The
> potential bad consequences of adding errors, and thus failing to
> assemble existing code, are serious.  Turning `incb %di' into `incl
> %edi' will almost always be harmless.

I am not sure about it. There is no "incb %di" in Intel x86
instrucntion set. It should be either "incw %di" or "incl %edi".
I am not sure if they are the same. In that case, I don't know
why egcs emits "incb %di". It doesn't look right.


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 11:05   ` Ian Lance Taylor
  1998-04-08 11:15     ` H.J. Lu
@ 1998-04-08 12:19     ` H.J. Lu
  1998-04-08 13:23       ` Robert Lipe
  1 sibling, 1 reply; 8+ messages in thread
From: H.J. Lu @ 1998-04-08 12:19 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: schmid, gas2, egcs

>    > gcc:
>    > gcc.sum:FAIL: gcc.c-torture/compile/980329-1.c,  -O2 
>    > /tmp/cca17739.s: Assembler messages:
>    > /tmp/cca17739.s:75: Error: register does not match opcode suffix
> 
> This is an error which H.J. added to his version of the binutils.  It
> is not yet in the GNU binutils.

It is not an error in my binutils.

> 
>    binutils 2.9 is broken on x86. It silently turns
> 
>    incb %di
> 
>    into
> 
>    incl   %edi
> 
>    Although my binutils chokes on it, however it didn't generate
>    bogus opcode. I will make binutils 2.8.1.0.30 to fix it. In
>    the meantime, please don't go back to old binutils.
> 
>    Ian, please don't make 2.9 as is. It turns out my worry comes
>    true. My x86 patch seems quite useful.
> 
> Although H.J. doesn't mention it, gas has behaved this way for many
> years.
> 
> I do not plan to delay the 2.9 release to change this behaviour.  The
> potential bad consequences of adding errors, and thus failing to
> assemble existing code, are serious.  Turning `incb %di' into `incl
> %edi' will almost always be harmless.
> 

I guess it is ok for short term. If I am correct, as on SCO doesn't
like it either. My egcs patch should fix gcc.c-torture/compile/980329-1.c
on SCO too. That is a real bug in egcs. But the current gas doesn't
catch it. Mine and as on SCO do.


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 12:19     ` H.J. Lu
@ 1998-04-08 13:23       ` Robert Lipe
  1998-04-08 13:30         ` H.J. Lu
  1998-04-08 13:42         ` Ian Lance Taylor
  0 siblings, 2 replies; 8+ messages in thread
From: Robert Lipe @ 1998-04-08 13:23 UTC (permalink / raw)
  To: H.J. Lu, Ian Lance Taylor; +Cc: schmid, gas2, egcs

> >    > gcc.sum:FAIL: gcc.c-torture/compile/980329-1.c,  -O2 
> >    > /tmp/cca17739.s: Assembler messages:
> >    > /tmp/cca17739.s:75: Error: register does not match opcode suffix
> 
> I guess it is ok for short term. If I am correct, as on SCO doesn't
> like it either. My egcs patch should fix gcc.c-torture/compile/980329-1.c
> on SCO too. That is a real bug in egcs. But the current gas doesn't
> catch it. Mine and as on SCO do.

(SCO makes a couple of different operating systems.  I'm commenting 
on OpenServer 5.0.4.)

As luck would have it, I just happen to have handy an egcs build tree
with GNU as wired into it.

(robertl) rjlhome:/play/negcs/gcc
$ ./xgcc -mcoff -B./ -O3 /tmp/980329-1.c
/usr/tmp/cca000Yh.s: Assembler messages:
/usr/tmp/cca000Yh.s:75: Error: register does not match opcode suffix
(robertl) rjlhome:/play/negcs/gcc
$ ./xgcc -melf -B./ -O3 /tmp/980329-1.c
/usr/tmp/cca000Yo.s: Assembler messages:
/usr/tmp/cca000Yo.s:76: Error: register does not match opcode suffix
(robertl) rjlhome:/play/negcs/gcc
$ mv as as_
(robertl) rjlhome:/play/negcs/gcc
$ ./xgcc -mcoff -B./ -O3 /tmp/980329-1.c
Assembler: 980329-1.c
        aline 75        : Syntax error
(robertl) rjlhome:/play/negcs/gcc
$ ./xgcc -melf -B./ -O3 /tmp/980329-1.c
/usr/tmp/cca000Z0.s:76:invalid register for instruction: %di in incb

This test case fails to assemble for {COFF,ELF} {GAS,OpenServer as}.

./as in this example is that nasty shell script wrapper I've had hanging
around forever.

The GAS I use is the one from the binutils 2.9 candidates area. I think
there has been one more since.


I don't understand the issue well enough to register an opinion.  I'm
just offering that the behaviour (fatal error) I see from GAS is very
consistent with what we see from OpenServer's as.

-- 
Robert Lipe       http://www.dgii.com/people/robertl       robertl@dgii.com
                  (WEB ADDRESS TEMPORARILY UNAVAILABLE)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 13:23       ` Robert Lipe
@ 1998-04-08 13:30         ` H.J. Lu
  1998-04-08 13:42         ` Ian Lance Taylor
  1 sibling, 0 replies; 8+ messages in thread
From: H.J. Lu @ 1998-04-08 13:30 UTC (permalink / raw)
  To: Robert Lipe; +Cc: ian, gas2, egcs

> 
> This test case fails to assemble for {COFF,ELF} {GAS,OpenServer as}.
> 
> ./as in this example is that nasty shell script wrapper I've had hanging
> around forever.
> 
> The GAS I use is the one from the binutils 2.9 candidates area. I think
> there has been one more since.
> 
> 
> I don't understand the issue well enough to register an opinion.  I'm
> just offering that the behaviour (fatal error) I see from GAS is very
> consistent with what we see from OpenServer's as.

Glad to see the current gas catch the bug. BTW, I hope my egcs patch
will show up eventually on the egcsmailing list :-).

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 13:23       ` Robert Lipe
  1998-04-08 13:30         ` H.J. Lu
@ 1998-04-08 13:42         ` Ian Lance Taylor
  1998-04-08 14:09           ` Robert Lipe
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 1998-04-08 13:42 UTC (permalink / raw)
  To: robertl; +Cc: hjl, schmid, gas2, egcs

   Date: Wed, 8 Apr 1998 15:21:32 -0500
   From: Robert Lipe <robertl@dgii.com>

   (robertl) rjlhome:/play/negcs/gcc
   $ ./xgcc -mcoff -B./ -O3 /tmp/980329-1.c
   /usr/tmp/cca000Yh.s: Assembler messages:
   /usr/tmp/cca000Yh.s:75: Error: register does not match opcode suffix

   The GAS I use is the one from the binutils 2.9 candidates area. I think
   there has been one more since.

Whoops, you're right.  I was confused.  gas does catch this particular
error, and has done so since day one.  I was mistakenly thinking that
something else was going on here.

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: binutils 2.9 is broken on x86
  1998-04-08 13:42         ` Ian Lance Taylor
@ 1998-04-08 14:09           ` Robert Lipe
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Lipe @ 1998-04-08 14:09 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: hjl, schmid, gas2, egcs

>    $ ./xgcc -mcoff -B./ -O3 /tmp/980329-1.c
>    /usr/tmp/cca000Yh.s: Assembler messages:
>    /usr/tmp/cca000Yh.s:75: Error: register does not match opcode suffix
> 
>    The GAS I use is the one from the binutils 2.9 candidates area. I think
> 
> Whoops, you're right.  I was confused.  gas does catch this particular
> error, and has done so since day one.  I was mistakenly thinking that
> something else was going on here.

egcs emits something bad, but gas and sco as both correctly vomit on it.
H.J. has submitted a patch to fix the egcs problem.

So in all this hysteria, there is nothing broken that we didn't already
know about and we can all feel good about each piece of software
involved, right?

Case closed, or is there another problem here?

RJL

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-04-08 14:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.A32.3.95.980408111418.23610A-100000@ltoi.iap.physik.tu-darmstadt.de>
1998-04-08 11:01 ` binutils 2.9 is broken on x86 H.J. Lu
1998-04-08 11:05   ` Ian Lance Taylor
1998-04-08 11:15     ` H.J. Lu
1998-04-08 12:19     ` H.J. Lu
1998-04-08 13:23       ` Robert Lipe
1998-04-08 13:30         ` H.J. Lu
1998-04-08 13:42         ` Ian Lance Taylor
1998-04-08 14:09           ` Robert Lipe

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).