[MIPS][LS2][3/5] Miscellaneous instructions
Richard Sandiford
rdsandiford@googlemail.com
Fri Jun 13 06:59:00 GMT 2008
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.
More information about the Gcc-patches
mailing list