insn-attr.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. /* Generated automatically by the program `genattr'
  2. from the machine description file `md'. */
  3. #ifndef GCC_INSN_ATTR_H
  4. #define GCC_INSN_ATTR_H
  5. #include "insn-attr-common.h"
  6. #define HAVE_ATTR_nonce_enabled 1
  7. extern enum attr_nonce_enabled get_attr_nonce_enabled (rtx_insn *);
  8. #define HAVE_ATTR_ce_enabled 1
  9. extern enum attr_ce_enabled get_attr_ce_enabled (rtx_insn *);
  10. #define HAVE_ATTR_tune 1
  11. extern enum attr_tune get_attr_tune (void);
  12. #define HAVE_ATTR_type 1
  13. extern enum attr_type get_attr_type (rtx_insn *);
  14. #define HAVE_ATTR_mul32 1
  15. extern enum attr_mul32 get_attr_mul32 (rtx_insn *);
  16. #define HAVE_ATTR_widen_mul64 1
  17. extern enum attr_widen_mul64 get_attr_widen_mul64 (rtx_insn *);
  18. #define HAVE_ATTR_is_neon_type 1
  19. extern enum attr_is_neon_type get_attr_is_neon_type (rtx_insn *);
  20. #define HAVE_ATTR_is_thumb 1
  21. extern enum attr_is_thumb get_attr_is_thumb (void);
  22. #define HAVE_ATTR_is_arch6 1
  23. extern enum attr_is_arch6 get_attr_is_arch6 (void);
  24. #define HAVE_ATTR_is_thumb1 1
  25. extern enum attr_is_thumb1 get_attr_is_thumb1 (void);
  26. #define HAVE_ATTR_predicable_short_it 1
  27. extern enum attr_predicable_short_it get_attr_predicable_short_it (rtx_insn *);
  28. #define HAVE_ATTR_enabled_for_short_it 1
  29. extern enum attr_enabled_for_short_it get_attr_enabled_for_short_it (rtx_insn *);
  30. #define HAVE_ATTR_shift 1
  31. extern int get_attr_shift (rtx_insn *);
  32. #define HAVE_ATTR_fp 1
  33. extern enum attr_fp get_attr_fp (rtx_insn *);
  34. #define HAVE_ATTR_fpu 1
  35. extern enum attr_fpu get_attr_fpu (void);
  36. #define HAVE_ATTR_predicated 1
  37. extern enum attr_predicated get_attr_predicated (rtx_insn *);
  38. #define HAVE_ATTR_length 1
  39. extern int get_attr_length (rtx_insn *);
  40. extern void shorten_branches (rtx_insn *);
  41. extern int insn_default_length (rtx_insn *);
  42. extern int insn_min_length (rtx_insn *);
  43. extern int insn_variable_length_p (rtx_insn *);
  44. extern int insn_current_length (rtx_insn *);
  45. #include "insn-addr.h"
  46. #define HAVE_ATTR_arch 1
  47. extern enum attr_arch get_attr_arch (rtx_insn *);
  48. #define HAVE_ATTR_arch_enabled 1
  49. extern enum attr_arch_enabled get_attr_arch_enabled (rtx_insn *);
  50. #define HAVE_ATTR_opt 1
  51. extern enum attr_opt get_attr_opt (rtx_insn *);
  52. #define HAVE_ATTR_opt_enabled 1
  53. extern enum attr_opt_enabled get_attr_opt_enabled (rtx_insn *);
  54. #define HAVE_ATTR_use_literal_pool 1
  55. extern enum attr_use_literal_pool get_attr_use_literal_pool (rtx_insn *);
  56. #define HAVE_ATTR_enabled 1
  57. extern enum attr_enabled get_attr_enabled (rtx_insn *);
  58. #define HAVE_ATTR_arm_pool_range 1
  59. extern int get_attr_arm_pool_range (rtx_insn *);
  60. #define HAVE_ATTR_thumb2_pool_range 1
  61. extern int get_attr_thumb2_pool_range (rtx_insn *);
  62. #define HAVE_ATTR_arm_neg_pool_range 1
  63. extern int get_attr_arm_neg_pool_range (rtx_insn *);
  64. #define HAVE_ATTR_thumb2_neg_pool_range 1
  65. extern int get_attr_thumb2_neg_pool_range (rtx_insn *);
  66. #define HAVE_ATTR_pool_range 1
  67. extern int get_attr_pool_range (rtx_insn *);
  68. #define HAVE_ATTR_neg_pool_range 1
  69. extern int get_attr_neg_pool_range (rtx_insn *);
  70. #define HAVE_ATTR_ldsched 1
  71. extern enum attr_ldsched get_attr_ldsched (void);
  72. #define HAVE_ATTR_conds 1
  73. extern enum attr_conds get_attr_conds (rtx_insn *);
  74. #define HAVE_ATTR_predicable 1
  75. extern enum attr_predicable get_attr_predicable (rtx_insn *);
  76. #define HAVE_ATTR_model_wbuf 1
  77. extern enum attr_model_wbuf get_attr_model_wbuf (void);
  78. #define HAVE_ATTR_write_conflict 1
  79. extern enum attr_write_conflict get_attr_write_conflict (rtx_insn *);
  80. #define HAVE_ATTR_core_cycles 1
  81. extern enum attr_core_cycles get_attr_core_cycles (rtx_insn *);
  82. #define HAVE_ATTR_far_jump 1
  83. extern enum attr_far_jump get_attr_far_jump (rtx_insn *);
  84. #define HAVE_ATTR_ce_count 1
  85. extern int get_attr_ce_count (rtx_insn *);
  86. #define HAVE_ATTR_tune_cortexr4 1
  87. extern enum attr_tune_cortexr4 get_attr_tune_cortexr4 (void);
  88. #define HAVE_ATTR_generic_sched 1
  89. extern enum attr_generic_sched get_attr_generic_sched (void);
  90. #define HAVE_ATTR_generic_vfp 1
  91. extern enum attr_generic_vfp get_attr_generic_vfp (void);
  92. #define HAVE_ATTR_marvell_f_iwmmxt 1
  93. extern enum attr_marvell_f_iwmmxt get_attr_marvell_f_iwmmxt (void);
  94. #define HAVE_ATTR_wmmxt_shift 1
  95. extern enum attr_wmmxt_shift get_attr_wmmxt_shift (rtx_insn *);
  96. #define HAVE_ATTR_wmmxt_pack 1
  97. extern enum attr_wmmxt_pack get_attr_wmmxt_pack (rtx_insn *);
  98. #define HAVE_ATTR_wmmxt_mult_c1 1
  99. extern enum attr_wmmxt_mult_c1 get_attr_wmmxt_mult_c1 (rtx_insn *);
  100. #define HAVE_ATTR_wmmxt_mult_c2 1
  101. extern enum attr_wmmxt_mult_c2 get_attr_wmmxt_mult_c2 (rtx_insn *);
  102. #define HAVE_ATTR_wmmxt_alu_c1 1
  103. extern enum attr_wmmxt_alu_c1 get_attr_wmmxt_alu_c1 (rtx_insn *);
  104. #define HAVE_ATTR_wmmxt_alu_c2 1
  105. extern enum attr_wmmxt_alu_c2 get_attr_wmmxt_alu_c2 (rtx_insn *);
  106. #define HAVE_ATTR_wmmxt_alu_c3 1
  107. extern enum attr_wmmxt_alu_c3 get_attr_wmmxt_alu_c3 (rtx_insn *);
  108. #define HAVE_ATTR_wmmxt_transfer_c1 1
  109. extern enum attr_wmmxt_transfer_c1 get_attr_wmmxt_transfer_c1 (rtx_insn *);
  110. #define HAVE_ATTR_wmmxt_transfer_c2 1
  111. extern enum attr_wmmxt_transfer_c2 get_attr_wmmxt_transfer_c2 (rtx_insn *);
  112. #define HAVE_ATTR_wmmxt_transfer_c3 1
  113. extern enum attr_wmmxt_transfer_c3 get_attr_wmmxt_transfer_c3 (rtx_insn *);
  114. #define HAVE_ATTR_vfp10 1
  115. extern enum attr_vfp10 get_attr_vfp10 (void);
  116. #define HAVE_ATTR_cortex_a7_neon_type 1
  117. extern enum attr_cortex_a7_neon_type get_attr_cortex_a7_neon_type (rtx_insn *);
  118. #define HAVE_ATTR_cortex_a8_neon_type 1
  119. extern enum attr_cortex_a8_neon_type get_attr_cortex_a8_neon_type (rtx_insn *);
  120. #define HAVE_ATTR_cortex_a9_neon_type 1
  121. extern enum attr_cortex_a9_neon_type get_attr_cortex_a9_neon_type (rtx_insn *);
  122. #define HAVE_ATTR_cortex_a15_neon_type 1
  123. extern enum attr_cortex_a15_neon_type get_attr_cortex_a15_neon_type (rtx_insn *);
  124. #define HAVE_ATTR_cortex_a17_neon_type 1
  125. extern enum attr_cortex_a17_neon_type get_attr_cortex_a17_neon_type (rtx_insn *);
  126. #define HAVE_ATTR_cortex_a53_advsimd_type 1
  127. extern enum attr_cortex_a53_advsimd_type get_attr_cortex_a53_advsimd_type (rtx_insn *);
  128. #define HAVE_ATTR_cortex_a57_neon_type 1
  129. extern enum attr_cortex_a57_neon_type get_attr_cortex_a57_neon_type (rtx_insn *);
  130. #define HAVE_ATTR_exynos_m1_neon_type 1
  131. extern enum attr_exynos_m1_neon_type get_attr_exynos_m1_neon_type (rtx_insn *);
  132. #define HAVE_ATTR_vqh_mnem 1
  133. extern enum attr_vqh_mnem get_attr_vqh_mnem (rtx_insn *);
  134. extern int num_delay_slots (rtx_insn *);
  135. extern int eligible_for_delay (rtx_insn *, int, rtx_insn *, int);
  136. extern int const_num_delay_slots (rtx_insn *);
  137. #define ANNUL_IFTRUE_SLOTS 0
  138. extern int eligible_for_annul_true (rtx_insn *, int, rtx_insn *, int);
  139. #define ANNUL_IFFALSE_SLOTS 0
  140. extern int eligible_for_annul_false (rtx_insn *, int, rtx_insn *, int);
  141. /* DFA based pipeline interface. */
  142. #ifndef AUTOMATON_ALTS
  143. #define AUTOMATON_ALTS 0
  144. #endif
  145. #ifndef AUTOMATON_STATE_ALTS
  146. #define AUTOMATON_STATE_ALTS 0
  147. #endif
  148. #ifndef CPU_UNITS_QUERY
  149. #define CPU_UNITS_QUERY 0
  150. #endif
  151. #define init_sched_attrs() do { } while (0)
  152. /* Internal insn code number used by automata. */
  153. extern int internal_dfa_insn_code (rtx_insn *);
  154. /* Insn latency time defined in define_insn_reservation. */
  155. extern int insn_default_latency (rtx_insn *);
  156. /* Return nonzero if there is a bypass for given insn
  157. which is a data producer. */
  158. extern int bypass_p (rtx_insn *);
  159. /* Insn latency time on data consumed by the 2nd insn.
  160. Use the function if bypass_p returns nonzero for
  161. the 1st insn. */
  162. extern int insn_latency (rtx_insn *, rtx_insn *);
  163. /* Maximal insn latency time possible of all bypasses for this insn.
  164. Use the function if bypass_p returns nonzero for
  165. the 1st insn. */
  166. extern int maximal_insn_latency (rtx_insn *);
  167. #if AUTOMATON_ALTS
  168. /* The following function returns number of alternative
  169. reservations of given insn. It may be used for better
  170. insns scheduling heuristics. */
  171. extern int insn_alts (rtx);
  172. #endif
  173. /* Maximal possible number of insns waiting results being
  174. produced by insns whose execution is not finished. */
  175. extern const int max_insn_queue_index;
  176. /* Pointer to data describing current state of DFA. */
  177. typedef void *state_t;
  178. /* Size of the data in bytes. */
  179. extern int state_size (void);
  180. /* Initiate given DFA state, i.e. Set up the state
  181. as all functional units were not reserved. */
  182. extern void state_reset (state_t);
  183. /* The following function returns negative value if given
  184. insn can be issued in processor state described by given
  185. DFA state. In this case, the DFA state is changed to
  186. reflect the current and future reservations by given
  187. insn. Otherwise the function returns minimal time
  188. delay to issue the insn. This delay may be zero
  189. for superscalar or VLIW processors. If the second
  190. parameter is NULL the function changes given DFA state
  191. as new processor cycle started. */
  192. extern int state_transition (state_t, rtx);
  193. #if AUTOMATON_STATE_ALTS
  194. /* The following function returns number of possible
  195. alternative reservations of given insn in given
  196. DFA state. It may be used for better insns scheduling
  197. heuristics. By default the function is defined if
  198. macro AUTOMATON_STATE_ALTS is defined because its
  199. implementation may require much memory. */
  200. extern int state_alts (state_t, rtx);
  201. #endif
  202. extern int min_issue_delay (state_t, rtx_insn *);
  203. /* The following function returns nonzero if no one insn
  204. can be issued in current DFA state. */
  205. extern int state_dead_lock_p (state_t);
  206. /* The function returns minimal delay of issue of the 2nd
  207. insn after issuing the 1st insn in given DFA state.
  208. The 1st insn should be issued in given state (i.e.
  209. state_transition should return negative value for
  210. the insn and the state). Data dependencies between
  211. the insns are ignored by the function. */
  212. extern int min_insn_conflict_delay (state_t, rtx_insn *, rtx_insn *);
  213. /* The following function outputs reservations for given
  214. insn as they are described in the corresponding
  215. define_insn_reservation. */
  216. extern void print_reservation (FILE *, rtx_insn *);
  217. #if CPU_UNITS_QUERY
  218. /* The following function returns code of functional unit
  219. with given name (see define_cpu_unit). */
  220. extern int get_cpu_unit_code (const char *);
  221. /* The following function returns nonzero if functional
  222. unit with given code is currently reserved in given
  223. DFA state. */
  224. extern int cpu_unit_reservation_p (state_t, int);
  225. #endif
  226. /* The following function returns true if insn
  227. has a dfa reservation. */
  228. extern bool insn_has_dfa_reservation_p (rtx_insn *);
  229. /* Clean insn code cache. It should be called if there
  230. is a chance that condition value in a
  231. define_insn_reservation will be changed after
  232. last call of dfa_start. */
  233. extern void dfa_clean_insn_cache (void);
  234. extern void dfa_clear_single_insn_cache (rtx_insn *);
  235. /* Initiate and finish work with DFA. They should be
  236. called as the first and the last interface
  237. functions. */
  238. extern void dfa_start (void);
  239. extern void dfa_finish (void);
  240. #ifndef HAVE_ATTR_length
  241. #define HAVE_ATTR_length 0
  242. #endif
  243. #ifndef HAVE_ATTR_enabled
  244. #define HAVE_ATTR_enabled 0
  245. #endif
  246. #ifndef HAVE_ATTR_preferred_for_size
  247. #define HAVE_ATTR_preferred_for_size 0
  248. #endif
  249. #ifndef HAVE_ATTR_preferred_for_speed
  250. #define HAVE_ATTR_preferred_for_speed 0
  251. #endif
  252. #if !HAVE_ATTR_length
  253. extern int hook_int_rtx_insn_unreachable (rtx_insn *);
  254. #define insn_default_length hook_int_rtx_insn_unreachable
  255. #define insn_min_length hook_int_rtx_insn_unreachable
  256. #define insn_variable_length_p hook_int_rtx_insn_unreachable
  257. #define insn_current_length hook_int_rtx_insn_unreachable
  258. #include "insn-addr.h"
  259. #endif
  260. extern int hook_int_rtx_1 (rtx);
  261. #if !HAVE_ATTR_enabled
  262. #define get_attr_enabled hook_int_rtx_1
  263. #endif
  264. #if !HAVE_ATTR_preferred_for_size
  265. #define get_attr_preferred_for_size hook_int_rtx_1
  266. #endif
  267. #if !HAVE_ATTR_preferred_for_speed
  268. #define get_attr_preferred_for_speed hook_int_rtx_1
  269. #endif
  270. #define ATTR_FLAG_forward 0x1
  271. #define ATTR_FLAG_backward 0x2
  272. #endif /* GCC_INSN_ATTR_H */