Discussion:
x86 assembler syntax
Rick C. Hodgin
2010-08-09 05:21:19 UTC
Permalink
All,

Is there an Intel-syntax compatible option for GCC or G++? And if not,
why not? It's so much cleaner than AT&T's.

- Rick C. Hodgin
Tim Prince
2010-08-09 06:37:16 UTC
Permalink
Post by Rick C. Hodgin
All,
Is there an Intel-syntax compatible option for GCC or G++? And if not,
why not? It's so much cleaner than AT&T's.
- Rick C. Hodgin
I don't know how you get along without a search engine. What about
http://tldp.org/HOWTO/Assembly-HOWTO/gas.html ?
--
Tim Prince
Rick C. Hodgin
2010-08-09 07:08:36 UTC
Permalink
Tim,

Nice. It reads: "3.2.3. Intel syntax - Good news are that starting from
binutils 2.10 release, GAS supports Intel syntax too. It can be
triggered with .intel_syntax directive. Unfortunately this mode is not
documented (yet?) in the official binutils manual, so if you want to use
it, try to examine http://www.lxhp.in-berlin.de/lhpas86.html, which is
an extract from AMD 64bit port of binutils 2.11."

I tried a sample with asm(".intel_syntax; int 3") and it seemed to
compile/assemble that line correctly, instead of asm("int $0x3"). But
my other AT&T syntax commands all failed after that. So, this directive
must be a global setting, and not an instance-by-instance setting.

Thanks for the search, Tim. :-)

- Rick
Post by Tim Prince
Post by Rick C. Hodgin
All,
Is there an Intel-syntax compatible option for GCC or G++? And if not,
why not? It's so much cleaner than AT&T's.
- Rick C. Hodgin
I don't know how you get along without a search engine. What about
http://tldp.org/HOWTO/Assembly-HOWTO/gas.html ?
Jonathan Wakely
2010-08-09 23:49:45 UTC
Permalink
Tim,
Nice.  It reads: "3.2.3. Intel syntax - Good news are that starting from
binutils 2.10 release, GAS supports Intel syntax too. It can be
triggered with .intel_syntax directive. Unfortunately this mode is not
documented (yet?) in the official binutils manual, so if you want to use
it, try to examine http://www.lxhp.in-berlin.de/lhpas86.html, which is
an extract from AMD 64bit port of binutils 2.11."
2.11 is quite old now

http://sourceware.org/binutils/docs-2.20/as/i386_002dDependent.html
I tried a sample with asm(".intel_syntax; int 3") and it seemed to
compile/assemble that line correctly, instead of asm("int $0x3").  But
my other AT&T syntax commands all failed after that.  So, this directive
must be a global setting, and not an instance-by-instance setting.
http://sourceware.org/binutils/docs-2.20/as/i386_002dSyntax.html
Ian Lance Taylor
2010-08-13 03:53:11 UTC
Permalink
Post by Rick C. Hodgin
Is there an Intel-syntax compatible option for GCC or G++? And if not,
why not? It's so much cleaner than AT&T's.
-masm=intel

This question would have been more appropriate on the gcc-help mailing
list.

Ian
Rick C. Hodgin
2010-08-13 04:10:02 UTC
Permalink
Post by Ian Lance Taylor
Post by Rick C. Hodgin
Is there an Intel-syntax compatible option for GCC or G++? And if not,
why not? It's so much cleaner than AT&T's.
-masm=intel
This question would have been more appropriate on the gcc-help mailing
list. -Ian Lance Taylor
My apologies to everyone. I did not know such a list existed.

- Rick C. Hodgin
Gerald Pfeifer
2010-08-15 21:44:51 UTC
Permalink
Hi Rick (and others),
Post by Rick C. Hodgin
Post by Ian Lance Taylor
This question would have been more appropriate on the gcc-help mailing
list. -Ian Lance Taylor
My apologies to everyone. I did not know such a list existed.
all of our web pages have a footer which refers to gcc-help, but
apparently this pointer is not working sufficiently well.

This is _not_ to blame anyone, rather I'd like to see whether/how
I can improve the situation. Any suggestions?

Gerald
James Dennett
2010-08-15 21:56:00 UTC
Permalink
Post by Gerald Pfeifer
Hi Rick (and others),
Post by Ian Lance Taylor
This question would have been more appropriate on the gcc-help mailing
list. -Ian Lance Taylor
My apologies to everyone.  I did not know such a list existed.
all of our web pages have a footer which refers to gcc-help, but
apparently this pointer is not working sufficiently well.
This is _not_ to blame anyone, rather I'd like to see whether/how
I can improve the situation.  Any suggestions?
Apart from using the name ***@gcc.gnu.org for the help list, and
gcc-***@gcc.gnu.org for developers (who should be able to find the
right list)?

Maybe it's too late for that, but it's unfortunate that the primary
mailing list name is taken for the implementors, not the users.

-- James
Ian Lance Taylor
2010-08-17 03:56:11 UTC
Permalink
Post by James Dennett
right list)?
I tend to agree that we should change the name of the ***@gcc.gnu.org
mailing list.

Ian
Richard Kenner
2010-08-17 11:08:38 UTC
Permalink
Post by Ian Lance Taylor
Post by James Dennett
right list)?
mailing list.
I don't think it'll help. "gcc-dev: that's the list for people developing
software WITH gcc, right?" ;-)
David Edelsohn
2010-08-17 18:13:49 UTC
Permalink
Post by Ian Lance Taylor
Post by James Dennett
right list)?
mailing list.
Maybe instead of *changing* the name, we should *add*
gcc-***@gcc.gnu.org and re-purpose ***@gcc.gnu.org. Depending on how
we changed the existing mailinglist, it could create a lot of
unnecessary confusion or broken links (not that you suggested changing
the URL of the mailinglist archives).

- David
Basile Starynkevitch
2010-08-17 18:18:37 UTC
Permalink
Post by David Edelsohn
Post by Ian Lance Taylor
Post by James Dennett
right list)?
mailing list.
Maybe instead of *changing* the name, we should *add*
I would prefer having gcc-***@gcc.gnu.org (which takes the role of
current ***@gcc.gnu.org) and keeping the existing gcc-***@gcc.gnu.org

But if we re-purpose ***@gcc.gnu.org we'll get there a lot of messages
asking for help. My feeling is that it is a much too used list to be
re-assigned.

Cheers.
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mine, sont seulement les miennes} ***
Gerald Pfeifer
2010-08-17 13:37:36 UTC
Permalink
For what it's worth. One of the pages I went to had the email address as
already too. :-)
Both addresses -- ***@gcc.gnu.org and ***@gnu.org -- actually work,
interchangably. I did change our web page to only use the former
on Sunday to simplify things, cf. the bottom of http://gcc.gnu.org/ .

Thanks for your feedback!

Gerald
Continue reading on narkive:
Loading...