This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [MIPS][LS2][3/5] Miscellaneous instructions
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Maxim Kuvyrkov <maxim at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Zhang Le <r0bertz at gentoo dot org>, Eric Fisher <joefoxreal at gmail dot com>
- Date: Fri, 13 Jun 2008 07:58:21 +0100
- Subject: Re: [MIPS][LS2][3/5] Miscellaneous instructions
- References: <4835A9B4.9000709@codesourcery.com> <4835B2E8.4070109@codesourcery.com> <8763t687ss.fsf@firetop.home> <484C3A17.70502@codesourcery.com> <484D2CFB.2060305@codesourcery.com> <87od6azeng.fsf@firetop.home>
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.