On Fri, Oct 17, 2008 at 05:51:03PM +0100, Joern Rennecke wrote: > I want some constriants to be register constraints when compiling with > a particular set of compiler flags, and extra constraints when compiling > with another. > (In the first case, alternatives that use this constraint can be selected by > reload for reloading non-matching insns, whereas in the second case, they > will only be used if they already match. The register constraint then > yields NO_REG to allow the other definition to have effect). > That was straightforward with the old constraint target macros, but when > you define this in constraints.md, you get an error. > > Are there any objections to implement constraint overloading in genpreds.c ? > > Is it OK to just accept multiple definitions for disjoint categories, > or would you like to see msome extra syntactic sugar to affirm that > the overloading is intentional?
Why do you need new syntax? The current constraints file already supports target specific constraints. For example, from the i386: (define_register_constraint "x" "TARGET_SSE ? SSE_REGS : NO_REGS" "Any SSE register.") I could imagine that you could have more complex cases than just something or NO_REGS. -- Michael Meissner, IBM 4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA [EMAIL PROTECTED]