This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] move mn10300 to constraints.md (plus obvious middle-end)
Thanks a lot for your patch.
On May 27, 2007, Eric Christopher <echristo@apple.com> wrote:
>> * genrecog.c: Include regs.h in generated file.
>> * genemit.c: Ditto. Fix up formatting.
I can't approve these.
> +(define_register_constraint "x" "!TARGET_AM33 ? NO_REGS : EXTENDED_REGS"
> + "An extended register.")
> +
> +(define_register_constraint "f" "!TARGET_AM33_2 ? NO_REGS : FP_REGS"
> + "A floating point register.")
> +
> +(define_register_constraint "A" "!TARGET_AM33_2 ? NO_REGS : FP_ACC_REGS"
> + "A floating point accumulator register.")
I'd prefer these as !x ? NO_REGS : y_REGS into x ? y_REGS : NO_REGS.
Would you mind changing them?
> +(define_constraint "S"
> + "@internal"
> + (ior (and (match_test "flag_pic")
> + (and (match_test "GET_CODE (op) == UNSPEC")
> + (ior (match_test "XINT (op, 1) == UNSPEC_PLT")
> + (match_test "XINT (op, 1) == UNSPEC_PIC"))))
> + (match_test "GET_CODE (op) == SYMBOL_REF")))
This doesn't model correctly the original:
> - : (C) == 'S' && flag_pic \
> - ? GET_CODE (OP) == UNSPEC && (XINT (OP, 1) == UNSPEC_PLT \
> - || XINT (OP, 1) == UNSPEC_PIC) \
> - : (C) == 'S' ? GET_CODE (OP) == SYMBOL_REF \
Rather than (ior ... flag_pic ...), you want something along the lines
of (if_then_else flag_pic ...), or
(ior (and (match_test "flag_pic") ...)
(and (match_test "!flag_pic") ...))
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member http://www.fsfla.org/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}