Message ID | 20190618000442.GA27925@ibm-toto.the-meissners.org |
---|---|
State | New |
Headers | show |
Series | PowerPC: Add 'prefix' to the 'isa' attribute | expand |
On Mon, Jun 17, 2019 at 08:04:42PM -0400, Michael Meissner wrote: > --- gcc/config/rs6000/rs6000.md (revision 272270) > +++ gcc/config/rs6000/rs6000.md (working copy) > @@ -267,7 +267,9 @@ (define_attr "cpu" > (const (symbol_ref "(enum attr_cpu) rs6000_tune"))) > > ;; The ISA we implement. > -(define_attr "isa" "any,p5,p6,p7,p7v,p8v,p9v,p9kf,p9tf" (const_string "any")) > +(define_attr "isa" > + "any,p5,p6,p7,p7v,p8v,p9v,p9kf,p9tf,prefix" > + (const_string "any")) Don't break the line unnecessarily. "prefix" is not a good name. Maybe use "futp" now, so it is in line with the other isa values? I.e. the "prefix" part of the "future" isa. Or "futx"? Short names are important, keep it to 4 chars? (The isa values are named after the processor that first implements them, not the ISA versions, because 2.07 is much easier to get wrong than p8 is). Segher
Index: gcc/config/rs6000/rs6000.md =================================================================== --- gcc/config/rs6000/rs6000.md (revision 272270) +++ gcc/config/rs6000/rs6000.md (working copy) @@ -267,7 +267,9 @@ (define_attr "cpu" (const (symbol_ref "(enum attr_cpu) rs6000_tune"))) ;; The ISA we implement. -(define_attr "isa" "any,p5,p6,p7,p7v,p8v,p9v,p9kf,p9tf" (const_string "any")) +(define_attr "isa" + "any,p5,p6,p7,p7v,p8v,p9v,p9kf,p9tf,prefix" + (const_string "any")) ;; Is this alternative enabled for the current CPU/ISA/etc.? (define_attr "enabled" "" @@ -306,6 +308,10 @@ (define_attr "enabled" "" (and (eq_attr "isa" "p9tf") (match_test "FLOAT128_VECTOR_P (TFmode)")) (const_int 1) + + (and (eq_attr "isa" "prefix") + (match_test "TARGET_PREFIXED_ADDR")) + (const_int 1) ] (const_int 0))) ;; If this instruction is microcoded on the CELL processor