From deeef0aca040ffca437bb93dca7abfadbb9ad4c6 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Fri, 23 Jan 1998 21:27:50 +0000 Subject: [PATCH] * sh.md (movqi_i+1): New peephole. From-SVN: r17463 --- gcc/ChangeLog | 4 ++++ gcc/config/sh/sh.md | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b38183e5ec7..35f953494d8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Jan 23 23:28:59 1998 J"orn Rennecke + + * sh.md (movqi_i+1): New peephole. + Fri Jan 23 15:39:42 1998 Jim Wilson * Makefile.in: Remove remaining bytecode stuff. diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 35432aa665d..3b367d8f613 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -162,7 +162,7 @@ ;; align them when relaxing. ;; Loads have a latency of two. -;; However, call insn can have ;; a delay slot, so that we want one more +;; However, call insns can have a delay slot, so that we want one more ;; insn to be scheduled between the load of the function address and the call. ;; This is equivalent to a latency of three. ;; We cannot use a conflict list for this, because we need to distinguish @@ -1885,6 +1885,18 @@ lds %1,%0" [(set_attr "type" "move,load,store,move,move,move")]) +;; For Big-endian, reload now sometimes generates something like +;; (insn 2107 2104 2099 (set (reg:QI 3 r3) +;; (subreg:QI (mem:SI (reg:SI 0 r0)) 0)) -1 (nil) +;; (nil)) +;; To avoid clutter in the movqi pattern, we express this as a peephole. + +(define_peephole + [(set (match_operand:QI 0 "arith_reg_operand" "r") + (subreg:QI (match_operand:SI 1 "memory_operand" "m") 0))] + "" + "mov.l %1,%0") + (define_expand "movqi" [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))]