delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/06/29/16:40:19

Xref: news-dnh.mv.net comp.os.msdos.djgpp:698
Path: news-dnh.mv.net!mv!news.sprintlink.net!cam.news.pipex.net!pipex!edi.news.pipex.net!pipex!sunic!sunic.sunet.se!news.uni-c.dk!diku.dk!terra
From: terra AT diku DOT dk (Morten Welinder)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bugs in 386 GAS?
Date: 29 Jun 1995 12:25:45 GMT
Organization: Department of Computer Science, U of Copenhagen
Lines: 23
Sender: terra AT tyr DOT diku DOT dk
References: <1995Jun28 DOT 204906 DOT 54920 AT cc DOT usu DOT edu>
Nntp-Posting-Host: odin.diku.dk
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

sl18g AT cc DOT usu DOT edu writes:

>was right.  I assembled the following code in gas 2.5.2:

>original		after disassembly
>add %cl,%ch		add %cl,%ch	[fine]
>add %ch,%cl		add %ebp,%ecx	[?!?]
>add %bl,%al		add %ebx,%eax   [?!?]
>add %al,%bl		add %al,%bl	[fine]
>mov $5,%al		mov $5,%eax	[?!?]
>mov $5,%ah		mov $5,%ah	[fine]
>mov %al,%ah		mov %al,%ah	[fine]
>mov %ah,%al		mov %esp,%eax	[?!?]
>mov %ax,%bx		mov %ax,%bx	[fine]
>mov %bx,%ax		mov %ebx,%eax	[?!?]


Yep, gas is buggy.  Always use an explicit size suffix like in "addb",
"subl", or "movw".

This has recently been added to the FAQ.

Morten

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019