aboutsummaryrefslogtreecommitdiff
path: root/gas/doc/as.texinfo
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-10-04 17:05:37 +0000
committerNick Clifton <nickc@redhat.com>2007-10-04 17:05:37 +0000
commit38a57ae7a5cafb2eeca853494a6c2aa994efc956 (patch)
treecfb9b9ac767db4859052e315d77269ec398da808 /gas/doc/as.texinfo
parent45d42143d489a6b7ee78fd118b573906c43ecb0b (diff)
downloadgdb-38a57ae7a5cafb2eeca853494a6c2aa994efc956.zip
gdb-38a57ae7a5cafb2eeca853494a6c2aa994efc956.tar.gz
gdb-38a57ae7a5cafb2eeca853494a6c2aa994efc956.tar.bz2
* read.c (potable): Add string8, string16, string32 and string64. Add bit size for stringer function.
(stringer_append_char): New. (stringer): Use stringer_append_char(). * config/obj-coff.c (obj_coff_ident): Add bit size for stringer function. * config/obj-elf.c (obj_elf_ident): Likewise. * config/tc-alpha.c (s_alpha_stringer): Likewise. * config/tc-dlx.c (dlx_pseudo_table): Likewise. * config/tc-hppa.c (pa_stringer): Likewise. * config/tc-ia64.c (md_pseudo_table, pseudo_opcode): Likewise. * config/tc-m68hc11.c (md_pseudo_table): Likewise. * config/tc-mcore.c (md_pseudo_table): Likewise. * config/tc-mips.c (mips_pseudo_table): Likewise. * config/tc-spu.c (md_pseudo_table): Likewise. * config/tc-s390.c (md_pseudo_table): Likewise. Replace '2' by '1'. * doc/as.texinfo (ABORT): Fix identing. (String): Document new string8, string16, string32, string64 functions. * NEWS: Mention the new feature. * testsuite/gas/all/gas.exp: Include new test "strings". * testsuite/gas/all/string.s: New * testsuite/gas/all/string.d: New.
Diffstat (limited to 'gas/doc/as.texinfo')
-rw-r--r--gas/doc/as.texinfo29
1 files changed, 26 insertions, 3 deletions
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index bf8bab7..a59b272 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -3776,7 +3776,7 @@ Some machine configurations provide additional directives.
@menu
* Abort:: @code{.abort}
@ifset COFF
-* ABORT (COFF):: @code{.ABORT}
+* ABORT (COFF):: @code{.ABORT}
@end ifset
* Align:: @code{.align @var{abs-expr} , @var{abs-expr}}
@@ -3908,7 +3908,7 @@ Some machine configurations provide additional directives.
* Stab:: @code{.stabd, .stabn, .stabs}
@end ifset
-* String:: @code{.string "@var{str}"}
+* String:: @code{.string "@var{str}"}, @code{.string8 "@var{str}"}, @code{.string16 "@var{str}"}, @code{.string32 "@var{str}"}, @code{.string64 "@var{str}"}
* Struct:: @code{.struct @var{expression}}
@ifset ELF
* SubSection:: @code{.subsection}
@@ -5932,16 +5932,39 @@ All five fields are specified.
@c end have-stabs
@node String
-@section @code{.string} "@var{str}"
+@section @code{.string} "@var{str}", @code{.string8} "@var{str}", @code{.string16}
+"@var{str}", @code{.string32} "@var{str}", @code{.string64} "@var{str}"
@cindex string, copying to object file
+@cindex string8, copying to object file
+@cindex string16, copying to object file
+@cindex string32, copying to object file
+@cindex string64, copying to object file
@cindex @code{string} directive
+@cindex @code{string8} directive
+@cindex @code{string16} directive
+@cindex @code{string32} directive
+@cindex @code{string64} directive
Copy the characters in @var{str} to the object file. You may specify more than
one string to copy, separated by commas. Unless otherwise specified for a
particular machine, the assembler marks the end of each string with a 0 byte.
You can use any of the escape sequences described in @ref{Strings,,Strings}.
+The variants @code{string16}, @code{string32} and @code{string64} differ from
+the @code{string} pseudo opcode in that each 8-bit character from @var{str} is
+copied and expanded to 16, 32 or 64 bits respectively. The expanded characters
+are stored in target endianness byte order.
+
+Example:
+@smallexample
+ .string32 "BYE"
+expands to:
+ .string "B\0\0\0Y\0\0\0E\0\0\0" /* On little endian targets. */
+ .string "\0\0\0B\0\0\0Y\0\0\0E" /* On big endian targets. */
+@end smallexample
+
+
@node Struct
@section @code{.struct @var{expression}}