Texas Instruments TMS320C54x User Manual page 174

Digital signal processors
Hide thumbs Also See for TMS320C54x:
Table of Contents

Advertisement

utag
is the union's tag. Its value is associated with the beginning of the
union. If no utag is present, the assembler puts the union
members in the global symbol table with the value of their abso-
lute offset from the top of the union. In this case, each member
must have a unique name.
expr
is an optional expression indicating the beginning offset of the
union. Unions default to start at 0.
mem
is an optional label for a member of the union. This label is abso-
n
lute and equates to the present offset from the beginning of the
union. A label for a union member cannot be declared global.
element
is one of the following descriptors: .byte, .char, .double, field,
.float, .half, .int, .long, .short, .string, .ubyte, .uchar, .uhalt, .uint,
.ulong, .ushort, .uword, and .word. An element can also be a com-
plete declaration of a nested structure or union, or a structure or
union declared by its tag. Following a .union directive, these
directives describe the element's size. They do not allocate
memory.
expr
is an optional expression for the number of elements described.
n
This value defaults to 1. A .string element is considered to be one
word in size, and a .field element is one bit.
size
is an optional label for the total size of the union.
Note: Directives That Can Appear in a .union /.endunion Sequence
The only directives that can appear in a .union/.endunion sequence are ele-
ment descriptors, structure and union tags, conditional assembly directives,
and the .align directive, which aligns the member offsets on word bound-
aries. Empty structures are illegal.
These examples show unions with and without tags.
.union/.endunion/.tag
Declare Union Type
Assembler Directives
4-91

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C54x and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents