sh.opt 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. ; Options for the SH port of the compiler.
  2. ; Copyright (C) 2005-2015 Free Software Foundation, Inc.
  3. ;
  4. ; This file is part of GCC.
  5. ;
  6. ; GCC is free software; you can redistribute it and/or modify it under
  7. ; the terms of the GNU General Public License as published by the Free
  8. ; Software Foundation; either version 3, or (at your option) any later
  9. ; version.
  10. ;
  11. ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  12. ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13. ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  14. ; for more details.
  15. ;
  16. ; You should have received a copy of the GNU General Public License
  17. ; along with GCC; see the file COPYING3. If not see
  18. ; <http://www.gnu.org/licenses/>.
  19. ;; Used for various architecture options.
  20. Mask(SH_E)
  21. ;; Set if the default precision of the FPU is single.
  22. Mask(FPU_SINGLE)
  23. ;; Set if the a double-precision FPU is present but is restricted to
  24. ;; single precision usage only.
  25. Mask(FPU_SINGLE_ONLY)
  26. ;; Set if we should generate code using type 2A insns.
  27. Mask(HARD_SH2A)
  28. ;; Set if we should generate code using type 2A DF insns.
  29. Mask(HARD_SH2A_DOUBLE)
  30. ;; Set if compiling for SH4 hardware (to be used for insn costs etc.)
  31. Mask(HARD_SH4)
  32. ;; Set if we should generate code for a SH5 CPU (either ISA).
  33. Mask(SH5)
  34. ;; Set if we should save all target registers.
  35. Mask(SAVE_ALL_TARGET_REGS)
  36. m1
  37. Target RejectNegative Mask(SH1) Condition(SUPPORT_SH1)
  38. Generate SH1 code
  39. m2
  40. Target RejectNegative Mask(SH2) Condition(SUPPORT_SH2)
  41. Generate SH2 code
  42. m2a
  43. Target RejectNegative Condition(SUPPORT_SH2A)
  44. Generate default double-precision SH2a-FPU code
  45. m2a-nofpu
  46. Target RejectNegative Condition(SUPPORT_SH2A_NOFPU)
  47. Generate SH2a FPU-less code
  48. m2a-single
  49. Target RejectNegative Condition(SUPPORT_SH2A_SINGLE)
  50. Generate default single-precision SH2a-FPU code
  51. m2a-single-only
  52. Target RejectNegative Condition(SUPPORT_SH2A_SINGLE_ONLY)
  53. Generate only single-precision SH2a-FPU code
  54. m2e
  55. Target RejectNegative Condition(SUPPORT_SH2E)
  56. Generate SH2e code
  57. m3
  58. Target RejectNegative Mask(SH3) Condition(SUPPORT_SH3)
  59. Generate SH3 code
  60. m3e
  61. Target RejectNegative Condition(SUPPORT_SH3E)
  62. Generate SH3e code
  63. m4
  64. Target RejectNegative Mask(SH4) Condition(SUPPORT_SH4)
  65. Generate SH4 code
  66. m4-100
  67. Target RejectNegative Condition(SUPPORT_SH4)
  68. Generate SH4-100 code
  69. m4-200
  70. Target RejectNegative Condition(SUPPORT_SH4)
  71. Generate SH4-200 code
  72. ;; TARGET_SH4_300 indicates if we have the ST40-300 instruction set and
  73. ;; pipeline - irrespective of ABI.
  74. m4-300
  75. Target RejectNegative Condition(SUPPORT_SH4) Var(TARGET_SH4_300)
  76. Generate SH4-300 code
  77. m4-nofpu
  78. Target RejectNegative Condition(SUPPORT_SH4_NOFPU)
  79. Generate SH4 FPU-less code
  80. m4-100-nofpu
  81. Target RejectNegative Condition(SUPPORT_SH4_NOFPU)
  82. Generate SH4-100 FPU-less code
  83. m4-200-nofpu
  84. Target RejectNegative Condition(SUPPORT_SH4_NOFPU)
  85. Generate SH4-200 FPU-less code
  86. m4-300-nofpu
  87. Target RejectNegative Condition(SUPPORT_SH4_NOFPU) Var(TARGET_SH4_300)
  88. Generate SH4-300 FPU-less code
  89. m4-340
  90. Target RejectNegative Condition(SUPPORT_SH4_NOFPU) Var(TARGET_SH4_300)
  91. Generate code for SH4 340 series (MMU/FPU-less)
  92. ;; passes -isa=sh4-nommu-nofpu to the assembler.
  93. m4-400
  94. Target RejectNegative Condition(SUPPORT_SH4_NOFPU)
  95. Generate code for SH4 400 series (MMU/FPU-less)
  96. ;; passes -isa=sh4-nommu-nofpu to the assembler.
  97. m4-500
  98. Target RejectNegative Condition(SUPPORT_SH4_NOFPU)
  99. Generate code for SH4 500 series (FPU-less).
  100. ;; passes -isa=sh4-nofpu to the assembler.
  101. m4-single
  102. Target RejectNegative Condition(SUPPORT_SH4_SINGLE)
  103. Generate default single-precision SH4 code
  104. m4-100-single
  105. Target RejectNegative Condition(SUPPORT_SH4_SINGLE)
  106. Generate default single-precision SH4-100 code
  107. m4-200-single
  108. Target RejectNegative Condition(SUPPORT_SH4_SINGLE)
  109. Generate default single-precision SH4-200 code
  110. m4-300-single
  111. Target RejectNegative Condition(SUPPORT_SH4_SINGLE) Var(TARGET_SH4_300)
  112. Generate default single-precision SH4-300 code
  113. m4-single-only
  114. Target RejectNegative Condition(SUPPORT_SH4_SINGLE_ONLY)
  115. Generate only single-precision SH4 code
  116. m4-100-single-only
  117. Target RejectNegative Condition(SUPPORT_SH4_SINGLE_ONLY)
  118. Generate only single-precision SH4-100 code
  119. m4-200-single-only
  120. Target RejectNegative Condition(SUPPORT_SH4_SINGLE_ONLY)
  121. Generate only single-precision SH4-200 code
  122. m4-300-single-only
  123. Target RejectNegative Condition(SUPPORT_SH4_SINGLE_ONLY) Var(TARGET_SH4_300)
  124. Generate only single-precision SH4-300 code
  125. m4a
  126. Target RejectNegative Mask(SH4A) Condition(SUPPORT_SH4A)
  127. Generate SH4a code
  128. m4a-nofpu
  129. Target RejectNegative Condition(SUPPORT_SH4A_NOFPU)
  130. Generate SH4a FPU-less code
  131. m4a-single
  132. Target RejectNegative Condition(SUPPORT_SH4A_SINGLE)
  133. Generate default single-precision SH4a code
  134. m4a-single-only
  135. Target RejectNegative Condition(SUPPORT_SH4A_SINGLE_ONLY)
  136. Generate only single-precision SH4a code
  137. m4al
  138. Target RejectNegative Condition(SUPPORT_SH4AL)
  139. Generate SH4al-dsp code
  140. m5-32media
  141. Target RejectNegative Condition(SUPPORT_SH5_32MEDIA)
  142. Generate 32-bit SHmedia code
  143. m5-32media-nofpu
  144. Target RejectNegative Condition(SUPPORT_SH5_32MEDIA_NOFPU)
  145. Generate 32-bit FPU-less SHmedia code
  146. m5-64media
  147. Target RejectNegative Condition(SUPPORT_SH5_64MEDIA)
  148. Generate 64-bit SHmedia code
  149. m5-64media-nofpu
  150. Target RejectNegative Condition(SUPPORT_SH5_64MEDIA_NOFPU)
  151. Generate 64-bit FPU-less SHmedia code
  152. m5-compact
  153. Target RejectNegative Condition(SUPPORT_SH5_32MEDIA)
  154. Generate SHcompact code
  155. m5-compact-nofpu
  156. Target RejectNegative Condition(SUPPORT_SH5_32MEDIA_NOFPU)
  157. Generate FPU-less SHcompact code
  158. maccumulate-outgoing-args
  159. Target Report Var(TARGET_ACCUMULATE_OUTGOING_ARGS) Init(1)
  160. Reserve space for outgoing arguments in the function prologue
  161. madjust-unroll
  162. Target Ignore
  163. Does nothing. Preserved for backward compatibility.
  164. mb
  165. Target Report RejectNegative InverseMask(LITTLE_ENDIAN)
  166. Generate code in big endian mode
  167. mbigtable
  168. Target Report RejectNegative Mask(BIGTABLE)
  169. Generate 32-bit offsets in switch tables
  170. mbitops
  171. Target Report RejectNegative Mask(BITOPS)
  172. Generate bit instructions
  173. mbranch-cost=
  174. Target RejectNegative Joined UInteger Var(sh_branch_cost) Init(-1)
  175. Cost to assume for a branch insn
  176. mzdcbranch
  177. Target Report Var(TARGET_ZDCBRANCH)
  178. Assume that zero displacement conditional branches are fast
  179. mcbranchdi
  180. Target Undocumented Var(TARGET_CBRANCHDI4) Warn(%qs is deprecated and has no effect)
  181. Enable cbranchdi4 pattern
  182. mcmpeqdi
  183. Target Undocumented Var(TARGET_CMPEQDI_T) Warn(%qs is deprecated and has no effect)
  184. Emit cmpeqdi_t pattern even when -mcbranchdi is in effect.
  185. mcbranch-force-delay-slot
  186. Target Report RejectNegative Var(TARGET_CBRANCH_FORCE_DELAY_SLOT) Init(0)
  187. Force the usage of delay slots for conditional branches.
  188. mcut2-workaround
  189. Target RejectNegative Var(TARGET_SH5_CUT2_WORKAROUND)
  190. Enable SH5 cut2 workaround
  191. mdalign
  192. Target Report RejectNegative Mask(ALIGN_DOUBLE)
  193. Align doubles at 64-bit boundaries
  194. mdiv=
  195. Target RejectNegative Joined Var(sh_div_str) Init("")
  196. Division strategy, one of: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call, inv:call2, inv:fp, call-div1, call-fp, call-table
  197. mdivsi3_libfunc=
  198. Target RejectNegative Joined Var(sh_divsi3_libfunc) Init("")
  199. Specify name for 32 bit signed division function
  200. mfmovd
  201. Target RejectNegative Mask(FMOVD)
  202. Enable the use of 64-bit floating point registers in fmov instructions. See -mdalign if 64-bit alignment is required.
  203. mfixed-range=
  204. Target RejectNegative Joined Var(sh_fixed_range_str)
  205. Specify range of registers to make fixed
  206. mgettrcost=
  207. Target RejectNegative Joined UInteger Var(sh_gettrcost) Init(-1)
  208. Cost to assume for gettr insn
  209. mhitachi
  210. Target Report RejectNegative Mask(HITACHI)
  211. Follow Renesas (formerly Hitachi) / SuperH calling conventions
  212. mieee
  213. Target Var(TARGET_IEEE)
  214. Increase the IEEE compliance for floating-point comparisons
  215. mindexed-addressing
  216. Target Report Mask(ALLOW_INDEXED_ADDRESS) Condition(SUPPORT_ANY_SH5_32MEDIA)
  217. Enable the use of the indexed addressing mode for SHmedia32/SHcompact
  218. minline-ic_invalidate
  219. Target Report Var(TARGET_INLINE_IC_INVALIDATE)
  220. inline code to invalidate instruction cache entries after setting up nested function trampolines
  221. minvalid-symbols
  222. Target Report Mask(INVALID_SYMBOLS) Condition(SUPPORT_ANY_SH5)
  223. Assume symbols might be invalid
  224. misize
  225. Target Report RejectNegative Mask(DUMPISIZE)
  226. Annotate assembler instructions with estimated addresses
  227. ml
  228. Target Report RejectNegative Mask(LITTLE_ENDIAN)
  229. Generate code in little endian mode
  230. mnomacsave
  231. Target Report RejectNegative Mask(NOMACSAVE)
  232. Mark MAC register as call-clobbered
  233. ;; ??? This option is not useful, but is retained in case there are people
  234. ;; who are still relying on it. It may be deleted in the future.
  235. mpadstruct
  236. Target Report RejectNegative Mask(PADSTRUCT)
  237. Make structs a multiple of 4 bytes (warning: ABI altered)
  238. mprefergot
  239. Target Report RejectNegative Mask(PREFERGOT)
  240. Emit function-calls using global offset table when generating PIC
  241. mpt-fixed
  242. Target Report Mask(PT_FIXED) Condition(SUPPORT_ANY_SH5)
  243. Assume pt* instructions won't trap
  244. mrelax
  245. Target Report RejectNegative Mask(RELAX)
  246. Shorten address references during linking
  247. mrenesas
  248. Target Mask(HITACHI)
  249. Follow Renesas (formerly Hitachi) / SuperH calling conventions
  250. msoft-atomic
  251. Target Undocumented Alias(matomic-model=, soft-gusa, none)
  252. Deprecated. Use -matomic= instead to select the atomic model
  253. matomic-model=
  254. Target Report RejectNegative Joined Var(sh_atomic_model_str)
  255. Specify the model for atomic operations
  256. mtas
  257. Target Report RejectNegative Var(TARGET_ENABLE_TAS)
  258. Use tas.b instruction for __atomic_test_and_set
  259. mspace
  260. Target RejectNegative Alias(Os)
  261. Deprecated. Use -Os instead
  262. multcost=
  263. Target RejectNegative Joined UInteger Var(sh_multcost) Init(-1)
  264. Cost to assume for a multiply insn
  265. musermode
  266. Target Var(TARGET_USERMODE)
  267. Don't generate privileged-mode only code; implies -mno-inline-ic_invalidate if the inline code would not work in user mode.
  268. ;; We might want to enable this by default for TARGET_HARD_SH4, because
  269. ;; zero-offset branches have zero latency. Needs some benchmarking.
  270. mpretend-cmove
  271. Target Var(TARGET_PRETEND_CMOVE)
  272. Pretend a branch-around-a-move is a conditional move.
  273. mfsca
  274. Target Var(TARGET_FSCA)
  275. Enable the use of the fsca instruction
  276. mfsrra
  277. Target Var(TARGET_FSRRA)
  278. Enable the use of the fsrra instruction
  279. mlra
  280. Target Report Var(sh_lra_flag) Init(0) Save
  281. Use LRA instead of reload (transitional)