Compiling assembler

Ian Lance Taylor ian@wasabisystems.com
Wed Dec 1 18:21:00 GMT 2004


<davidw567@ntlworld.com> writes:

> Some of the routines in this are written in assembler, inline ( a few hundred lines).
> These compile under Visual C++.
> 
> I have seen that GCC is AT&T based so the assembler code needs lots of changes.
> Somebody on one of the forums thought there was an option for GCC to compile Intel based assembler, is this so and how.

gcc does not look inside inline assembler code, so it doesn't
necessarily matter what syntax you use, as long as the assembler
understands it.

gcc will generate Intel assembler syntax with the -masm=intel option.

gas (the GNU assembler) understands Intel assembler syntax with the
.intel_syntax pseudo-op.

Ian



More information about the Gcc-help mailing list