2
0
mirror of git://gcc.gnu.org/git/gcc.git synced 2025-04-04 20:31:12 +08:00

mips.h (mips_builtins, [...]): Delete.

* config/mips/mips.h (mips_builtins, mips_cmp_choice): Delete.
	(mips_function_type): Move to mips.c.
	* config/mips/mips.c (mips_builtin_type): New enum.
	(builtin_description): Replace code and ftype with builtin_type
	and function_type.
	(DIRECT_BUILTIN, CMP_SCALAR_BUILTINS, CMP_PS_BUILTINS, CMP_4S_BUILTINS)
	(MOVTF_BUILTINS, CMP_BUILTINS): New macros.
	(CODE_FOR_mips_abs_ps): Define.
	(mips_bdesc): Use new macros.
	(mips_expand_builtin): Use builtin_type.  Update calls to subroutines.
	(mips_init_builtins): Use the mips_bdesc[] index as the function code.
	(mips_expand_builtin_direct): New function.
	(mips_expand_builtin_movtf): Renamed from mips_expand_ps_cond_move_
	builtin.  Replace boolean parameter with builtin_type.
	(mips_expand_compare_builtin, mips_expand_scalar_compare_builtin)
	(mips_expand_4s_compare_builtin): Delete, replacing with...
	(mips_expand_builtin_compare): ...this new function.

From-SVN: r86733
This commit is contained in:
Richard Sandiford 2004-08-29 20:13:12 +00:00 committed by Richard Sandiford
parent 5e9f78cc74
commit 4ca1f68f88
3 changed files with 311 additions and 1679 deletions
gcc

@ -1,3 +1,23 @@
2004-08-29 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.h (mips_builtins, mips_cmp_choice): Delete.
(mips_function_type): Move to mips.c.
* config/mips/mips.c (mips_builtin_type): New enum.
(builtin_description): Replace code and ftype with builtin_type
and function_type.
(DIRECT_BUILTIN, CMP_SCALAR_BUILTINS, CMP_PS_BUILTINS, CMP_4S_BUILTINS)
(MOVTF_BUILTINS, CMP_BUILTINS): New macros.
(CODE_FOR_mips_abs_ps): Define.
(mips_bdesc): Use new macros.
(mips_expand_builtin): Use builtin_type. Update calls to subroutines.
(mips_init_builtins): Use the mips_bdesc[] index as the function code.
(mips_expand_builtin_direct): New function.
(mips_expand_builtin_movtf): Renamed from mips_expand_ps_cond_move_
builtin. Replace boolean parameter with builtin_type.
(mips_expand_compare_builtin, mips_expand_scalar_compare_builtin)
(mips_expand_4s_compare_builtin): Delete, replacing with...
(mips_expand_builtin_compare): ...this new function.
2004-08-29 Mark Mitchell <mark@codesourcery.com>
PR rtl-optimization/16590

File diff suppressed because it is too large Load Diff

@ -3020,370 +3020,3 @@ while (0)
" TEXT_SECTION_ASM_OP);
#endif
#endif
/* MIPS Paired-Single Floating Point Instruction & MIPS-3D Support. */
/* Builtin functions for MIPS. */
/* NOTE: The order of mips_bdesc[] in mips.c must be the same as the order of
enum mips_builtins{}. */
enum mips_builtins
{
MIPS_BUILTIN_PLL_PS,
MIPS_BUILTIN_PUL_PS,
MIPS_BUILTIN_PLU_PS,
MIPS_BUILTIN_PUU_PS,
MIPS_BUILTIN_CVT_PS_S,
MIPS_BUILTIN_CVT_S_PL,
MIPS_BUILTIN_CVT_S_PU,
MIPS_BUILTIN_ABS_PS,
MIPS_BUILTIN_ALNV_PS,
MIPS_BUILTIN_ADDR_PS,
MIPS_BUILTIN_MULR_PS,
MIPS_BUILTIN_CVT_PW_PS,
MIPS_BUILTIN_CVT_PS_PW,
MIPS_BUILTIN_RECIP1_S,
MIPS_BUILTIN_RECIP1_D,
MIPS_BUILTIN_RECIP1_PS,
MIPS_BUILTIN_RECIP2_S,
MIPS_BUILTIN_RECIP2_D,
MIPS_BUILTIN_RECIP2_PS,
MIPS_BUILTIN_RSQRT1_S,
MIPS_BUILTIN_RSQRT1_D,
MIPS_BUILTIN_RSQRT1_PS,
MIPS_BUILTIN_RSQRT2_S,
MIPS_BUILTIN_RSQRT2_D,
MIPS_BUILTIN_RSQRT2_PS,
MIPS_BUILTIN_ANY_C_F_PS,
MIPS_BUILTIN_UPPER_C_F_PS,
MIPS_BUILTIN_LOWER_C_F_PS,
MIPS_BUILTIN_ALL_C_F_PS,
MIPS_BUILTIN_ANY_C_UN_PS,
MIPS_BUILTIN_UPPER_C_UN_PS,
MIPS_BUILTIN_LOWER_C_UN_P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_PS,
MIPS_BUILTIN_MOVF_CABS_UEQ_PS,
MIPS_BUILTIN_MOVF_CABS_OLT_PS,
MIPS_BUILTIN_MOVF_CABS_ULT_PS,
MIPS_BUILTIN_MOVF_CABS_OLE_PS,
MIPS_BUILTIN_MOVF_CABS_ULE_PS,
MIPS_BUILTIN_MOVF_CABS_SF_PS,
MIPS_BUILTIN_MOVF_CABS_NGLE_PS,
MIPS_BUILTIN_MOVF_CABS_SEQ_PS,
MIPS_BUILTIN_MOVF_CABS_NGL_PS,
MIPS_BUILTIN_MOVF_CABS_LT_PS,
MIPS_BUILTIN_MOVF_CABS_NGE_PS,
MIPS_BUILTIN_MOVF_CABS_LE_PS,
MIPS_BUILTIN_MOVF_CABS_NGT_PS,
/* THE LAST BUILTIN. */
MIPS_BUILTIN_MAX_BUILTIN
};
/* MIPS builtin function types. */
enum mips_function_type
{
MIPS_V2SF_FTYPE_V2SF,
MIPS_V2SF_FTYPE_V2SF_V2SF,
MIPS_V2SF_FTYPE_V2SF_V2SF_INT,
MIPS_V2SF_FTYPE_V2SF_V2SF_V2SF_V2SF,
MIPS_V2SF_FTYPE_SF_SF,
MIPS_INT_FTYPE_V2SF_V2SF,
MIPS_INT_FTYPE_V2SF_V2SF_V2SF_V2SF,
MIPS_INT_FTYPE_SF_SF,
MIPS_INT_FTYPE_DF_DF,
MIPS_SF_FTYPE_V2SF,
MIPS_SF_FTYPE_SF,
MIPS_SF_FTYPE_SF_SF,
MIPS_DF_FTYPE_DF,
MIPS_DF_FTYPE_DF_DF,
/* The last type. */
MIPS_MAX_FTYPE_MAX
};
/* MIPS compare choices used for MIPS builtin functions. */
enum mips_cmp_choice
{
MIPS_CMP_ANY, /* Check if any result is true. */
MIPS_CMP_UPPER, /* Check if the upper one of two results is true. */
MIPS_CMP_LOWER, /* Check if the lower one of two results is true. */
MIPS_CMP_ALL, /* Check if all results are true. */
MIPS_CMP_MAX
};