gccint: Constant Attributes
1
1 17.19.6 Constant Attributes
1 ---------------------------
1
1 A special form of 'define_attr', where the expression for the default
1 value is a 'const' expression, indicates an attribute that is constant
1 for a given run of the compiler. Constant attributes may be used to
1 specify which variety of processor is used. For example,
1
1 (define_attr "cpu" "m88100,m88110,m88000"
1 (const
1 (cond [(symbol_ref "TARGET_88100") (const_string "m88100")
1 (symbol_ref "TARGET_88110") (const_string "m88110")]
1 (const_string "m88000"))))
1
1 (define_attr "memory" "fast,slow"
1 (const
1 (if_then_else (symbol_ref "TARGET_FAST_MEM")
1 (const_string "fast")
1 (const_string "slow"))))
1
1 The routine generated for constant attributes has no parameters as it
1 does not depend on any particular insn. RTL expressions used to define
1 the value of a constant attribute may use the 'symbol_ref' form, but may
1 not use either the 'match_operand' form or 'eq_attr' forms involving
1 insn attributes.
1