m68k: Limit TAS to 68000 and CF ISA_B.
authorRichard Henderson <rth@redhat.com>
Tue, 6 Mar 2012 18:20:34 +0000 (10:20 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 6 Mar 2012 18:20:34 +0000 (10:20 -0800)
From-SVN: r185011

gcc/ChangeLog
gcc/config/m68k/m68k.h
gcc/config/m68k/sync.md

index 6f5d9cbfd5d8af402292dd81b7b91a8aefe5f851..aee953e04845563c7153d3cf9ec0179af40cd058 100644 (file)
@@ -1,3 +1,9 @@
+2012-03-06  Richard Henderson  <rth@redhat.com>
+
+       * config/m68k/m68k.h (ISA_HAS_TAS): New.
+       * config/m68k/sync.md (atomic_test_and_set): Use it.
+       (atomic_test_and_set_1): Likewise.
+
 2012-03-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/50310
index dbb97561d57969617255faf1d41d41cfba3718de..42d377942e7182704cb2bf5df181cc95470d0866 100644 (file)
@@ -249,6 +249,7 @@ along with GCC; see the file COPYING3.  If not see
 /* Some instructions are common to more than one ISA.  */
 #define ISA_HAS_MVS_MVZ        (TARGET_ISAB || TARGET_ISAC)
 #define ISA_HAS_FF1    (TARGET_ISAAPLUS || TARGET_ISAC)
+#define ISA_HAS_TAS    (!TARGET_COLDFIRE || TARGET_ISAB || TARGET_ISAC)
 
 #define TUNE_68000     (m68k_tune == u68000)
 #define TUNE_68010     (m68k_tune == u68010)
index 6c840f51b60e478bf297f4565920efc54d5c3d72..d5cab792ba4b8d6f7b50a44e4cae61040e4fae10 100644 (file)
@@ -60,7 +60,7 @@
   [(match_operand:QI 0 "register_operand" "")          ;; bool success output
    (match_operand:QI 1 "memory_operand" "")            ;; memory
    (match_operand:SI 2 "const_int_operand" "")]                ;; model
-  ""
+  "ISA_HAS_TAS"
 {
   rtx t = gen_reg_rtx (QImode);
   emit_insn (gen_atomic_test_and_set_1 (t, operands[1]));
@@ -77,5 +77,5 @@
          UNSPECV_TAS_1))
    (set (match_dup 1)
        (unspec_volatile:QI [(match_dup 1)] UNSPECV_TAS_2))]
-  ""
+  "ISA_HAS_TAS"
   "tas %1\;sne %0")