Rotate ChangeLogs
[deliverable/binutils-gdb.git] / gas / doc / c-xtensa.texi
index 6de47db34b284afa5291efe21baea8487863c2f5..67c6f15055a84c42e57e87a4bcabea3fa4608590 100644 (file)
@@ -1,7 +1,9 @@
-@c Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+@c Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2011
+@c Free Software Foundation, Inc.
 @c This is part of the GAS manual.
 @c For copying conditions, see the file as.texinfo.
 @c
+@c man end
 @ifset GENERIC
 @page
 @node Xtensa-Dependent
@@ -29,10 +31,9 @@ Reference Manual}.
 @node Xtensa Options
 @section Command Line Options
 
-The Xtensa version of the @sc{gnu} assembler supports these
-special options:
+@c man begin OPTIONS
+@table @gcctabopt
 
-@table @code
 @item --text-section-literals | --no-text-section-literals
 @kindex --text-section-literals
 @kindex --no-text-section-literals
@@ -93,6 +94,8 @@ Rename the @var{oldname} section to @var{newname}.  This option can be used
 multiple times to rename multiple sections.
 @end table
 
+@c man end
+
 @node Xtensa Syntax
 @section Assembler Syntax
 @cindex syntax, Xtensa assembler
@@ -102,6 +105,11 @@ multiple times to rename multiple sections.
 Block comments are delimited by @samp{/*} and @samp{*/}.  End of line
 comments may be introduced with either @samp{#} or @samp{//}.
 
+If a @samp{#} appears as the first character of a line then the whole
+line is treated as a comment, but in this case the line could also be
+a logical line number directive (@pxref{Comments}) or a preprocessor
+control command (@pxref{Preprocessing}).
+
 Instructions consist of a leading opcode or macro name followed by
 whitespace and an optional comma-separated list of operands:
 
@@ -109,7 +117,7 @@ whitespace and an optional comma-separated list of operands:
 @var{opcode} [@var{operand}, @dots{}]
 @end smallexample
 
-Instructions must be separated by a newline or semicolon.
+Instructions must be separated by a newline or semicolon (@samp{;}).
 
 FLIX instructions, which bundle multiple opcodes together in a single
 instruction, are specified by enclosing the bundled opcodes inside
@@ -144,10 +152,10 @@ specified on a single line by separating the opcodes with semicolons:
 @{ [@var{format};] @var{opcode0} [@var{operands}]; @var{opcode1} [@var{operands}]; @var{opcode2} [@var{operands}]; @dots{} @}
 @end smallexample
 
-The assembler can automatically bundle opcodes into FLIX instructions.
-It encodes the opcodes in order, one at a time,
-choosing the smallest format where each opcode can be encoded and
-filling unused instruction slots with no-ops.
+If an opcode can only be encoded in a FLIX instruction but is not
+specified as part of a FLIX bundle, the assembler will choose the
+smallest format where the opcode can be encoded and
+will fill unused instruction slots with no-ops.
 
 @menu
 * Xtensa Opcodes::              Opcode Naming Conventions.
@@ -241,10 +249,8 @@ density option, the same assembly code will then work without modification.
 @node Xtensa Automatic Alignment
 @subsection Automatic Instruction Alignment
 @cindex alignment of @code{LOOP} instructions
-@cindex alignment of @code{ENTRY} instructions
 @cindex alignment of branch targets
 @cindex @code{LOOP} instructions, alignment
-@cindex @code{ENTRY} instructions, alignment
 @cindex branch target alignment
 
 The Xtensa assembler will automatically align certain instructions, both
@@ -257,9 +263,7 @@ instruction fetch widths.)  An
 instruction immediately following a call is treated as a branch target
 in this context, because it will be the target of a return from the
 call.  This alignment has the potential to reduce branch penalties at
-some expense in code size.  The assembler will not attempt to align
-labels with the prefixes @code{.Ln} and @code{.LM}, since these labels
-are used for debugging information and are not typically branch targets.
+some expense in code size.
 This optimization is enabled by default.  You can disable it with the
 @samp{--no-target-@-align} command-line option (@pxref{Xtensa Options,
 ,Command Line Options}).
@@ -287,11 +291,9 @@ different fetch widths, the assembler conservatively assumes a 32-bit
 fetch width when aligning @code{LOOP} instructions (except if the first
 instruction in the loop is a 64-bit instruction).
 
-Similarly, the @code{ENTRY} instruction must be aligned on a 0 mod 4
-byte boundary.  The assembler satisfies this requirement by inserting
-zero bytes when required.  In addition, labels immediately preceding the
-@code{ENTRY} instruction will be moved to the newly aligned instruction
-location.
+Previous versions of the assembler automatically aligned @code{ENTRY}
+instructions to 4-byte boundaries, but that alignment is now the
+programmer's responsibility.
 
 @node Xtensa Relaxation
 @section Xtensa Relaxation
@@ -455,7 +457,7 @@ is translated to:
     l32r a1, .L1
 @end group
 @group
-    addi a1, a0, a1
+    add a1, a0, a1
     l32i a1, a1, 0
 @end group
 @end smallexample
This page took 0.024282 seconds and 4 git commands to generate.