tm-preds.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376
  1. /* Generated automatically by the program 'build/genpreds'
  2. from the machine description file '../../../gcc-9-9.3.0/src/gcc/config/i386/i386.md'. */
  3. #ifndef GCC_TM_PREDS_H
  4. #define GCC_TM_PREDS_H
  5. #ifdef HAVE_MACHINE_MODES
  6. extern int general_operand (rtx, machine_mode);
  7. extern int address_operand (rtx, machine_mode);
  8. extern int register_operand (rtx, machine_mode);
  9. extern int pmode_register_operand (rtx, machine_mode);
  10. extern int scratch_operand (rtx, machine_mode);
  11. extern int immediate_operand (rtx, machine_mode);
  12. extern int const_int_operand (rtx, machine_mode);
  13. extern int const_scalar_int_operand (rtx, machine_mode);
  14. extern int const_double_operand (rtx, machine_mode);
  15. extern int nonimmediate_operand (rtx, machine_mode);
  16. extern int nonmemory_operand (rtx, machine_mode);
  17. extern int push_operand (rtx, machine_mode);
  18. extern int pop_operand (rtx, machine_mode);
  19. extern int memory_operand (rtx, machine_mode);
  20. extern int indirect_operand (rtx, machine_mode);
  21. extern int ordered_comparison_operator (rtx, machine_mode);
  22. extern int comparison_operator (rtx, machine_mode);
  23. extern int any_fp_register_operand (rtx, machine_mode);
  24. extern int fp_register_operand (rtx, machine_mode);
  25. extern int general_reg_operand (rtx, machine_mode);
  26. extern int nonimmediate_gr_operand (rtx, machine_mode);
  27. extern int general_gr_operand (rtx, machine_mode);
  28. extern int mmx_reg_operand (rtx, machine_mode);
  29. extern int sse_reg_operand (rtx, machine_mode);
  30. extern int ext_sse_reg_operand (rtx, machine_mode);
  31. extern int any_QIreg_operand (rtx, machine_mode);
  32. extern int QIreg_operand (rtx, machine_mode);
  33. extern int ext_QIreg_operand (rtx, machine_mode);
  34. extern int ax_reg_operand (rtx, machine_mode);
  35. extern int flags_reg_operand (rtx, machine_mode);
  36. extern int ext_register_operand (rtx, machine_mode);
  37. extern int register_ssemem_operand (rtx, machine_mode);
  38. extern int nonimm_ssenomem_operand (rtx, machine_mode);
  39. extern int x87nonimm_ssenomem_operand (rtx, machine_mode);
  40. extern int register_sse4nonimm_operand (rtx, machine_mode);
  41. extern int symbol_operand (rtx, machine_mode);
  42. extern int x86_64_immediate_operand (rtx, machine_mode);
  43. extern int x86_64_zext_immediate_operand (rtx, machine_mode);
  44. extern int x86_64_hilo_int_operand (rtx, machine_mode);
  45. extern int x86_64_dwzext_immediate_operand (rtx, machine_mode);
  46. extern int x86_64_immediate_size_operand (rtx, machine_mode);
  47. extern int x86_64_general_operand (rtx, machine_mode);
  48. extern int x86_64_hilo_general_operand (rtx, machine_mode);
  49. extern int x86_64_sext_operand (rtx, machine_mode);
  50. extern int sext_operand (rtx, machine_mode);
  51. extern int x86_64_zext_operand (rtx, machine_mode);
  52. extern int x86_64_szext_general_operand (rtx, machine_mode);
  53. extern int x86_64_nonmemory_operand (rtx, machine_mode);
  54. extern int x86_64_szext_nonmemory_operand (rtx, machine_mode);
  55. extern int pic_32bit_operand (rtx, machine_mode);
  56. extern int x86_64_movabs_operand (rtx, machine_mode);
  57. extern int symbolic_operand (rtx, machine_mode);
  58. extern int local_symbolic_operand (rtx, machine_mode);
  59. extern int gotoff_operand (rtx, machine_mode);
  60. extern int tls_symbolic_operand (rtx, machine_mode);
  61. extern int tls_modbase_operand (rtx, machine_mode);
  62. extern int tls_address_pattern (rtx, machine_mode);
  63. extern int constant_call_address_operand (rtx, machine_mode);
  64. extern int call_register_no_elim_operand (rtx, machine_mode);
  65. extern int register_no_elim_operand (rtx, machine_mode);
  66. extern int index_register_operand (rtx, machine_mode);
  67. extern int general_no_elim_operand (rtx, machine_mode);
  68. extern int nonmemory_no_elim_operand (rtx, machine_mode);
  69. extern int indirect_branch_operand (rtx, machine_mode);
  70. extern int sibcall_memory_operand (rtx, machine_mode);
  71. extern int GOT_memory_operand (rtx, machine_mode);
  72. extern int call_insn_operand (rtx, machine_mode);
  73. extern int sibcall_insn_operand (rtx, machine_mode);
  74. extern int GOT32_symbol_operand (rtx, machine_mode);
  75. extern int const0_operand (rtx, machine_mode);
  76. extern int const1_operand (rtx, machine_mode);
  77. extern int constm1_operand (rtx, machine_mode);
  78. extern int const8_operand (rtx, machine_mode);
  79. extern int const128_operand (rtx, machine_mode);
  80. extern int const_32bit_mask (rtx, machine_mode);
  81. extern int const248_operand (rtx, machine_mode);
  82. extern int const123_operand (rtx, machine_mode);
  83. extern int const2367_operand (rtx, machine_mode);
  84. extern int const1248_operand (rtx, machine_mode);
  85. extern int const359_operand (rtx, machine_mode);
  86. extern int const_4_or_8_to_11_operand (rtx, machine_mode);
  87. extern int const48_operand (rtx, machine_mode);
  88. extern int const_0_to_1_operand (rtx, machine_mode);
  89. extern int const_0_to_3_operand (rtx, machine_mode);
  90. extern int const_0_to_4_operand (rtx, machine_mode);
  91. extern int const_0_to_5_operand (rtx, machine_mode);
  92. extern int const_0_to_7_operand (rtx, machine_mode);
  93. extern int const_0_to_15_operand (rtx, machine_mode);
  94. extern int const_0_to_31_operand (rtx, machine_mode);
  95. extern int const_0_to_63_operand (rtx, machine_mode);
  96. extern int const_0_to_255_operand (rtx, machine_mode);
  97. extern int const_0_to_255_mul_8_operand (rtx, machine_mode);
  98. extern int const_1_to_31_operand (rtx, machine_mode);
  99. extern int const_1_to_63_operand (rtx, machine_mode);
  100. extern int const_2_to_3_operand (rtx, machine_mode);
  101. extern int const_4_to_5_operand (rtx, machine_mode);
  102. extern int const_4_to_7_operand (rtx, machine_mode);
  103. extern int const_6_to_7_operand (rtx, machine_mode);
  104. extern int const_8_to_9_operand (rtx, machine_mode);
  105. extern int const_8_to_11_operand (rtx, machine_mode);
  106. extern int const_8_to_15_operand (rtx, machine_mode);
  107. extern int const_10_to_11_operand (rtx, machine_mode);
  108. extern int const_12_to_13_operand (rtx, machine_mode);
  109. extern int const_12_to_15_operand (rtx, machine_mode);
  110. extern int const_14_to_15_operand (rtx, machine_mode);
  111. extern int const_16_to_19_operand (rtx, machine_mode);
  112. extern int const_16_to_31_operand (rtx, machine_mode);
  113. extern int const_20_to_23_operand (rtx, machine_mode);
  114. extern int const_24_to_27_operand (rtx, machine_mode);
  115. extern int const_28_to_31_operand (rtx, machine_mode);
  116. extern int incdec_operand (rtx, machine_mode);
  117. extern int reg_or_pm1_operand (rtx, machine_mode);
  118. extern int shiftdi_operand (rtx, machine_mode);
  119. extern int ashldi_input_operand (rtx, machine_mode);
  120. extern int zero_extended_scalar_load_operand (rtx, machine_mode);
  121. extern int vector_all_ones_operand (rtx, machine_mode);
  122. extern int vector_memory_operand (rtx, machine_mode);
  123. extern int vector_operand (rtx, machine_mode);
  124. extern int nonimmediate_or_const_vector_operand (rtx, machine_mode);
  125. extern int nonimmediate_or_sse_const_operand (rtx, machine_mode);
  126. extern int reg_or_0_operand (rtx, machine_mode);
  127. extern int nonimm_or_0_operand (rtx, machine_mode);
  128. extern int norex_memory_operand (rtx, machine_mode);
  129. extern int SImode_address_operand (rtx, machine_mode);
  130. extern int address_no_seg_operand (rtx, machine_mode);
  131. extern int vsib_address_operand (rtx, machine_mode);
  132. extern int vsib_mem_operator (rtx, machine_mode);
  133. extern int aligned_operand (rtx, machine_mode);
  134. extern int memory_displacement_operand (rtx, machine_mode);
  135. extern int memory_displacement_only_operand (rtx, machine_mode);
  136. extern int long_memory_operand (rtx, machine_mode);
  137. extern int fcmov_comparison_operator (rtx, machine_mode);
  138. extern int sse_comparison_operator (rtx, machine_mode);
  139. extern int ix86_comparison_int_operator (rtx, machine_mode);
  140. extern int ix86_comparison_uns_operator (rtx, machine_mode);
  141. extern int bt_comparison_operator (rtx, machine_mode);
  142. extern int ix86_comparison_operator (rtx, machine_mode);
  143. extern int ix86_carry_flag_operator (rtx, machine_mode);
  144. extern int ix86_trivial_fp_comparison_operator (rtx, machine_mode);
  145. extern int ix86_fp_comparison_operator (rtx, machine_mode);
  146. extern int cmp_fp_expander_operand (rtx, machine_mode);
  147. extern int binary_fp_operator (rtx, machine_mode);
  148. extern int mult_operator (rtx, machine_mode);
  149. extern int div_operator (rtx, machine_mode);
  150. extern int plusminuslogic_operator (rtx, machine_mode);
  151. extern int arith_or_logical_operator (rtx, machine_mode);
  152. extern int commutative_operator (rtx, machine_mode);
  153. extern int promotable_binary_operator (rtx, machine_mode);
  154. extern int compare_operator (rtx, machine_mode);
  155. extern int absneg_operator (rtx, machine_mode);
  156. extern int misaligned_operand (rtx, machine_mode);
  157. extern int vzeroall_operation (rtx, machine_mode);
  158. extern int vzeroall_pattern (rtx, machine_mode);
  159. extern int vzeroupper_pattern (rtx, machine_mode);
  160. extern int addsub_vm_operator (rtx, machine_mode);
  161. extern int addsub_vs_operator (rtx, machine_mode);
  162. extern int addsub_vs_parallel (rtx, machine_mode);
  163. extern int avx_vbroadcast_operand (rtx, machine_mode);
  164. extern int palignr_operand (rtx, machine_mode);
  165. extern int avx2_pblendw_operand (rtx, machine_mode);
  166. extern int general_vector_operand (rtx, machine_mode);
  167. extern int register_or_constm1_operand (rtx, machine_mode);
  168. extern int save_multiple (rtx, machine_mode);
  169. extern int restore_multiple (rtx, machine_mode);
  170. #endif /* HAVE_MACHINE_MODES */
  171. #define CONSTRAINT_NUM_DEFINED_P 1
  172. enum constraint_num
  173. {
  174. CONSTRAINT__UNKNOWN = 0,
  175. CONSTRAINT_r,
  176. CONSTRAINT_R,
  177. CONSTRAINT_q,
  178. CONSTRAINT_Q,
  179. CONSTRAINT_l,
  180. CONSTRAINT_a,
  181. CONSTRAINT_b,
  182. CONSTRAINT_c,
  183. CONSTRAINT_d,
  184. CONSTRAINT_S,
  185. CONSTRAINT_D,
  186. CONSTRAINT_A,
  187. CONSTRAINT_U,
  188. CONSTRAINT_f,
  189. CONSTRAINT_t,
  190. CONSTRAINT_u,
  191. CONSTRAINT_Yk,
  192. CONSTRAINT_k,
  193. CONSTRAINT_y,
  194. CONSTRAINT_x,
  195. CONSTRAINT_v,
  196. CONSTRAINT_Yz,
  197. CONSTRAINT_Yd,
  198. CONSTRAINT_Yp,
  199. CONSTRAINT_Ya,
  200. CONSTRAINT_Yb,
  201. CONSTRAINT_Yf,
  202. CONSTRAINT_Yr,
  203. CONSTRAINT_Yv,
  204. CONSTRAINT_I,
  205. CONSTRAINT_J,
  206. CONSTRAINT_K,
  207. CONSTRAINT_L,
  208. CONSTRAINT_M,
  209. CONSTRAINT_N,
  210. CONSTRAINT_O,
  211. CONSTRAINT_m,
  212. CONSTRAINT_o,
  213. CONSTRAINT_Bm,
  214. CONSTRAINT_Bc,
  215. CONSTRAINT_Bn,
  216. CONSTRAINT_p,
  217. CONSTRAINT_Tv,
  218. CONSTRAINT_Ts,
  219. CONSTRAINT_Bz,
  220. CONSTRAINT_G,
  221. CONSTRAINT_e,
  222. CONSTRAINT_We,
  223. CONSTRAINT_Wz,
  224. CONSTRAINT_Wd,
  225. CONSTRAINT_Wf,
  226. CONSTRAINT_Z,
  227. CONSTRAINT_Bf,
  228. CONSTRAINT_V,
  229. CONSTRAINT__l,
  230. CONSTRAINT__g,
  231. CONSTRAINT_i,
  232. CONSTRAINT_s,
  233. CONSTRAINT_n,
  234. CONSTRAINT_E,
  235. CONSTRAINT_F,
  236. CONSTRAINT_X,
  237. CONSTRAINT_Bg,
  238. CONSTRAINT_Bs,
  239. CONSTRAINT_Bw,
  240. CONSTRAINT_BC,
  241. CONSTRAINT_C,
  242. CONSTRAINT__LIMIT
  243. };
  244. extern enum constraint_num lookup_constraint_1 (const char *);
  245. extern const unsigned char lookup_constraint_array[];
  246. /* Return the constraint at the beginning of P, or CONSTRAINT__UNKNOWN if it
  247. isn't recognized. */
  248. static inline enum constraint_num
  249. lookup_constraint (const char *p)
  250. {
  251. unsigned int index = lookup_constraint_array[(unsigned char) *p];
  252. return (index == UCHAR_MAX
  253. ? lookup_constraint_1 (p)
  254. : (enum constraint_num) index);
  255. }
  256. extern bool (*constraint_satisfied_p_array[]) (rtx);
  257. /* Return true if X satisfies constraint C. */
  258. static inline bool
  259. constraint_satisfied_p (rtx x, enum constraint_num c)
  260. {
  261. int i = (int) c - (int) CONSTRAINT_I;
  262. return i >= 0 && constraint_satisfied_p_array[i] (x);
  263. }
  264. static inline bool
  265. insn_extra_register_constraint (enum constraint_num c)
  266. {
  267. return c >= CONSTRAINT_r && c <= CONSTRAINT_Yv;
  268. }
  269. static inline bool
  270. insn_extra_memory_constraint (enum constraint_num c)
  271. {
  272. return c >= CONSTRAINT_m && c <= CONSTRAINT_o;
  273. }
  274. static inline bool
  275. insn_extra_special_memory_constraint (enum constraint_num c)
  276. {
  277. return c >= CONSTRAINT_Bm && c <= CONSTRAINT_Bn;
  278. }
  279. static inline bool
  280. insn_extra_address_constraint (enum constraint_num c)
  281. {
  282. return c >= CONSTRAINT_p && c <= CONSTRAINT_Ts;
  283. }
  284. static inline void
  285. insn_extra_constraint_allows_reg_mem (enum constraint_num c,
  286. bool *allows_reg, bool *allows_mem)
  287. {
  288. if (c >= CONSTRAINT_Bz && c <= CONSTRAINT_Z)
  289. return;
  290. if (c >= CONSTRAINT_Bf && c <= CONSTRAINT_Bf)
  291. {
  292. *allows_reg = true;
  293. return;
  294. }
  295. if (c >= CONSTRAINT_V && c <= CONSTRAINT__g)
  296. {
  297. *allows_mem = true;
  298. return;
  299. }
  300. (void) c;
  301. *allows_reg = true;
  302. *allows_mem = true;
  303. }
  304. static inline size_t
  305. insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)
  306. {
  307. switch (fc)
  308. {
  309. case 'B': return 2;
  310. case 'T': return 2;
  311. case 'W': return 2;
  312. case 'Y': return 2;
  313. default: break;
  314. }
  315. return 1;
  316. }
  317. #define CONSTRAINT_LEN(c_,s_) insn_constraint_len (c_,s_)
  318. extern enum reg_class reg_class_for_constraint_1 (enum constraint_num);
  319. static inline enum reg_class
  320. reg_class_for_constraint (enum constraint_num c)
  321. {
  322. if (insn_extra_register_constraint (c))
  323. return reg_class_for_constraint_1 (c);
  324. return NO_REGS;
  325. }
  326. extern bool insn_const_int_ok_for_constraint (HOST_WIDE_INT, enum constraint_num);
  327. #define CONST_OK_FOR_CONSTRAINT_P(v_,c_,s_) \
  328. insn_const_int_ok_for_constraint (v_, lookup_constraint (s_))
  329. enum constraint_type
  330. {
  331. CT_REGISTER,
  332. CT_CONST_INT,
  333. CT_MEMORY,
  334. CT_SPECIAL_MEMORY,
  335. CT_ADDRESS,
  336. CT_FIXED_FORM
  337. };
  338. static inline enum constraint_type
  339. get_constraint_type (enum constraint_num c)
  340. {
  341. if (c >= CONSTRAINT_Bm)
  342. {
  343. if (c >= CONSTRAINT_Bz)
  344. return CT_FIXED_FORM;
  345. if (c >= CONSTRAINT_p)
  346. return CT_ADDRESS;
  347. return CT_SPECIAL_MEMORY;
  348. }
  349. if (c >= CONSTRAINT_m)
  350. return CT_MEMORY;
  351. if (c >= CONSTRAINT_I)
  352. return CT_CONST_INT;
  353. return CT_REGISTER;
  354. }
  355. #endif /* tm-preds.h */