This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[AVR][committed] Add mode to zero_extract in avr.md


Hello.

> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini@gmail.com] On 
> Behalf Of Paolo Bonzini
> Sent: Tuesday, April 22, 2008 3:26 AM
> To: Weddington, Eric
> Subject: help testing avr patch
> 
> Hi Eric,
> 
> would you help me testing the attached AVR patch?  I think that
> having modeless zero_extract is sloppiness that (up to now) was
> okay because nobody really was upset by it.  However, with the
> recent patch from Kenny it causes a crash.  While Kenny's patch
> may be changed to a more lenient check, I think that the
> attached patch is the right way to fix the AVR backend.
> 
> Thanks!
> 
> Paolo
>

This patch add mode to zero_extract in AVR backend.

Anatoly.

2008-04-29  Paolo Bonzini  <bonzini@gnu.org>
        * config/avr/avr.md (*sbrx_branch, *sbix_branch, *sbix_branch_tmp):
        Add mode to zero_extract.
        (sign bit tests peepholes): (Ditto.).

Index: gcc/config/avr/avr.md
===================================================================
--- gcc/config/avr/avr.md       (revision 134804)
+++ gcc/config/avr/avr.md       (working copy)
@@ -2056,7 +2056,7 @@
   [(set (pc)
         (if_then_else
         (match_operator 0 "eqne_operator"
-                        [(zero_extract
+                        [(zero_extract:QI
                           (match_operand:QI 1 "register_operand" "r")
                           (const_int 1)
                           (match_operand 2 "const_int_operand" "n"))
@@ -2123,9 +2123,9 @@
                           (label_ref (match_operand 1 "" ""))
                           (pc)))]
   ""
-  [(set (pc) (if_then_else (eq (zero_extract (match_dup 0)
-                                            (const_int 1)
-                                            (const_int 7))
+  [(set (pc) (if_then_else (eq (zero_extract:QI (match_dup 0)
+                                               (const_int 1)
+                                               (const_int 7))
                               (const_int 0))
                           (label_ref (match_dup 1))
                           (pc)))]
@@ -2137,9 +2137,9 @@
                           (label_ref (match_operand 1 "" ""))
                           (pc)))]
   ""
-  [(set (pc) (if_then_else (ne (zero_extract (match_dup 0)
-                                            (const_int 1)
-                                            (const_int 7))
+  [(set (pc) (if_then_else (ne (zero_extract:QI (match_dup 0)
+                                               (const_int 1)
+                                               (const_int 7))
                               (const_int 0))
                           (label_ref (match_dup 1))
                           (pc)))]
@@ -2518,7 +2518,7 @@
   [(set (pc)
        (if_then_else
         (match_operator 0 "eqne_operator"
-                        [(zero_extract
+                        [(zero_extract:QI
                           (mem:QI (match_operand 1 "low_io_address_operand" "n"))
                           (const_int 1)
                           (match_operand 2 "const_int_operand" "n"))
@@ -2565,7 +2565,7 @@
   [(set (pc)
        (if_then_else
         (match_operator 0 "eqne_operator"
-                        [(zero_extract
+                        [(zero_extract:QI
                           (mem:QI (match_operand 1 "high_io_address_operand" "n"))
                           (const_int 1)
                           (match_operand 2 "const_int_operand" "n"))



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]