xt_FP.h 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /* Definitions for the xt_FP TIE package */
  2. /*
  3. * Customer ID=11657; Build=0x5fe96; Copyright (c) 2004-2010 by Tensilica Inc. ALL RIGHTS RESERVED.
  4. * These coded instructions, statements, and computer programs are the
  5. * copyrighted works and confidential proprietary information of Tensilica Inc.
  6. * They may not be modified, copied, reproduced, distributed, or disclosed to
  7. * third parties in any manner, medium, or form, in whole or in part, without
  8. * the prior written consent of Tensilica Inc.
  9. */
  10. /* Do not modify. This is automatically generated.*/
  11. #ifndef _XTENSA_xt_FP_HEADER
  12. #define _XTENSA_xt_FP_HEADER
  13. #ifdef __XTENSA__
  14. #ifdef __XCC__
  15. #include <xtensa/tie/xt_core.h>
  16. #include <xtensa/tie/xt_booleans.h>
  17. typedef float _TIE_xt_FP_xtfloat;
  18. typedef _TIE_xt_FP_xtfloat xtfloat;
  19. /*
  20. * The following prototypes describe intrinsic functions
  21. * corresponding to TIE instructions. Some TIE instructions
  22. * may produce multiple results (designated as "out" operands
  23. * in the iclass section) or may have operands used as both
  24. * inputs and outputs (designated as "inout"). However, the C
  25. * and C++ languages do not provide syntax that can express
  26. * the in/out/inout constraints of TIE intrinsics.
  27. * Nevertheless, the compiler understands these constraints
  28. * and will check that the intrinsic functions are used
  29. * correctly. To improve the readability of these prototypes,
  30. * the "out" and "inout" parameters are marked accordingly
  31. * with comments.
  32. */
  33. extern unsigned _TIE_xt_FP_RUR_FCR(void);
  34. extern void _TIE_xt_FP_WUR_FCR(unsigned v);
  35. extern unsigned _TIE_xt_FP_RUR_FSR(void);
  36. extern void _TIE_xt_FP_WUR_FSR(unsigned v);
  37. extern xtfloat _TIE_xt_FP_xtfloat_loadi(const xtfloat * p, immediate imm8x4);
  38. extern void _TIE_xt_FP_xtfloat_storei(xtfloat t, xtfloat * p, immediate imm8x4);
  39. extern void _TIE_xt_FP_xtfloat_loadip(xtfloat t /*out*/, const xtfloat * p /*inout*/, immediate imm8x4);
  40. extern void _TIE_xt_FP_xtfloat_storeip(xtfloat t, xtfloat * p /*inout*/, immediate imm8x4);
  41. extern xtfloat _TIE_xt_FP_xtfloat_loadx(const xtfloat * p, int imm8x4);
  42. extern void _TIE_xt_FP_xtfloat_storex(xtfloat t, xtfloat * p, int imm8x4);
  43. extern void _TIE_xt_FP_xtfloat_loadxp(xtfloat t /*out*/, const xtfloat * p /*inout*/, int imm8x4);
  44. extern void _TIE_xt_FP_xtfloat_storexp(xtfloat t, xtfloat * p /*inout*/, int imm8x4);
  45. extern xtfloat _TIE_xt_FP_xtfloat_move(xtfloat r);
  46. extern int _TIE_xt_FP_ROUND_S(xtfloat s, immediate t);
  47. extern int _TIE_xt_FP_TRUNC_S(xtfloat s, immediate t);
  48. extern unsigned _TIE_xt_FP_UTRUNC_S(xtfloat s, immediate t);
  49. extern int _TIE_xt_FP_FLOOR_S(xtfloat s, immediate t);
  50. extern int _TIE_xt_FP_CEIL_S(xtfloat s, immediate t);
  51. extern xtfloat _TIE_xt_FP_LSI(const xtfloat * p, immediate imm8x4);
  52. extern void _TIE_xt_FP_SSI(xtfloat t, xtfloat * p, immediate imm8x4);
  53. extern void _TIE_xt_FP_LSIP(xtfloat t /*out*/, const xtfloat * p /*inout*/, immediate imm8x4);
  54. extern void _TIE_xt_FP_SSIP(xtfloat t, xtfloat * p /*inout*/, immediate imm8x4);
  55. extern xtfloat _TIE_xt_FP_LSX(const xtfloat * p, int imm8x4);
  56. extern void _TIE_xt_FP_SSX(xtfloat t, xtfloat * p, int imm8x4);
  57. extern void _TIE_xt_FP_LSXP(xtfloat t /*out*/, const xtfloat * p /*inout*/, int imm8x4);
  58. extern void _TIE_xt_FP_SSXP(xtfloat t, xtfloat * p /*inout*/, int imm8x4);
  59. extern xtfloat _TIE_xt_FP_ABS_S(xtfloat s);
  60. extern xtfloat _TIE_xt_FP_NEG_S(xtfloat s);
  61. extern xtfloat _TIE_xt_FP_MOV_S(xtfloat s);
  62. extern void _TIE_xt_FP_MOVEQZ_S(xtfloat r /*inout*/, xtfloat s, int t);
  63. extern void _TIE_xt_FP_MOVNEZ_S(xtfloat r /*inout*/, xtfloat s, int t);
  64. extern void _TIE_xt_FP_MOVLTZ_S(xtfloat r /*inout*/, xtfloat s, int t);
  65. extern void _TIE_xt_FP_MOVGEZ_S(xtfloat r /*inout*/, xtfloat s, int t);
  66. extern void _TIE_xt_FP_MOVF_S(xtfloat r /*inout*/, xtfloat s, xtbool t);
  67. extern void _TIE_xt_FP_MOVT_S(xtfloat r /*inout*/, xtfloat s, xtbool t);
  68. extern unsigned _TIE_xt_FP_RFR(xtfloat s);
  69. extern xtfloat _TIE_xt_FP_WFR(unsigned s);
  70. extern xtfloat _TIE_xt_FP_FLOAT_S(int s, immediate t);
  71. extern xtfloat _TIE_xt_FP_UFLOAT_S(unsigned s, immediate t);
  72. extern xtbool _TIE_xt_FP_OEQ_S(xtfloat s, xtfloat t);
  73. extern xtbool _TIE_xt_FP_OLE_S(xtfloat s, xtfloat t);
  74. extern xtbool _TIE_xt_FP_OLT_S(xtfloat s, xtfloat t);
  75. extern xtbool _TIE_xt_FP_UEQ_S(xtfloat s, xtfloat t);
  76. extern xtbool _TIE_xt_FP_ULE_S(xtfloat s, xtfloat t);
  77. extern xtbool _TIE_xt_FP_ULT_S(xtfloat s, xtfloat t);
  78. extern xtbool _TIE_xt_FP_UN_S(xtfloat s, xtfloat t);
  79. extern xtfloat _TIE_xt_FP_ADD_S(xtfloat s, xtfloat t);
  80. extern xtfloat _TIE_xt_FP_SUB_S(xtfloat s, xtfloat t);
  81. extern xtfloat _TIE_xt_FP_MUL_S(xtfloat s, xtfloat t);
  82. extern void _TIE_xt_FP_MADD_S(xtfloat r /*inout*/, xtfloat s, xtfloat t);
  83. extern void _TIE_xt_FP_MSUB_S(xtfloat r /*inout*/, xtfloat s, xtfloat t);
  84. extern xtfloat _TIE_xt_FP_RECIP0_S(xtfloat s);
  85. extern xtfloat _TIE_xt_FP_DIV0_S(xtfloat s);
  86. extern xtfloat _TIE_xt_FP_NEXP01_S(xtfloat s);
  87. extern xtfloat _TIE_xt_FP_CONST_S(immediate s);
  88. extern void _TIE_xt_FP_MKDADJ_S(xtfloat r /*inout*/, xtfloat s);
  89. extern xtfloat _TIE_xt_FP_MKSADJ_S(xtfloat s);
  90. extern void _TIE_xt_FP_ADDEXPM_S(xtfloat r /*inout*/, xtfloat s);
  91. extern void _TIE_xt_FP_ADDEXP_S(xtfloat r /*inout*/, xtfloat s);
  92. extern void _TIE_xt_FP_DIVN_S(xtfloat r /*inout*/, xtfloat s, xtfloat t);
  93. extern xtfloat _TIE_xt_FP_RSQRT0_S(xtfloat s);
  94. extern xtfloat _TIE_xt_FP_SQRT0_S(xtfloat s);
  95. extern void _TIE_xt_FP_MADDN_S(xtfloat r /*inout*/, xtfloat s, xtfloat t);
  96. extern xtfloat _TIE_xt_FP_DIV_S(xtfloat s, xtfloat t);
  97. extern xtfloat _TIE_xt_FP_SQRT_S(xtfloat s);
  98. extern xtfloat _TIE_xt_FP_RECIP_S(xtfloat s);
  99. extern xtfloat _TIE_xt_FP_RSQRT_S(xtfloat s);
  100. extern xtfloat _TIE_xt_FP_FSQRT_S(xtfloat s);
  101. #define XT_RUR_FCR _TIE_xt_FP_RUR_FCR
  102. #define RFCR _TIE_xt_FP_RUR_FCR
  103. #define RUR232 _TIE_xt_FP_RUR_FCR
  104. #define XT_WUR_FCR _TIE_xt_FP_WUR_FCR
  105. #define WFCR _TIE_xt_FP_WUR_FCR
  106. #define WUR232 _TIE_xt_FP_WUR_FCR
  107. #define XT_RUR_FSR _TIE_xt_FP_RUR_FSR
  108. #define RFSR _TIE_xt_FP_RUR_FSR
  109. #define RUR233 _TIE_xt_FP_RUR_FSR
  110. #define XT_WUR_FSR _TIE_xt_FP_WUR_FSR
  111. #define WFSR _TIE_xt_FP_WUR_FSR
  112. #define WUR233 _TIE_xt_FP_WUR_FSR
  113. #define XT_xtfloat_loadi _TIE_xt_FP_xtfloat_loadi
  114. #define XT_xtfloat_storei _TIE_xt_FP_xtfloat_storei
  115. #define XT_xtfloat_loadip _TIE_xt_FP_xtfloat_loadip
  116. #define XT_xtfloat_storeip _TIE_xt_FP_xtfloat_storeip
  117. #define XT_xtfloat_loadx _TIE_xt_FP_xtfloat_loadx
  118. #define XT_xtfloat_storex _TIE_xt_FP_xtfloat_storex
  119. #define XT_xtfloat_loadxp _TIE_xt_FP_xtfloat_loadxp
  120. #define XT_xtfloat_storexp _TIE_xt_FP_xtfloat_storexp
  121. #define XT_xtfloat_move _TIE_xt_FP_xtfloat_move
  122. #define XT_ROUND_S _TIE_xt_FP_ROUND_S
  123. #define XT_TRUNC_S _TIE_xt_FP_TRUNC_S
  124. #define XT_UTRUNC_S _TIE_xt_FP_UTRUNC_S
  125. #define XT_FLOOR_S _TIE_xt_FP_FLOOR_S
  126. #define XT_CEIL_S _TIE_xt_FP_CEIL_S
  127. #define XT_LSI _TIE_xt_FP_LSI
  128. #define XT_SSI _TIE_xt_FP_SSI
  129. #define XT_LSIP _TIE_xt_FP_LSIP
  130. #define XT_SSIP _TIE_xt_FP_SSIP
  131. #define XT_LSX _TIE_xt_FP_LSX
  132. #define XT_SSX _TIE_xt_FP_SSX
  133. #define XT_LSXP _TIE_xt_FP_LSXP
  134. #define XT_SSXP _TIE_xt_FP_SSXP
  135. #define XT_ABS_S _TIE_xt_FP_ABS_S
  136. #define XT_NEG_S _TIE_xt_FP_NEG_S
  137. #define XT_MOV_S _TIE_xt_FP_MOV_S
  138. #define XT_MOVEQZ_S _TIE_xt_FP_MOVEQZ_S
  139. #define XT_MOVNEZ_S _TIE_xt_FP_MOVNEZ_S
  140. #define XT_MOVLTZ_S _TIE_xt_FP_MOVLTZ_S
  141. #define XT_MOVGEZ_S _TIE_xt_FP_MOVGEZ_S
  142. #define XT_MOVF_S _TIE_xt_FP_MOVF_S
  143. #define XT_MOVT_S _TIE_xt_FP_MOVT_S
  144. #define XT_RFR _TIE_xt_FP_RFR
  145. #define XT_WFR _TIE_xt_FP_WFR
  146. #define XT_FLOAT_S _TIE_xt_FP_FLOAT_S
  147. #define XT_UFLOAT_S _TIE_xt_FP_UFLOAT_S
  148. #define XT_OEQ_S _TIE_xt_FP_OEQ_S
  149. #define XT_OLE_S _TIE_xt_FP_OLE_S
  150. #define XT_OLT_S _TIE_xt_FP_OLT_S
  151. #define XT_UEQ_S _TIE_xt_FP_UEQ_S
  152. #define XT_ULE_S _TIE_xt_FP_ULE_S
  153. #define XT_ULT_S _TIE_xt_FP_ULT_S
  154. #define XT_UN_S _TIE_xt_FP_UN_S
  155. #define XT_ADD_S _TIE_xt_FP_ADD_S
  156. #define XT_SUB_S _TIE_xt_FP_SUB_S
  157. #define XT_MUL_S _TIE_xt_FP_MUL_S
  158. #define XT_MADD_S _TIE_xt_FP_MADD_S
  159. #define XT_MSUB_S _TIE_xt_FP_MSUB_S
  160. #define XT_RECIP0_S _TIE_xt_FP_RECIP0_S
  161. #define XT_DIV0_S _TIE_xt_FP_DIV0_S
  162. #define XT_NEXP01_S _TIE_xt_FP_NEXP01_S
  163. #define XT_CONST_S _TIE_xt_FP_CONST_S
  164. #define XT_MKDADJ_S _TIE_xt_FP_MKDADJ_S
  165. #define XT_MKSADJ_S _TIE_xt_FP_MKSADJ_S
  166. #define XT_ADDEXPM_S _TIE_xt_FP_ADDEXPM_S
  167. #define XT_ADDEXP_S _TIE_xt_FP_ADDEXP_S
  168. #define XT_DIVN_S _TIE_xt_FP_DIVN_S
  169. #define XT_RSQRT0_S _TIE_xt_FP_RSQRT0_S
  170. #define XT_SQRT0_S _TIE_xt_FP_SQRT0_S
  171. #define XT_MADDN_S _TIE_xt_FP_MADDN_S
  172. #define XT_DIV_S _TIE_xt_FP_DIV_S
  173. #define XT_SQRT_S _TIE_xt_FP_SQRT_S
  174. #define XT_RECIP_S _TIE_xt_FP_RECIP_S
  175. #define XT_RSQRT_S _TIE_xt_FP_RSQRT_S
  176. #define XT_FSQRT_S _TIE_xt_FP_FSQRT_S
  177. #ifndef RUR
  178. #define RUR(NUM) RUR##NUM()
  179. #endif
  180. #ifndef WUR
  181. #define WUR(VAL, NUM) WUR##NUM(VAL)
  182. #endif
  183. #endif /* __XCC__ */
  184. #endif /* __XTENSA__ */
  185. #endif /* !_XTENSA_xt_FP_HEADER */