This is the mail archive of the 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: [PATCH 1/n] Add conditional compare support

> -----Original Message-----
> From: Richard Henderson []
> Sent: Monday, October 28, 2013 11:07 PM
> To: Zhenqiang Chen; Richard Earnshaw; 'Richard Biener'
> Cc: GCC Patches
> Subject: Re: [PATCH 1/n] Add conditional compare support
> On 10/28/2013 01:32 AM, Zhenqiang Chen wrote:
> > Patch is updated according to your comments. Main changes are:
> > * Add two hooks: legitimize_cmp_combination and
> > legitimize_ccmp_combination
> > * Improve document.
> No, these are not the hooks I proposed.
> You should *not* have a ccmp_optab, because the middle-end has
> absolutely no idea what mode TARGET should be in.
> The hook needs to return an rtx expression appropriate for feeding to
> cbranch et al.  E.g. for arm,
>   (ne (reg:CC_Z CC_REGNUM) (const_int 0))
> after having emitted the instruction that sets CC_REGNUM.
> We need to push this to the backend because for ia64 the expression needs
> to be of te form
>   (ne (reg:BI new_pseudo) (const_int 0))
Thanks for the clarification.
Patch is updated:
* ccmp_optab is removed.
* Add two hooks gen_ccmp_with_cmp_cmp and gen_ccmp_with_ccmp_cmp for backends to generate the conditional compare instructions.


Attachment: ccmp-hook2.patch
Description: Binary data

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