This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Unable to build M32C gcc port
- From: Richard Henderson <rth at redhat dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: dj at redhat dot com, gcc at gcc dot gnu dot org
- Date: Tue, 31 Jul 2012 08:35:55 -0700
- Subject: Re: Unable to build M32C gcc port
- References: <87lii0urzv.fsf@redhat.com>
On 2012-07-31 03:47, Nick Clifton wrote:
> /* We do this because the M32C has an HImode operand, but the
> M16C has an 8-bit operand. Since gcc looks at the match data
> and not the expanded rtl, we have to reset the optab so that
> the right modes are found. */
> if (TARGET_A24)
> {
> set_optab_handler (cstore_optab, QImode, CODE_FOR_cstoreqi4_24);
> set_optab_handler (cstore_optab, HImode, CODE_FOR_cstorehi4_24);
> set_optab_handler (cstore_optab, PSImode, CODE_FOR_cstorepsi4_24);
> }
> }
>
> But I could not see an obvious way to fix it. Should I be using
> swap_optab_handler as a replacement function ?
No, you need to use just one pattern for both subtargets.
It seems like you could standardize on QImode from the expander here,
but then for A24 add a zero_extend pattern or something to recover the
HImode?
r~