public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: Gas is broken for x86-64
@ 2004-11-08  8:55 Jan Beulich
  2004-11-08  9:31 ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2004-11-08  8:55 UTC (permalink / raw)
  To: amodra; +Cc: hjl, binutils

>>> Alan Modra <amodra@bigpond.net.au> 08.11.04 09:38:07 >>>
>On Mon, Nov 08, 2004 at 09:20:22AM +0100, Jan Beulich wrote:
>> I would think your patch should have added both suffix-less movsb
and
>> movzb, or neither.
>
>No.  movsb is a string move instruction.  movzb is an abbreviation of
>movzbl or movzbw depending on data size.

Certainly. But movsb is also a suffix-less variant of movsb[wlq], and
since movz and movs are fully in sync with one another, allowing
abbreviation of one should also allow the same for the other.
One of the points here is that the abbreviation (or suffix) guessing
depends on only the mnemonic, not the operands, thus making things like
movsb (movs[bwlq] vs. movsb[wlq]), movsd (movs[bwdq] vs. movs[sd]), or
cmpsd (cmps[bwdq] vs. cmps[sd]) conflict. But there are more such issues
(like AT&T/Intel syntax insns being visible in the opposite mode). I
think some signficiant amount of cleanup work is necessary here, and
I'll try to get to this hopefully not too far in the future.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Gas is broken for x86-64
@ 2004-11-08  8:20 Jan Beulich
  2004-11-08  8:38 ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2004-11-08  8:20 UTC (permalink / raw)
  To: hjl; +Cc: binutils

>>> "H. J. Lu" <hjl@lucon.org> 06.11.04 00:17:59 >>>
>On Fri, Nov 05, 2004 at 03:04:29PM -0800, H. J. Lu wrote:
>> On Fri, Nov 05, 2004 at 03:00:27PM -0800, H. J. Lu wrote:
>> > On Fri, Nov 05, 2004 at 02:47:58PM -0800, H. J. Lu wrote:
>> > > Hi Jan,
>> > > 
>> > > Your i386 opcode change breaks x86-64. I got
>> > > 
>> > > [hjl@gnu-64 gas]$ cat /tmp/x.s
>> > > movzb (%rax),%edx
>> > > [hjl@gnu-64 gas]$ ./as-new -o x.o /tmp/x.s
>> > > /tmp/x.s: Assembler messages:
>> > > /tmp/x.s:1: Error: no such instruction: `movzb (%rax),%edx'
>> > > 
>> > > 
>> > 
>> > Your patch
>> > 
>> >
http://sources.redhat.com/ml/binutils/2004-11/msg00033/binutils-mainline-x86-intel-syntax.patch

>> > 
>> > removed movzb. It is wrong.

This change was for consistency reasons, as indicated also by an added
comment. If inconsistencies are intentional, then these should be very
clearly marked in my opinion. In this case, since there's no support
for

movsb (%eax), %eax

I can't see why you'd want

movzb (%eax), %eax

>> BTW, do you know what other instructions you have removed? We can't
>> remove any of them unless we have a very good reason.

None.

>I checked in a patch to restore "movzb":
>
>http://sources.redhat.com/ml/binutils-cvs/2004-11/msg00045.html 

I would think your patch should have added both suffix-less movsb and
movzb, or neither.

Jan


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Gas is broken for x86-64
@ 2004-11-05 22:48 H. J. Lu
  2004-11-05 23:00 ` H. J. Lu
  0 siblings, 1 reply; 10+ messages in thread
From: H. J. Lu @ 2004-11-05 22:48 UTC (permalink / raw)
  To: jbeulich; +Cc: binutils

Hi Jan,

Your i386 opcode change breaks x86-64. I got

[hjl@gnu-64 gas]$ cat /tmp/x.s
movzb (%rax),%edx
[hjl@gnu-64 gas]$ ./as-new -o x.o /tmp/x.s
/tmp/x.s: Assembler messages:
/tmp/x.s:1: Error: no such instruction: `movzb (%rax),%edx'


H.J.

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

end of thread, other threads:[~2004-11-08  9:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08  8:55 Gas is broken for x86-64 Jan Beulich
2004-11-08  9:31 ` Alan Modra
  -- strict thread matches above, loose matches on Subject: below --
2004-11-08  8:20 Jan Beulich
2004-11-08  8:38 ` Alan Modra
2004-11-05 22:48 H. J. Lu
2004-11-05 23:00 ` H. J. Lu
2004-11-05 23:04   ` H. J. Lu
2004-11-05 23:18     ` H. J. Lu
2004-11-06  0:41       ` Daniel Jacobowitz
2004-11-06  1:18         ` H. J. Lu

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