diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-10 20:24:17 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-10 20:24:17 +0000 |
commit | d37b1ac9e99e9bd33b0d2be2fe22eef2374465d1 (patch) | |
tree | 7c7c84950cd4b41af7efd6b64db9e7e3cfb1f188 /gcc/rtl.def | |
parent | 5d54fceb3ef5f9f1e2fa793d0fcf16b6c4c49ee5 (diff) | |
download | gcc-d37b1ac9e99e9bd33b0d2be2fe22eef2374465d1.tar.gz |
gcc/
* doc/md.texi (define_enum_attr): Document.
* rtl.def (DEFINE_ENUM_ATTR): New rtx.
* read-md.h (lookup_enum_type): Declare.
* read-md.c (lookup_enum_type): New function.
* genattr.c (gen_attr, main): Handle DEFINE_ENUM_ATTR.
* genattrtab.c (attr_desc): Add an enum_name field.
(evaluate_eq_attr): Take the associated attribute as argument.
Get the enum prefix from the enum_name field, if defined.
Use ACONCAT rather than a fixed-length buffer. Update recursive calls.
(simplify_test_exp): Pass attr to evaluate_eq_attr.
(add_attr_value): New function, split out from...
(gen_attr): ...here. Handle DEFINE_ENUM_ATTR.
(write_test_expr): Pass attr to evaluate_eq_attr.
(write_attr_get): Use the enum_name as the enum tag, if defined.
(write_attr_valueq): Use the enum_name as a prefix, if defined.
(find_attr): Initialize enum_name.
(main): Handle DEFINE_ENUM_ATTR.
* gensupport.c (process_rtx): Likewise.
* config/mips/mips.h (mips_tune_attr): Delete.
* config/mips/mips.md (cpu): Use define_attr_enum.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160581 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.def')
-rw-r--r-- | gcc/rtl.def | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rtl.def b/gcc/rtl.def index 8464d32e7f9..c4a3646afea 100644 --- a/gcc/rtl.def +++ b/gcc/rtl.def @@ -1198,6 +1198,12 @@ DEF_RTL_EXPR(DEFINE_INSN_RESERVATION, "define_insn_reservation", "sies", RTX_EXT 3rd operand: expression for the default value of the attribute. */ DEF_RTL_EXPR(DEFINE_ATTR, "define_attr", "sse", RTX_EXTRA) +/* Definition of an insn attribute that uses an existing enumerated type. + 1st operand: name of the attribute + 2nd operand: the name of the enumerated type + 3rd operand: expression for the default value of the attribute. */ +DEF_RTL_EXPR(DEFINE_ENUM_ATTR, "define_enum_attr", "sse", RTX_EXTRA) + /* Marker for the name of an attribute. */ DEF_RTL_EXPR(ATTR, "attr", "s", RTX_EXTRA) |