Next:Mnemonic Attribute, Previous:Computing the Length of an Insn, Up:Instruction Attributes [Contents][Index]
A special form ofdefine_attr, where the expression for thedefault value is aconst expression, indicates an attribute thatis constant for a given run of the compiler. Constant attributes may beused to specify which variety of processor is used. For example,
(define_attr "cpu" "m88100,m88110,m88000" (const (cond [(symbol_ref "TARGET_88100") (const_string "m88100") (symbol_ref "TARGET_88110") (const_string "m88110")] (const_string "m88000"))))(define_attr "memory" "fast,slow" (const (if_then_else (symbol_ref "TARGET_FAST_MEM") (const_string "fast") (const_string "slow"))))
The routine generated for constant attributes has no parameters as itdoes not depend on any particular insn. RTL expressions used to definethe value of a constant attribute may use thesymbol_ref form,but may not use either thematch_operand form oreq_attrforms involving insn attributes.