]> gcc.gnu.org Git - gcc.git/commitdiff
predicates.md (arm_sync_memory_operand): New.
authorMarcus Shawcroft <mshawcroft@gcc.gnu.org>
Thu, 2 Sep 2010 09:01:56 +0000 (09:01 +0000)
committerMarcus Shawcroft <mshawcroft@gcc.gnu.org>
Thu, 2 Sep 2010 09:01:56 +0000 (09:01 +0000)
2010-09-02  Marcus Shawcroft  <marcus.shawcroft@arm.com>

* config/arm/predicates.md (arm_sync_memory_operand): New.
* config/arm/sync.md (arm_sync_compare_and_swapsi): Change predicate
        to arm_sync_memory_operand and constraint to Q.
(arm_sync_compare_and_swap<mode>): Likewise.
(arm_sync_compare_and_swap<mode>): Likewise.
(arm_sync_lock_test_and_setsi): Likewise.
(arm_sync_lock_test_and_set<mode>): Likewise.
        (arm_sync_new_<sync_optab>si): Likewise.
        (arm_sync_new_nandsi): Likewise.
        (arm_sync_new_<sync_optab><mode>): Likewise.
        (arm_sync_new_nand<mode>): Likewise.
        (arm_sync_old_<sync_optab>si): Likewise.
        (arm_sync_old_nandsi): Likewise.
        (arm_sync_old_<sync_optab><mode>): Likewise.
        (arm_sync_old_nand<mode>): Likewise.

From-SVN: r163765

gcc/config/arm/predicates.md
gcc/config/arm/sync.md

index 032b2ecaaf3f4e0f001c942b1580567b605e1cc3..54f4861a0088a0520705fe65cbe9306d84d7955c 100644 (file)
                (and (match_test "TARGET_32BIT")
                     (match_operand 0 "arm_di_operand"))))
 
+;; True if the operand is memory reference suitable for a ldrex/strex.
+(define_predicate "arm_sync_memory_operand"
+  (and (match_operand 0 "memory_operand")
+       (match_code "reg" "0")))
+
 ;; Predicates for parallel expanders based on mode.
 (define_special_predicate "vect_par_constant_high" 
   (match_code "parallel")
index 7fd38d75484d3d9bdff69c458c2938fd4c41a5cf..f942d1f94e74684b8801c8ac501e7b016b667d55 100644 (file)
 (define_insn "arm_sync_compare_and_swapsi"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI
-         [(match_operand:SI 1 "memory_operand" "+m")
+         [(match_operand:SI 1 "arm_sync_memory_operand" "+Q")
           (match_operand:SI 2 "s_register_operand" "r")
           (match_operand:SI 3 "s_register_operand" "r")]
          VUNSPEC_SYNC_COMPARE_AND_SWAP))
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (zero_extend:SI
          (unspec_volatile:NARROW
-           [(match_operand:NARROW 1 "memory_operand" "+m")
+           [(match_operand:NARROW 1 "arm_sync_memory_operand" "+Q")
             (match_operand:SI 2 "s_register_operand" "r")
             (match_operand:SI 3 "s_register_operand" "r")]
            VUNSPEC_SYNC_COMPARE_AND_SWAP)))
 
 (define_insn "arm_sync_lock_test_and_setsi"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
-        (match_operand:SI 1 "memory_operand" "+m"))
+        (match_operand:SI 1 "arm_sync_memory_operand" "+Q"))
    (set (match_dup 1)
         (unspec_volatile:SI [(match_operand:SI 2 "s_register_operand" "r")]
                            VUNSPEC_SYNC_LOCK))
 
 (define_insn "arm_sync_lock_test_and_set<mode>"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
-        (zero_extend:SI (match_operand:NARROW 1 "memory_operand" "+m")))
+        (zero_extend:SI (match_operand:NARROW 1 "arm_sync_memory_operand" "+Q")))
    (set (match_dup 1)
         (unspec_volatile:NARROW [(match_operand:SI 2 "s_register_operand" "r")]
                                VUNSPEC_SYNC_LOCK))
 (define_insn "arm_sync_new_<sync_optab>si"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(syncop:SI
-                               (match_operand:SI 1 "memory_operand" "+m")
+                               (match_operand:SI 1 "arm_sync_memory_operand" "+Q")
                                (match_operand:SI 2 "s_register_operand" "r"))
                            ]
                            VUNSPEC_SYNC_NEW_OP))
 (define_insn "arm_sync_new_nandsi"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(not:SI (and:SI
-                               (match_operand:SI 1 "memory_operand" "+m")
+                               (match_operand:SI 1 "arm_sync_memory_operand" "+Q")
                                (match_operand:SI 2 "s_register_operand" "r")))
                            ]
                            VUNSPEC_SYNC_NEW_OP))
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(syncop:SI
                                (zero_extend:SI
-                                (match_operand:NARROW 1 "memory_operand" "+m"))
+                                (match_operand:NARROW 1 "arm_sync_memory_operand" "+Q"))
                                (match_operand:SI 2 "s_register_operand" "r"))
                            ]
                            VUNSPEC_SYNC_NEW_OP))
          [(not:SI
             (and:SI
                (zero_extend:SI   
-                (match_operand:NARROW 1 "memory_operand" "+m"))
+                (match_operand:NARROW 1 "arm_sync_memory_operand" "+Q"))
                (match_operand:SI 2 "s_register_operand" "r")))
          ] VUNSPEC_SYNC_NEW_OP))
    (set (match_dup 1)
 (define_insn "arm_sync_old_<sync_optab>si"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(syncop:SI
-                               (match_operand:SI 1 "memory_operand" "+m")
+                               (match_operand:SI 1 "arm_sync_memory_operand" "+Q")
                                (match_operand:SI 2 "s_register_operand" "r"))
                            ]
                            VUNSPEC_SYNC_OLD_OP))
 (define_insn "arm_sync_old_nandsi"
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(not:SI (and:SI
-                               (match_operand:SI 1 "memory_operand" "+m")
+                               (match_operand:SI 1 "arm_sync_memory_operand" "+Q")
                                (match_operand:SI 2 "s_register_operand" "r")))
                            ]
                            VUNSPEC_SYNC_OLD_OP))
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(syncop:SI
                                (zero_extend:SI
-                                (match_operand:NARROW 1 "memory_operand" "+m"))
+                                (match_operand:NARROW 1 "arm_sync_memory_operand" "+Q"))
                                (match_operand:SI 2 "s_register_operand" "r"))
                            ]
                            VUNSPEC_SYNC_OLD_OP))
   [(set (match_operand:SI 0 "s_register_operand" "=&r")
         (unspec_volatile:SI [(not:SI (and:SI
                                (zero_extend:SI
-                                (match_operand:NARROW 1 "memory_operand" "+m"))
+                                (match_operand:NARROW 1 "arm_sync_memory_operand" "+Q"))
                                (match_operand:SI 2 "s_register_operand" "r")))
                            ]
                            VUNSPEC_SYNC_OLD_OP))
This page took 0.073675 seconds and 5 git commands to generate.