This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Committed: Document ARM's .syntax directive for GAS
- From: Nick Clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Thu, 30 Jul 2009 09:54:27 +0100
- Subject: Committed: Document ARM's .syntax directive for GAS
Hi Guys,
I am checking in the patch below to document the .syntax directive
supported by the ARM port of GAS. I noticed that the description
was missing whilst investigating a different problem and I thought
that it would be a good idea to make sure that it was documented.
Cheers
Nick
gas/ChangeLog
2009-07-30 Nick Clifton <nickc@redhat.com>
* doc/c-arm.texi (ARM-Instruction-Set): New node. Documents the
different syntaxes support by the ARM port.
(ARM Directives): Add entry for .syntax.
Index: gas/doc/c-arm.texi
===================================================================
RCS file: /cvs/src/src/gas/doc/c-arm.texi,v
retrieving revision 1.59
diff -c -3 -p -r1.59 c-arm.texi
*** gas/doc/c-arm.texi 15 Jul 2009 15:08:55 -0000 1.59
--- gas/doc/c-arm.texi 30 Jul 2009 08:46:23 -0000
*************** features. The default is to warn.
*** 323,333 ****
--- 323,369 ----
@node ARM Syntax
@section Syntax
@menu
+ * ARM-Instruction-Set:: Instruction Set
* ARM-Chars:: Special Characters
* ARM-Regs:: Register Names
* ARM-Relocations:: Relocations
@end menu
+ @node ARM-Instruction-Set
+ @subsection Instruction Set Syntax
+ Two slightly different syntaxes are support for ARM and THUMB
+ instructions. The default, @code{divided}, uses the old style where
+ ARM and THUMB instructions had their own, separate syntaxes. The new,
+ @code{unified} syntax, which can be selected via the @code{.syntax}
+ directive, and has the following main features:
+
+ @table @bullet
+ @item
+ Immediate operands do not require a @code{#} prefix.
+
+ @item
+ The @code{IT} instruction may appear, and if it does it is validated
+ against subsequent conditional affixes. In ARM mode it does not
+ generate machine code, in THUMB mode it does.
+
+ @item
+ For ARM instructions the conditional affixes always appear at the end
+ of the instruction. For THUMB instructions conditional affixes can be
+ used, but only inside the scope of an @code{IT} instruction.
+
+ @item
+ All of the instructions new to the V6T2 architecture (and later) are
+ available. (Only a few such instructions can be written in the
+ @code{divided} syntax).
+
+ @item
+ The @code{.N} and @code{.W} suffixes are recognized and honored.
+
+ @item
+ All instructions set the flags if and only if they have an @code{s}
+ affix.
+ @end table
+
@node ARM-Chars
@subsection Special Characters
*************** This directive emits relocations that ev
*** 722,727 ****
--- 758,768 ----
offset of each expression's symbol. This directive is only supported
for PE targets.
+ @cindex @code{.syntax} directive, ARM
+ @item .syntax [@code{unified} | @code{divided}]
+ This directive sets the Instruction Set Syntax as described in the
+ @ref{ARM-Instruction-Set} section.
+
@c TTTTTTTTTTTTTTTTTTTTTTTTTT
@cindex @code{.thumb} directive, ARM