diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2010-06-10 20:24:17 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2010-06-10 20:24:17 +0000 |
commit | 8f4fe86cd10bfe5e02237768c40b258b0e668abf (patch) | |
tree | 7c7c84950cd4b41af7efd6b64db9e7e3cfb1f188 /gcc/config/mips | |
parent | 24609606bd4dec8c2cf5f8eaa82c44f67f4f5f6e (diff) | |
download | gcc-8f4fe86cd10bfe5e02237768c40b258b0e668abf.zip gcc-8f4fe86cd10bfe5e02237768c40b258b0e668abf.tar.gz gcc-8f4fe86cd10bfe5e02237768c40b258b0e668abf.tar.bz2 |
md.texi (define_enum_attr): Document.
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.
From-SVN: r160581
Diffstat (limited to 'gcc/config/mips')
-rw-r--r-- | gcc/config/mips/mips.h | 4 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 4d79102..4026bd7 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -3035,10 +3035,6 @@ extern enum mips_code_readable_setting mips_code_readable; #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) \ mips_final_prescan_insn (INSN, OPVEC, NOPERANDS) -/* This is necessary to avoid a warning about comparing different enum - types. */ -#define mips_tune_attr ((enum attr_cpu) mips_tune) - /* As on most targets, we want the .eh_frame section to be read-only where possible. And as on most targets, this means two things: diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 0f28775..0ad21bd 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -508,11 +508,9 @@ (symbol_ref "mips_sync_loop_insns (insn, operands) * 4") ] (const_int 4))) -;; Attribute describing the processor. This attribute must match exactly -;; with the processor enumeration above. -(define_attr "cpu" - "r3000,4kc,4kp,5kc,5kf,20kc,24kc,24kf2_1,24kf1_1,74kc,74kf2_1,74kf1_1,74kf3_2,loongson_2e,loongson_2f,m4k,octeon,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,r10000,sb1,sb1a,sr71000,xlr" - (const (symbol_ref "mips_tune_attr"))) +;; Attribute describing the processor. +(define_enum_attr "cpu" "processor" + (const (symbol_ref "mips_tune"))) ;; The type of hardware hazard associated with this instruction. ;; DELAY means that the next instruction cannot read the result |