On Fri, Oct 17, 2008 at 01:26:20PM -0400, Michael Meissner wrote:
> 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.

As one alternative, I want something that is not regarded as a register
class by reload, yet which matches the members of a register class as
an EXTRA_CONSTRAINT.

I.e.:

(define_register_constraint "Rcq"
  "(TARGET_2ADDR
    ? (TARGET_ARC700 ? CHEAP_CORE_REGS : WRITABLE_CORE_REGS)
    : NO_REGS"
  "@internal
   'w' constraint variant for use in early alternatives with matching 
constraint")

(define_constraint "Rcq"
  "@internal
   Cryptic w - for use in early alternatives with matching constraint"
  (and (match_code "REG")
       (match_test "TEST_HARD_REG_BIT (reg_class_contents[WRITABLE_CORE_REGS], 
REGNO (op))")))
   

Reply via email to