Next: , Previous: TIC54X-Ext, Up: TIC54X-Dependent


9.43.9 Directives

.align [size]
.even
Align the section program counter on the next boundary, based on size. size may be any power of 2. .even is equivalent to .align with a size of 2.
1
Align SPC to word boundary
2
Align SPC to longword boundary (same as .even)
128
Align SPC to page boundary


.asg string, name
Assign name the string string. String replacement is performed on string before assignment.


.eval string, name
Evaluate the contents of string string and assign the result as a string to the subsym name. String replacement is performed on string before assignment.


.bss symbol, size [, [blocking_flag] [,alignment_flag]]
Reserve space for symbol in the .bss section. size is in words. If present, blocking_flag indicates the allocated space should be aligned on a page boundary if it would otherwise cross a page boundary. If present, alignment_flag causes the assembler to allocate size on a long word boundary.


.byte value [,...,value_n]
.ubyte value [,...,value_n]
.char value [,...,value_n]
.uchar value [,...,value_n]
Place one or more bytes into consecutive words of the current section. The upper 8 bits of each word is zero-filled. If a label is used, it points to the word allocated for the first byte encountered.


.clink ["section_name"]
Set STYP_CLINK flag for this section, which indicates to the linker that if no symbols from this section are referenced, the section should not be included in the link. If section_name is omitted, the current section is used.


.c_mode
TBD.


.copy "filename" | filename
.include "filename" | filename
Read source statements from filename. The normal include search path is used. Normally .copy will cause statements from the included file to be printed in the assembly listing and .include will not, but this distinction is not currently implemented.


.data
Begin assembling code into the .data section.


.double value [,...,value_n]
.ldouble value [,...,value_n]
.float value [,...,value_n]
.xfloat value [,...,value_n]
Place an IEEE single-precision floating-point representation of one or more floating-point values into the current section. All but .xfloat align the result on a longword boundary. Values are stored most-significant word first.


.drlist
.drnolist
Control printing of directives to the listing file. Ignored.


.emsg string
.mmsg string
.wmsg string
Emit a user-defined error, message, or warning, respectively.


.far_mode
Use extended addressing when assembling statements. This should appear only once per file, and is equivalent to the -mfar-mode option see -mfar-mode.


.fclist
.fcnolist
Control printing of false conditional blocks to the listing file.


.field value [,size]
Initialize a bitfield of size bits in the current section. If value is relocatable, then size must be 16. size defaults to 16 bits. If value does not fit into size bits, the value will be truncated. Successive .field directives will pack starting at the current word, filling the most significant bits first, and aligning to the start of the next word if the field size does not fit into the space remaining in the current word. A .align directive with an operand of 1 will force the next .field directive to begin packing into a new word. If a label is used, it points to the word that contains the specified field.


.global symbol [,...,symbol_n]
.def symbol [,...,symbol_n]
.ref symbol [,...,symbol_n]
.def nominally identifies a symbol defined in the current file and available to other files. .ref identifies a symbol used in the current file but defined elsewhere. Both map to the standard .global directive.


.half value [,...,value_n]
.uhalf value [,...,value_n]
.short value [,...,value_n]
.ushort value [,...,value_n]
.int value [,...,value_n]
.uint value [,...,value_n]
.word value [,...,value_n]
.uword value [,...,value_n]
Place one or more values into consecutive words of the current section. If a label is used, it points to the word allocated for the first value encountered.


.label symbol
Define a special symbol to refer to the load time address of the current section program counter.


.length
.width
Set the page length and width of the output listing file. Ignored.


.list
.nolist
Control whether the source listing is printed. Ignored.


.long value [,...,value_n]
.ulong value [,...,value_n]
.xlong value [,...,value_n]
Place one or more 32-bit values into consecutive words in the current section. The most significant word is stored first. .long and .ulong align the result on a longword boundary; xlong does not.


.loop [count]
.break [condition]
.endloop
Repeatedly assemble a block of code. .loop begins the block, and .endloop marks its termination. count defaults to 1024, and indicates the number of times the block should be repeated. .break terminates the loop so that assembly begins after the .endloop directive. The optional condition will cause the loop to terminate only if it evaluates to zero.


