This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MIPS][LS2][3/5] Miscellaneous instructions


Richard Sandiford <rdsandiford@googlemail.com> writes:
> [...] I'd already written a patch to replace the
> current target_flags/mips_bdesc_arrays stuff with predicate functions.
> I'd written it as part of a patch to add R10000 cache barriers that
> I sent out a while ago.  The interest in that patch seems to have
> waned, but it looks like the builtins patch is useful on its own.
>
> With this, you should be able to attach accurate ISA_HAS_* predicates
> to each paired-single function.  Let me know if it works.

Tested on mipsisa64-elfoabi and applied to mainline.

> gcc/
> 	* config/mips/mips.c (BUILTIN_AVAIL_NON_MIPS16): New macro.
> 	(AVAIL_NON_MIPS16): Likewise.
> 	(mips_builtin_description): Replace target_flags with a predicate.
> 	(paired_single, sb1_paired_single, mips3d, dsp, dspr2, dsp_32)
> 	(dspr2_32): New availability predicates.
> 	(MIPS_BUILTIN): New macro.
> 	(DIRECT_BUILTIN, CMP_SCALAR_BUILTINS, CMP_PS_BUILTINS)
> 	(CMP_4S_BUILTINS, MOVTF_BUILTINS, CMP_BUILTINS)
> 	(DIRECT_NO_TARGET_BUILTIN, BPOSGE_BUILTIN): Use it.
> 	Replace the TARGET_FLAGS parameters with AVAIL parameters.
> 	(mips_ps_bdesc, mips_sb1_bdesc, mips_dsp_bdesc)
> 	(mips_dsp_32only_bdesc): Merge into...
> 	(mips_builtins): ...this new array.
> 	(mips_bdesc_map, mips_bdesc_arrays): Delete.
> 	(mips_init_builtins): Update after above changes.
> 	(mips_expand_builtin_1): Merge into...
> 	(mips_expand_builtin): ...here and update after above changes.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]