This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[bfin] Fix bfin port constraints
- From: "Jie Zhang" <jzhang918 at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 18 Jun 2006 00:33:33 +0800
- Subject: [bfin] Fix bfin port constraints
When I ported my Blackfin hardware loop patch from GCC 4.1 in ADI CVS
repository to FSF SVN trunk, several constraints changes were lost.
This patch should fix it.
Is it OK?
Jie
* config/bfin/bfin.h (REG_CLASS_FROM_LETTER): Rename constraint 'B'
to 'v', 'l' to 'u'.
* config/bfin/bfin.md: Change comment accordingly.
(define_insn loop_end): Replace 'h' with 'v'.
(lsetup_with_autoinit): Replace 'l' with 'u'.
(lsetup_without_autoinit): Ditto.
* md.texi: Record this change.
Index: config/bfin/bfin.h
===================================================================
--- config/bfin/bfin.h (revision 114740)
+++ config/bfin/bfin.h (working copy)
@@ -548,13 +548,13 @@
(LETTER) == 'A' ? EVEN_AREGS : \
(LETTER) == 'B' ? ODD_AREGS : \
(LETTER) == 'b' ? IREGS : \
- (LETTER) == 'B' ? BREGS : \
+ (LETTER) == 'v' ? BREGS : \
(LETTER) == 'f' ? MREGS : \
(LETTER) == 'c' ? CIRCREGS : \
(LETTER) == 'C' ? CCREGS : \
(LETTER) == 't' ? LT_REGS : \
(LETTER) == 'k' ? LC_REGS : \
- (LETTER) == 'l' ? LB_REGS : \
+ (LETTER) == 'u' ? LB_REGS : \
(LETTER) == 'x' ? MOST_REGS : \
(LETTER) == 'y' ? PROLOGUE_REGS : \
(LETTER) == 'w' ? NON_A_CC_REGS : \
Index: config/bfin/bfin.md
===================================================================
--- config/bfin/bfin.md (revision 114740)
+++ config/bfin/bfin.md (working copy)
@@ -46,12 +46,12 @@
; e (a0, a1)
; b (i0..i3)
; f (m0..m3)
-; B
-; c (i0..i3,m0..m3) CIRCREGS
-; C (CC) CCREGS
+; v (b0..b3)
+; c (i0..i3,m0..m3) CIRCREGS
+; C (CC) CCREGS
; t (lt0,lt1)
; k (lc0,lc1)
-; l (lb0,lb1)
+; u (lb0,lb1)
;
;; Define constants for hard registers.
@@ -1555,7 +1555,7 @@
(define_insn "loop_end"
[(set (pc)
- (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+a*d,*b*h*f,m")
+ (if_then_else (ne (match_operand:SI 0 "nonimmediate_operand" "+a*d,*b*v*f,m")
(const_int 1))
(label_ref (match_operand 1 "" ""))
(pc)))
@@ -1597,7 +1597,7 @@
(define_insn "lsetup_with_autoinit"
[(set (match_operand:SI 0 "lt_register_operand" "=t")
(label_ref (match_operand 1 "" "")))
- (set (match_operand:SI 2 "lb_register_operand" "=l")
+ (set (match_operand:SI 2 "lb_register_operand" "=u")
(label_ref (match_operand 3 "" "")))
(set (match_operand:SI 4 "lc_register_operand" "=k")
(match_operand:SI 5 "register_operand" "a"))]
@@ -1608,7 +1608,7 @@
(define_insn "lsetup_without_autoinit"
[(set (match_operand:SI 0 "lt_register_operand" "=t")
(label_ref (match_operand 1 "" "")))
- (set (match_operand:SI 2 "lb_register_operand" "=l")
+ (set (match_operand:SI 2 "lb_register_operand" "=u")
(label_ref (match_operand 3 "" "")))
(use (match_operand:SI 4 "lc_register_operand" "k"))]
""