This is the mail archive of the gcc@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: Unable to build M32C gcc port


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~


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