tm-preds.h 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. /* Generated automatically by the program 'build/genpreds'
  2. from the machine description file '/srv/openwrt/ar71xx/build/build_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/gcc-5.3.0/gcc/config/mips/mips.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_double_operand (rtx, machine_mode);
  14. extern int nonimmediate_operand (rtx, machine_mode);
  15. extern int nonmemory_operand (rtx, machine_mode);
  16. extern int push_operand (rtx, machine_mode);
  17. extern int pop_operand (rtx, machine_mode);
  18. extern int memory_operand (rtx, machine_mode);
  19. extern int indirect_operand (rtx, machine_mode);
  20. extern int ordered_comparison_operator (rtx, machine_mode);
  21. extern int comparison_operator (rtx, machine_mode);
  22. extern int const_uns_arith_operand (rtx, machine_mode);
  23. extern int uns_arith_operand (rtx, machine_mode);
  24. extern int const_arith_operand (rtx, machine_mode);
  25. extern int arith_operand (rtx, machine_mode);
  26. extern int const_immlsa_operand (rtx, machine_mode);
  27. extern int const_uimm6_operand (rtx, machine_mode);
  28. extern int const_imm10_operand (rtx, machine_mode);
  29. extern int reg_imm10_operand (rtx, machine_mode);
  30. extern int sle_operand (rtx, machine_mode);
  31. extern int sleu_operand (rtx, machine_mode);
  32. extern int const_0_operand (rtx, machine_mode);
  33. extern int reg_or_0_operand (rtx, machine_mode);
  34. extern int const_1_operand (rtx, machine_mode);
  35. extern int reg_or_1_operand (rtx, machine_mode);
  36. extern int const_0_or_1_operand (rtx, machine_mode);
  37. extern int const_2_or_3_operand (rtx, machine_mode);
  38. extern int const_0_to_3_operand (rtx, machine_mode);
  39. extern int qi_mask_operand (rtx, machine_mode);
  40. extern int hi_mask_operand (rtx, machine_mode);
  41. extern int si_mask_operand (rtx, machine_mode);
  42. extern int and_load_operand (rtx, machine_mode);
  43. extern int low_bitmask_operand (rtx, machine_mode);
  44. extern int and_reg_operand (rtx, machine_mode);
  45. extern int and_operand (rtx, machine_mode);
  46. extern int d_operand (rtx, machine_mode);
  47. extern int lwsp_swsp_operand (rtx, machine_mode);
  48. extern int lw16_sw16_operand (rtx, machine_mode);
  49. extern int lhu16_sh16_operand (rtx, machine_mode);
  50. extern int lbu16_operand (rtx, machine_mode);
  51. extern int sb16_operand (rtx, machine_mode);
  52. extern int db4_operand (rtx, machine_mode);
  53. extern int db7_operand (rtx, machine_mode);
  54. extern int db8_operand (rtx, machine_mode);
  55. extern int ib3_operand (rtx, machine_mode);
  56. extern int sb4_operand (rtx, machine_mode);
  57. extern int sb5_operand (rtx, machine_mode);
  58. extern int sb8_operand (rtx, machine_mode);
  59. extern int sd8_operand (rtx, machine_mode);
  60. extern int ub4_operand (rtx, machine_mode);
  61. extern int ub8_operand (rtx, machine_mode);
  62. extern int uh4_operand (rtx, machine_mode);
  63. extern int uw4_operand (rtx, machine_mode);
  64. extern int uw5_operand (rtx, machine_mode);
  65. extern int uw6_operand (rtx, machine_mode);
  66. extern int uw8_operand (rtx, machine_mode);
  67. extern int addiur2_operand (rtx, machine_mode);
  68. extern int addiusp_operand (rtx, machine_mode);
  69. extern int andi16_operand (rtx, machine_mode);
  70. extern int movep_src_register (rtx, machine_mode);
  71. extern int movep_src_operand (rtx, machine_mode);
  72. extern int lo_operand (rtx, machine_mode);
  73. extern int hilo_operand (rtx, machine_mode);
  74. extern int fcc_reload_operand (rtx, machine_mode);
  75. extern int muldiv_target_operand (rtx, machine_mode);
  76. extern int const_call_insn_operand (rtx, machine_mode);
  77. extern int call_insn_operand (rtx, machine_mode);
  78. extern int splittable_const_int_operand (rtx, machine_mode);
  79. extern int move_operand (rtx, machine_mode);
  80. extern int cprestore_save_slot_operand (rtx, machine_mode);
  81. extern int cprestore_load_slot_operand (rtx, machine_mode);
  82. extern int consttable_operand (rtx, machine_mode);
  83. extern int symbolic_operand (rtx, machine_mode);
  84. extern int absolute_symbolic_operand (rtx, machine_mode);
  85. extern int symbolic_operand_with_high (rtx, machine_mode);
  86. extern int force_to_mem_operand (rtx, machine_mode);
  87. extern int got_disp_operand (rtx, machine_mode);
  88. extern int got_page_ofst_operand (rtx, machine_mode);
  89. extern int tls_reloc_operand (rtx, machine_mode);
  90. extern int symbol_ref_operand (rtx, machine_mode);
  91. extern int stack_operand (rtx, machine_mode);
  92. extern int macc_msac_operand (rtx, machine_mode);
  93. extern int equality_operator (rtx, machine_mode);
  94. extern int extend_operator (rtx, machine_mode);
  95. extern int trap_comparison_operator (rtx, machine_mode);
  96. extern int order_operator (rtx, machine_mode);
  97. extern int mips_cstore_operator (rtx, machine_mode);
  98. extern int small_data_pattern (rtx, machine_mode);
  99. extern int mem_noofs_operand (rtx, machine_mode);
  100. extern int non_volatile_mem_operand (rtx, machine_mode);
  101. #endif /* HAVE_MACHINE_MODES */
  102. #define CONSTRAINT_NUM_DEFINED_P 1
  103. enum constraint_num
  104. {
  105. CONSTRAINT__UNKNOWN = 0,
  106. CONSTRAINT_r,
  107. CONSTRAINT_d,
  108. CONSTRAINT_t,
  109. CONSTRAINT_f,
  110. CONSTRAINT_h,
  111. CONSTRAINT_l,
  112. CONSTRAINT_x,
  113. CONSTRAINT_b,
  114. CONSTRAINT_u,
  115. CONSTRAINT_c,
  116. CONSTRAINT_e,
  117. CONSTRAINT_j,
  118. CONSTRAINT_v,
  119. CONSTRAINT_y,
  120. CONSTRAINT_z,
  121. CONSTRAINT_A,
  122. CONSTRAINT_a,
  123. CONSTRAINT_B,
  124. CONSTRAINT_C,
  125. CONSTRAINT_D,
  126. CONSTRAINT_ka,
  127. CONSTRAINT_kb,
  128. CONSTRAINT_I,
  129. CONSTRAINT_J,
  130. CONSTRAINT_K,
  131. CONSTRAINT_L,
  132. CONSTRAINT_M,
  133. CONSTRAINT_N,
  134. CONSTRAINT_O,
  135. CONSTRAINT_P,
  136. CONSTRAINT_m,
  137. CONSTRAINT_o,
  138. CONSTRAINT_R,
  139. CONSTRAINT_W,
  140. CONSTRAINT_ZC,
  141. CONSTRAINT_ZR,
  142. CONSTRAINT_ZS,
  143. CONSTRAINT_ZT,
  144. CONSTRAINT_ZU,
  145. CONSTRAINT_ZV,
  146. CONSTRAINT_ZW,
  147. CONSTRAINT_p,
  148. CONSTRAINT_ZD,
  149. CONSTRAINT_V,
  150. CONSTRAINT__l,
  151. CONSTRAINT__g,
  152. CONSTRAINT_i,
  153. CONSTRAINT_s,
  154. CONSTRAINT_n,
  155. CONSTRAINT_E,
  156. CONSTRAINT_F,
  157. CONSTRAINT_X,
  158. CONSTRAINT_kf,
  159. CONSTRAINT_ks,
  160. CONSTRAINT_G,
  161. CONSTRAINT_Q,
  162. CONSTRAINT_S,
  163. CONSTRAINT_Udb7,
  164. CONSTRAINT_Udb8,
  165. CONSTRAINT_Uead,
  166. CONSTRAINT_Uean,
  167. CONSTRAINT_Uesp,
  168. CONSTRAINT_Uib3,
  169. CONSTRAINT_Usb4,
  170. CONSTRAINT_Usb5,
  171. CONSTRAINT_Usb8,
  172. CONSTRAINT_Usd8,
  173. CONSTRAINT_Uub8,
  174. CONSTRAINT_Uuw5,
  175. CONSTRAINT_Uuw6,
  176. CONSTRAINT_Uuw8,
  177. CONSTRAINT_YG,
  178. CONSTRAINT_YA,
  179. CONSTRAINT_YB,
  180. CONSTRAINT_Yb,
  181. CONSTRAINT_Yd,
  182. CONSTRAINT_Yf,
  183. CONSTRAINT_Yh,
  184. CONSTRAINT_Yw,
  185. CONSTRAINT_Yx,
  186. CONSTRAINT__LIMIT
  187. };
  188. extern enum constraint_num lookup_constraint_1 (const char *);
  189. extern const unsigned char lookup_constraint_array[];
  190. /* Return the constraint at the beginning of P, or CONSTRAINT__UNKNOWN if it
  191. isn't recognized. */
  192. static inline enum constraint_num
  193. lookup_constraint (const char *p)
  194. {
  195. unsigned int index = lookup_constraint_array[(unsigned char) *p];
  196. return (index == UCHAR_MAX
  197. ? lookup_constraint_1 (p)
  198. : (enum constraint_num) index);
  199. }
  200. extern bool (*constraint_satisfied_p_array[]) (rtx);
  201. /* Return true if X satisfies constraint C. */
  202. static inline bool
  203. constraint_satisfied_p (rtx x, enum constraint_num c)
  204. {
  205. int i = (int) c - (int) CONSTRAINT_I;
  206. return i >= 0 && constraint_satisfied_p_array[i] (x);
  207. }
  208. static inline bool
  209. insn_extra_register_constraint (enum constraint_num c)
  210. {
  211. return c >= CONSTRAINT_r && c <= CONSTRAINT_kb;
  212. }
  213. static inline bool
  214. insn_extra_memory_constraint (enum constraint_num c)
  215. {
  216. return c >= CONSTRAINT_m && c <= CONSTRAINT_ZW;
  217. }
  218. static inline bool
  219. insn_extra_address_constraint (enum constraint_num c)
  220. {
  221. return c >= CONSTRAINT_p && c <= CONSTRAINT_ZD;
  222. }
  223. static inline size_t
  224. insn_constraint_len (char fc, const char *str ATTRIBUTE_UNUSED)
  225. {
  226. switch (fc)
  227. {
  228. case 'U': return 4;
  229. case 'Y': return 2;
  230. case 'Z': return 2;
  231. case 'k': return 2;
  232. default: break;
  233. }
  234. return 1;
  235. }
  236. #define CONSTRAINT_LEN(c_,s_) insn_constraint_len (c_,s_)
  237. extern enum reg_class reg_class_for_constraint_1 (enum constraint_num);
  238. static inline enum reg_class
  239. reg_class_for_constraint (enum constraint_num c)
  240. {
  241. if (insn_extra_register_constraint (c))
  242. return reg_class_for_constraint_1 (c);
  243. return NO_REGS;
  244. }
  245. extern bool insn_const_int_ok_for_constraint (HOST_WIDE_INT, enum constraint_num);
  246. #define CONST_OK_FOR_CONSTRAINT_P(v_,c_,s_) \
  247. insn_const_int_ok_for_constraint (v_, lookup_constraint (s_))
  248. enum constraint_type
  249. {
  250. CT_REGISTER,
  251. CT_CONST_INT,
  252. CT_MEMORY,
  253. CT_ADDRESS,
  254. CT_FIXED_FORM
  255. };
  256. static inline enum constraint_type
  257. get_constraint_type (enum constraint_num c)
  258. {
  259. if (c >= CONSTRAINT_p)
  260. {
  261. if (c >= CONSTRAINT_V)
  262. return CT_FIXED_FORM;
  263. return CT_ADDRESS;
  264. }
  265. if (c >= CONSTRAINT_m)
  266. return CT_MEMORY;
  267. if (c >= CONSTRAINT_I)
  268. return CT_CONST_INT;
  269. return CT_REGISTER;
  270. }
  271. #endif /* tm-preds.h */