16 The Diab Assembler


Selecting the target 283
The das command 284
Assembler command line options 284
Assembler -X options 289


This section of the Diab C/C++ User's Guide describes the Diab Assembler for PowerPC microprocessors. For in-depth information on the PowerPC architecture and instructions, please refer to the Motorola and IBM documentation.


Selecting the target

The target for the assembler is selected by the same methods as for the compiler. See Selecting a target, p.25 for details. When using the compiler drivers dcc, dplus, etc., the target for the assembler is selected automatically by the driver.


The das command

The command to execute Diab Assembler is as follows:

das [options] [input-files]

where:

Diab Assembler assembles the input file and generates an object file as determined by the selected target configuration. By default, the output file has the name of the input file with an extension suffix of .o. The -o option can be used to change the output file name.

The form -@name can also be used for either options or input-file. If found, the name must be either that of an environment variable or file (a path is allowed), the contents of which replace -@name.

Example: assemble test.s with a symbol named DEBUG equal to 2 for use in conditional assembly statements:

das -D DEBUG=2 test.s

Assembler command line options

The following command line options are available. See also the next section Assembler -X options, p.289.

Define symbol name (-Dname=value)

Generate debugging information (-g)

Include header in listing (-H)

Set header files directory (-I path)

Generate listing file (-l, -L)

Set output file (-o file)

Remove the input file on termination (-R)

Specify assembler description (.ad) file (-T ad-file)

Select target (-ttof:environ)

Print version number (-V)

Define configuration variable (-WDname=value)

Select object format and mnemonic type (-WDDOBJECT=object-format)

Select target processor (-WDDTARGET=target)

Discard all local symbols (-x)

Discard all symbols starting with .L (-X)

 

Print command line options on standard output (-#)

Read command line options from file or variable (-@name, -@@name)

Redirect output (-@E=file, -@E+file, -@O=file, -@O+file)


Assembler -X options

The following options provide more detailed control of the assembler. The -X options are for use on the command line; -X options can also be set using the .xopt assembler directive. See .xopt, p.347.

Specify value to fill gaps left by .align or .alignn directive (-Xalign-fill-text)

Interpret .align directive (-Xalign-value, -Xalign-power2)

Generate debugging information (-Xasm-debug-... )

Align program data automatically based on size (-Xauto-align)

Set instruction type (-Xcpu-...)

Set default value for section alignment (-Xdefault-align)

Generate NOP for certain branch conditional instructions (-Xfix-bc-fw-mask-bug)

Enable local GNU labels (-Xgnu-locals-...)

Include header in listing (-Xheader...)

Set header format (-Xheader-format="string")

Set label definition syntax (-Xlabel-colon...)

Set format of assembly line in listing (-Xline-format="string")

Generate a listing file (-Xlist-...)

Set line length of listing file (-Xllen=n)

Enable blanks in macro arguments (-Xmacro-arg-space-...)

Set output object format (-Xobject-format=form)

Select branch size optimizations (-Xoptim-...)

Set page break margin (-Xpage-skip=n)

Set lines per page (-Xplen=n)

Limit length of conditional branch(-Xprepare-compress=n)

Treat semicolons as statement separators (-Xsemi-is-newline)

Enable spaces between operands (-Xspace-...)

Delete local symbols (-Xstrip-locals..., -Xstrip-temps...)

Set subtitle (-Xsubtitle="string")

Set tab size (-Xtab-size=n)

Set title (-Xtitle="string")

 

support@windriver.com
Copyright © 2002, Wind River Systems, Inc. All rights reserved.