diff options
author | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-21 00:01:40 +0000 |
---|---|---|
committer | mkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-21 00:01:40 +0000 |
commit | 408ae786ce48e569d9eef0af82e2eb2476efa708 (patch) | |
tree | 1e9f6f349a379aa72be1a2ea9c28a1aaff156eb6 /gcc/config/mips/generic.md | |
parent | e027dae4675f4aaa1f1c79f1222263a308ea729f (diff) | |
download | gcc-408ae786ce48e569d9eef0af82e2eb2476efa708.tar.gz |
* config/mips/mips.md (define_attr sync_*): Move before "type".
(define_attr "type"): New values "atomic" and "syncloop".
* config/mips/sync.md (atomic_exchange<mode>, atomic_fetch_add<mode>):
Set "type" attribute.
* config/mips/generic.md (generic_atomic, generic_syncloop):
New reservations.
* gcc/config/mips/10000.md, gcc/config/mips/20kc.md,
* gcc/config/mips/24k.md, gcc/config/mips/4130.md,
* gcc/config/mips/4k.md, gcc/config/mips/5400.md,
* gcc/config/mips/5500.md, gcc/config/mips/5k.md,
* gcc/config/mips/7000.md, gcc/config/mips/74k.md,
* gcc/config/mips/9000.md, gcc/config/mips/loongson2ef.md,
* gcc/config/mips/loongson3a.md, gcc/config/mips/octeon.md,
* gcc/config/mips/sb1.md, gcc/config/mips/sr71k.md,
* gcc/config/mips/xlr.md: Handle "atomic" and "syncloop" types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189734 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/mips/generic.md')
-rw-r--r-- | gcc/config/mips/generic.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/mips/generic.md b/gcc/config/mips/generic.md index ffbe4eb6d66..c197ecff34e 100644 --- a/gcc/config/mips/generic.md +++ b/gcc/config/mips/generic.md @@ -103,3 +103,19 @@ (define_insn_reservation "generic_frecip_fsqrt_step" 5 (eq_attr "type" "frdiv1,frdiv2,frsqrt1,frsqrt2") "alu") + +(define_insn_reservation "generic_atomic" 10 + (eq_attr "type" "atomic") + "alu") + +;; Sync loop consists of (in order) +;; (1) optional sync, +;; (2) LL instruction, +;; (3) branch and 1-2 ALU instructions, +;; (4) SC instruction, +;; (5) branch and ALU instruction. +;; The net result of this reservation is a big delay with a flush of +;; ALU pipeline. +(define_insn_reservation "generic_sync_loop" 40 + (eq_attr "type" "syncloop") + "alu*39") |