macro_name .macro [param1][,...param_n]
[.mexit]
.endm
See the section on macros for more explanation (See TIC54X-Macros.


.mlib "filename" | filename
Load the macro library filename. filename must be an archived library (BFD ar-compatible) of text files, expected to contain only macro definitions. The standard include search path is used.


.mlist
.mnolist
Control whether to include macro and loop block expansions in the listing output. Ignored.


.mmregs
Define global symbolic names for the 'c54x registers. Supposedly equivalent to executing .set directives for each register with its memory-mapped value, but in reality is provided only for compatibility and does nothing.


.newblock
This directive resets any TIC54X local labels currently defined. Normal as local labels are unaffected.


.option option_list
Set listing options. Ignored.


.sblock "section_name" | section_name [,"name_n" | name_n]
Designate section_name for blocking. Blocking guarantees that a section will start on a page boundary (128 words) if it would otherwise cross a page boundary. Only initialized sections may be designated with this directive. See also See TIC54X-Block.


.sect "section_name"
Define a named initialized section and make it the current section.


symbol .set "value"
symbol .equ "value"
Equate a constant value to a symbol, which is placed in the symbol table. symbol may not be previously defined.


.space size_in_bits
.bes size_in_bits
Reserve the given number of bits in the current section and zero-fill them. If a label is used with .space, it points to the first word reserved. With .bes, the label points to the last word reserved.


.sslist
.ssnolist
Controls the inclusion of subsym replacement in the listing output. Ignored.


.string "string" [,...,"string_n"]
.pstring "string" [,...,"string_n"]
Place 8-bit characters from string into the current section. .string zero-fills the upper 8 bits of each word, while .pstring puts two characters into each word, filling the most-significant bits first. Unused space is zero-filled. If a label is used, it points to the first word initialized.


[stag] .struct [offset]
[name_1] element [count_1]
[name_2] element [count_2]
[tname] .tag stagx [tcount]
...
[name_n] element [count_n]
[ssize] .endstruct
label .tag [stag]
Assign symbolic offsets to the elements of a structure. stag defines a symbol to use to reference the structure. offset indicates a starting value to use for the first element encountered; otherwise it defaults to zero. Each element can have a named offset, name, which is a symbol assigned the value of the element's offset into the structure. If stag is missing, these become global symbols. count adjusts the offset that many times, as if element were an array. element may be one of .byte, .word, .long, .float, or any equivalent of those, and the structure offset is adjusted accordingly. .field and .string are also allowed; the size of .field is one bit, and .string is considered to be one word in size. Only element descriptors, structure/union tags, .align and conditional assembly directives are allowed within .struct/.endstruct. .align aligns member offsets to word boundaries only. ssize, if provided, will always be assigned the size of the structure.

The .tag directive, in addition to being used to define a structure/union element within a structure, may be used to apply a structure to a symbol. Once applied to label, the individual structure elements may be applied to label to produce the desired offsets using label as the structure base.


.tab
Set the tab size in the output listing. Ignored.


[utag] .union
[name_1] element [count_1]
[name_2] element [count_2]
[tname] .tag utagx[,tcount]
...
[name_n] element [count_n]
[usize] .endstruct
label .tag [utag]
Similar to .struct, but the offset after each element is reset to zero, and the usize is set to the maximum of all defined elements. Starting offset for the union is always zero.


[symbol] .usect "section_name", size, [,[blocking_flag] [,alignment_flag]]
Reserve space for variables in a named, uninitialized section (similar to .bss). .usect allows definitions sections independent of .bss. symbol points to the first location reserved by this allocation. The symbol may be used as a variable name. size is the allocated size in words. blocking_flag indicates whether to block this section on a page boundary (128 words) (see TIC54X-Block). alignment flag indicates whether the section should be longword-aligned.


.var sym[,..., sym_n]
Define a subsym to be a local variable within a macro. See See TIC54X-Macros.


.version version
Set which processor to build instructions for. Though the following values are accepted, the op is ignored.
541
542
543
545
545LP
546LP
548
549