Date: Wed, 3 Jan 2001 18:37:50 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Shawn Harrison , crazyfingers AT fuse DOT net, harrisso AT email DOT uc DOT edu, shou2 AT juno DOT com cc: djgpp AT delorie DOT com Subject: Re: How does OR Will gcc produce assembler output in intel syntax with the new GAS ".intel_syntax" directive In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 3 Jan 2001, Shawn Harrison wrote: > > Why do you need this? > It makes porting code easier without a lot of unnecessary recoding, plus if > its something that can > be controlled from inside the C source with the aid of #define 's then the > code can be output to > other assemblers that are intel syntax'ed by default I'm still not sure I understand: do you need this to take the assembly and feed it to an external assembler? Otherwise, I don't see how is portability related to all this: C code is always portable. If you indeed want to feed the assembly to an assembler other than Gas, you need a converter from AT&T to Intel format; the DJGPP FAQ mentions several possibilities in section 17.2. > > If it's to look at the produced code in syntax > > you are used to, you can use the objdump utility on the .o file > > that would be great if I wanted to go from intel to at&t syntax > say from a *.s file that was written using the .intel_syntax directive > and compiled to an *.o file > But its the other way around and you're just back to where you > started at. No, I don't think so. You want to see the code produced by GCC in Intel format. objdump can print the disassembly of the .o file in either AT&T or Intel format. You want the latter. Of course, objdump is only good for looking at the code off line, not for some automated procedure where assembly output by GCC is directly fed to an assembler. But I think the output of "gcc -S" cannot be fed directly to an assembler anyway, due to all kinds of fancy formatting and decorations.