Contents|Index|Previous|Next
Assembler
options for Hitachi SH
There are several assembler options
for the Hitachi SH targets.
General
assembler options for Hitachi SH
To
use the GNU assembler, as,
to assemble gcc
output, configure gcc
with the switch, --with-gnu-as
(in GNUPro Toolkit distributions) or with the option, -mgas,
described in the following discussion.
-mgas
Compile using as
to assemble GCC output.
-Wa
If you invoke as
through the GNU C compiler (version 2), you can use the -Wa
option to pass arguments through to the assembler. One common use of this
option is to exploit the assembler’s listing features. Assembler arguments
that you specify with gcc
-Wa
must be separated by commas (the input, gcc,
and the input, -Wa).
-L
The additional assembler
option, -L,
preserves local labels, which may make the listing output more intelligible
to humans.
For example, in the following
commandline, the assembler option, -ahl,
requests a listing with interspersed
high-level language and assembly language.
$ sh-hms-gcc -g -O -Wa,-alh,-L file.c
-L
preserves local labels while the compiler debugging option, -g,
gives the assembler the necessary debugging information.
Assembler
options for listing output for Hitachi SH
Use the following options
to enable listing output from the assembler (the letters after ‘-a’
may be combined into one option, such as -aln):
-a
By itself, ‘-a’
requests listings of high-level language source, assembly language, and
symbols.
-ah
Request a high-level language
listing.
-al
Request an output-program
assembly listing.
-as
Request a symbol table listing.
-ad
Omit debugging directives
from the listing.
High-level listings require
that a compiler debugging option like ‘-g’
be used and, also, that assembly listings like ‘-al’
be requested.
as
listing-control directives for Hitachi SH
Use the following listing-control
assembler directives to control the appearance of the listing output (if
you do not request listing output with one of the -a
options, the following listing-control directives have no effect).
.list
Turn on listings from this
point on.
.nolist
Turn off listings from this
point on.
.psize linecount, columnwidth
Describe the page size for
your output (the default is 60, 200). as
generates form feeds after printing each group of linecount
lines. To avoid these automatic form feeds, specify 0
as the linecount.
.eject
Skip to a new page (issue
a form feed).
.title
Use heading
as the title (this is the second line of the listing output, directly after
the source file name and page number) when generating assembly listings.
.sbttl
Use subheading
as the subtitle (this is the third line of the listing output, directly
after the title line) when generating assembly listings.
-an
Turn off all forms processing.
Top|Contents|Index|Previous|Next