> Eric, if you could give this some eyeballs I'd really appreciate it. Looks good to me, modulo...
> diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md > index 0f716d6..3462e6f 100644 > --- a/gcc/config/sparc/sparc.md > +++ b/gcc/config/sparc/sparc.md > @@ -240,6 +240,17 @@ > (symbol_ref "TARGET_SPARCLET") (const_string "sparclet")] > (const_string "v7")))) > > +(define_attr "cpu_feature" "none,fpu,notv9fpu,v9,vis,vis3" (const_string > "none")) + > +(define_attr "enabled" "" > + (cond [(eq_attr "cpu_feature" "none") (const_int 1) > + (eq_attr "cpu_feature" "fpu") (symbol_ref "TARGET_FPU") > + (eq_attr "cpu_feature" "notv9fpu") (symbol_ref "TARGET_FPU && ! > TARGET_V9") + (eq_attr "cpu_feature" "v9") (symbol_ref "TARGET_V9") > + (eq_attr "cpu_feature" "vis") (symbol_ref "TARGET_VIS") > + (eq_attr "cpu_feature" "vis3") (symbol_ref "TARGET_VIS3")] > + (const_int 1))) ...notv9fpu is somewhat ambiguous, fpunotv9 sounds better. I'd also change the final (const_int 1) to (const_int 0) if you explicitly test "none" above. -- Eric Botcazou