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]

[RFC, 4.8] Magic matching for flags clobbering and setting

Seeing as how Uros is starting to go down the path of cleaning up the
flags handling for x86, I thought I'd go ahead and knock up the idea
that I've been tossing around to help automate the process of building
patterns that match both clobbering the flags and setting the flags to
a comparison.

This is far from complete, but it at least shows the direction.

What I know is missing off the top of my head are:

 (0) Documentation in some .texi file; atm there's only what's in rtl.def.

 (1) Generate (clobber (reg flags)) from genemit, should this construct
     be used in a named insn pattern.

 (2) Can't be usefully used with define_insn_and_split, and no way to tell.
     This problem should simply be documented in the .texi file as user error.

 (3) Can't be used for x86 add patterns, as the "clobber" version wants the
     freedom to use "lea" and the "set flags" version cannot.  And there are
     different sets of constraints if lea may be used or not.

     What would be nice, however, is exposing the targetm.cc_modes_compatible
     thing in such a way that the x86 add patterns could use that, for the
     separate insn that does do the set flags.

     Exposing the targetm.cc_modes_compatible thing separately might also
     clean up some of the evil magic in genrecog.c too.



Attachment: z1
Description: Text document

Attachment: z2
Description: Text document

Attachment: z3
Description: Text document

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