sync.md ("atomic_compare_and_swap<mode>"): Change predicate to nonmemory_operand...
authorHans-Peter Nilsson <hp@axis.com>
Mon, 16 Jul 2012 03:02:47 +0000 (03:02 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Mon, 16 Jul 2012 03:02:47 +0000 (03:02 +0000)
* config/cris/sync.md ("atomic_compare_and_swap<mode>"): Change
predicate to nonmemory_operand for operand 3.  Add FIXME.
("cris_atomic_compare_and_swap<mode>_1"): Change predicates and

From-SVN: r189501

gcc/ChangeLog
gcc/config/cris/sync.md

index 2e12d4eb54b4a50261f95c2707ede065e2107f52..2ff638d466ad3f51014c7298dde5d19a794c0c1d 100644 (file)
@@ -1,6 +1,10 @@
 2012-07-16  Hans-Peter Nilsson  <hp@axis.com>
 
-       * config/cris/sync.md ("atomic_fetch_<atomic_op_name><mode>")
+       * config/cris/sync.md ("atomic_compare_and_swap<mode>"): Change
+       predicate to nonmemory_operand for operand 3.  Add FIXME.
+       ("cris_atomic_compare_and_swap<mode>_1"): Change predicates and
+       constraints for operand 3 to exclude memory.
+       ("atomic_fetch_<atomic_op_name><mode>")
        ("atomic_compare_and_swap<mode>"): Gate expand_mem_thread_fence
        calls on result of call to need_atomic_barrier_p.
 
index 5dc2858d99d342871b1e2ec89a2c9d681ba81a6d..baa2bebc7cb01d6f384fe2dfd4ba12e4cbaf28b5 100644 (file)
 ;; can_compare_and_swap_p call in omp-low.c, 4.8 era).  We'd slightly
 ;; prefer atomic_exchange<mode> over this, but having both would be
 ;; redundant.
+;; FIXME: handle memory without side-effects for operand[3].
 (define_expand "atomic_compare_and_swap<mode>"
   [(match_operand:SI 0 "register_operand")
    (match_operand:BWD 1 "register_operand")
    (match_operand:BWD 2 "memory_operand")
-   (match_operand:BWD 3 "general_operand")
+   (match_operand:BWD 3 "nonmemory_operand")
    (match_operand:BWD 4 "register_operand")
    (match_operand 5)
    (match_operand 6)
   [(set (match_operand:SI 0 "register_operand" "=&r")
        (unspec_volatile:SI
         [(match_operand:BWD 2 "memory_operand" "+Q")
-         (match_operand:BWD 3 "general_operand" "g")]
+         (match_operand:BWD 3 "nonmemory_operand" "ri")]
         CRIS_UNSPEC_ATOMIC_SWAP_BOOL))
    (set (match_operand:BWD 1 "register_operand" "=&r") (match_dup 2))
    (set (match_dup 2)