c-tic6x.texi 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. @c Copyright (C) 2010-2022 Free Software Foundation, Inc.
  2. @c This is part of the GAS manual.
  3. @c For copying conditions, see the file as.texinfo.
  4. @c man end
  5. @ifset GENERIC
  6. @page
  7. @node TIC6X-Dependent
  8. @chapter TIC6X Dependent Features
  9. @end ifset
  10. @ifclear GENERIC
  11. @node Machine Dependencies
  12. @chapter TIC6X Dependent Features
  13. @end ifclear
  14. @cindex TIC6X support
  15. @cindex TMS320C6X support
  16. @menu
  17. * TIC6X Options:: Options
  18. * TIC6X Syntax:: Syntax
  19. * TIC6X Directives:: Directives
  20. @end menu
  21. @node TIC6X Options
  22. @section TIC6X Options
  23. @cindex TIC6X options
  24. @cindex options for TIC6X
  25. @c man begin OPTIONS
  26. @table @gcctabopt
  27. @cindex @code{-march=} command-line option, TIC6X
  28. @item -march=@var{arch}
  29. Enable (only) instructions from architecture @var{arch}. By default,
  30. all instructions are permitted.
  31. The following values of @var{arch} are accepted: @code{c62x},
  32. @code{c64x}, @code{c64x+}, @code{c67x}, @code{c67x+}, @code{c674x}.
  33. @cindex @code{-mdsbt} command-line option, TIC6X
  34. @cindex @code{-mno-dsbt} command-line option, TIC6X
  35. @item -mdsbt
  36. @itemx -mno-dsbt
  37. The @option{-mdsbt} option causes the assembler to generate the
  38. @code{Tag_ABI_DSBT} attribute with a value of 1, indicating that the
  39. code is using DSBT addressing. The @option{-mno-dsbt} option, the
  40. default, causes the tag to have a value of 0, indicating that the code
  41. does not use DSBT addressing. The linker will emit a warning if
  42. objects of different type (DSBT and non-DSBT) are linked together.
  43. @cindex @code{-mpid=} command-line option, TIC6X
  44. @item -mpid=no
  45. @itemx -mpid=near
  46. @itemx -mpid=far
  47. The @option{-mpid=} option causes the assembler to generate the
  48. @code{Tag_ABI_PID} attribute with a value indicating the form of data
  49. addressing used by the code. @option{-mpid=no}, the default,
  50. indicates position-dependent data addressing, @option{-mpid=near}
  51. indicates position-independent addressing with GOT accesses using near
  52. DP addressing, and @option{-mpid=far} indicates position-independent
  53. addressing with GOT accesses using far DP addressing. The linker will
  54. emit a warning if objects built with different settings of this option
  55. are linked together.
  56. @cindex @code{-mpic} command-line option, TIC6X
  57. @cindex @code{-mno-pic} command-line option, TIC6X
  58. @item -mpic
  59. @itemx -mno-pic
  60. The @option{-mpic} option causes the assembler to generate the
  61. @code{Tag_ABI_PIC} attribute with a value of 1, indicating that the
  62. code is using position-independent code addressing, The
  63. @code{-mno-pic} option, the default, causes the tag to have a value of
  64. 0, indicating position-dependent code addressing. The linker will
  65. emit a warning if objects of different type (position-dependent and
  66. position-independent) are linked together.
  67. @cindex TIC6X big-endian output
  68. @cindex TIC6X little-endian output
  69. @cindex big-endian output, TIC6X
  70. @cindex little-endian output, TIC6X
  71. @item -mbig-endian
  72. @itemx -mlittle-endian
  73. Generate code for the specified endianness. The default is
  74. little-endian.
  75. @end table
  76. @c man end
  77. @node TIC6X Syntax
  78. @section TIC6X Syntax
  79. @cindex line comment character, TIC6X
  80. @cindex TIC6X line comment character
  81. The presence of a @samp{;} on a line indicates the start of a comment
  82. that extends to the end of the current line. If a @samp{#} or
  83. @samp{*} appears as the first character of a line, the whole line is
  84. treated as a comment. Note that if a line starts with a @samp{#}
  85. character then it can also be a logical line number directive
  86. (@pxref{Comments}) or a preprocessor control command
  87. (@pxref{Preprocessing}).
  88. @cindex line separator, TIC6X
  89. @cindex statement separator, TIC6X
  90. @cindex TIC6X line separator
  91. The @samp{@@} character can be used instead of a newline to separate
  92. statements.
  93. Instruction, register and functional unit names are case-insensitive.
  94. @command{@value{AS}} requires fully-specified functional unit names,
  95. such as @samp{.S1}, @samp{.L1X} or @samp{.D1T2}, on all instructions
  96. using a functional unit.
  97. For some instructions, there may be syntactic ambiguity between
  98. register or functional unit names and the names of labels or other
  99. symbols. To avoid this, enclose the ambiguous symbol name in
  100. parentheses; register and functional unit names may not be enclosed in
  101. parentheses.
  102. @node TIC6X Directives
  103. @section TIC6X Directives
  104. @cindex machine directives, TIC6X
  105. @cindex TIC6X machine directives
  106. Directives controlling the set of instructions accepted by the
  107. assembler have effect for instructions between the directive and any
  108. subsequent directive overriding it.
  109. @table @code
  110. @cindex @code{.arch} directive, TIC6X
  111. @item .arch @var{arch}
  112. This has the same effect as @option{-march=@var{arch}}.
  113. @cindex @code{.cantunwind} directive, TIC6X
  114. @item .cantunwind
  115. Prevents unwinding through the current function. No personality routine
  116. or exception table data is required or permitted.
  117. If this is not specified then frame unwinding information will be
  118. constructed from CFI directives. @pxref{CFI directives}.
  119. @cindex @code{.c6xabi_attribute} directive, TIC6X
  120. @item .c6xabi_attribute @var{tag}, @var{value}
  121. Set the C6000 EABI build attribute @var{tag} to @var{value}.
  122. The @var{tag} is either an attribute number or one of
  123. @code{Tag_ISA}, @code{Tag_ABI_wchar_t},
  124. @code{Tag_ABI_stack_align_needed},
  125. @code{Tag_ABI_stack_align_preserved}, @code{Tag_ABI_DSBT},
  126. @code{Tag_ABI_PID}, @code{Tag_ABI_PIC},
  127. @code{TAG_ABI_array_object_alignment},
  128. @code{TAG_ABI_array_object_align_expected},
  129. @code{Tag_ABI_compatibility} and @code{Tag_ABI_conformance}. The
  130. @var{value} is either a @code{number}, @code{"string"}, or
  131. @code{number, "string"} depending on the tag.
  132. @cindex @code{.ehtype} directive, TIC6X
  133. @item .ehtype @var{symbol}
  134. Output an exception type table reference to @var{symbol}.
  135. @cindex @code{.endp} directive, TIC6X
  136. @item .endp
  137. Marks the end of and exception table or function. If preceded by a
  138. @code{.handlerdata} directive then this also switched back to the previous
  139. text section.
  140. @cindex @code{.handlerdata} directive, TIC6X
  141. @item .handlerdata
  142. Marks the end of the current function, and the start of the exception table
  143. entry for that function. Anything between this directive and the
  144. @code{.endp} directive will be added to the exception table entry.
  145. Must be preceded by a CFI block containing a @code{.cfi_lsda} directive.
  146. @cindex @code{.nocmp} directive, TIC6X
  147. @item .nocmp
  148. Disallow use of C64x+ compact instructions in the current text
  149. section.
  150. @cindex @code{.personalityindex} directive, TIC6X
  151. @item .personalityindex @var{index}
  152. Sets the personality routine for the current function to the ABI specified
  153. compact routine number @var{index}
  154. @cindex @code{.personality} directive, TIC6X
  155. @item .personality @var{name}
  156. Sets the personality routine for the current function to @var{name}.
  157. @cindex @code{.scomm} directive, TIC6X
  158. @item .scomm @var{symbol}, @var{size}, @var{align}
  159. Like @code{.comm}, creating a common symbol @var{symbol} with size @var{size}
  160. and alignment @var{align}, but unlike when using @code{.comm}, this symbol
  161. will be placed into the small BSS section by the linker.
  162. @end table