summaryrefslogtreecommitdiff
path: root/gas/doc
diff options
context:
space:
mode:
authorJohn Darrington <john@darrington.wattle.id.au>2019-05-22 07:16:14 +0200
committerJohn Darrington <john@darrington.wattle.id.au>2019-05-22 08:13:36 +0200
commit22c6ccb89e0f38a70a42fb49eb167e7857d51f5c (patch)
tree53939413dadacc46e7b3c2975212e52e9cf5ad6d /gas/doc
parenta7df56e5f840e2ce8bb09487ee0b6570cddb1550 (diff)
downloadbinutils-gdb-22c6ccb89e0f38a70a42fb49eb167e7857d51f5c.tar.gz
S12Z: GAS: New option --mdollar-hex.
This option (also implied by --traditional) causes '$' to introduce literal hexadecimal constants, rather than the modern convention '0x'. gas/ * config/tc-s12z.c (s12z_strtol): New function. (md_show_usage): Update. (md_parse_option): new case OPTION_DOLLAR_HEX. (s12z_init_after_args): (<global>): Use s12z_strtol instead of strtol. * doc/c-s12z.texi (S12Z Options): Document new option -mdollar-hex. * testsuite/gas/s12z/dollar-hex.d: New file. * testsuite/gas/s12z/dollar-hex.s: New file. * testsuite/gas/s12z/s12z.exp: Add them.
Diffstat (limited to 'gas/doc')
-rw-r--r--gas/doc/c-s12z.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/doc/c-s12z.texi b/gas/doc/c-s12z.texi
index b90874754c9..6cf6f25e7c4 100644
--- a/gas/doc/c-s12z.texi
+++ b/gas/doc/c-s12z.texi
@@ -38,6 +38,19 @@ string @var{pfx}.
For an explanation of what this means and why it might be needed,
see @ref{S12Z Register Notation}.
+
+
+@item -mdollar-hex
+@cindex @samp{-mdollar-hex} option, dollar-hex
+@cindex hexadecimal prefix, S12Z
+The @samp{-mdollar-hex} option affects the way that literal hexadecimal constants
+are represented. When this option is specified, the assembler will consider
+the @samp{$} character as the start of a hexadecimal integer constant. Without
+this option, the standard value of @samp{0x} is expected.
+
+If you use this option, then you cannot have symbol names starting with @samp{$}.
+@samp{-mdollar-hex} is implied if the @samp{--traditional-format}
+(@pxref{traditional-format}) is used.
@end table
@node S12Z Syntax