* config/tc-arm.c (md_assemble): Allow barrier instructions on
authorMark Mitchell <mark@codesourcery.com>
Mon, 2 Mar 2009 00:29:23 +0000 (00:29 +0000)
committerMark Mitchell <mark@codesourcery.com>
Mon, 2 Mar 2009 00:29:23 +0000 (00:29 +0000)
ARMv6-M cores.

* gas/arm/archv6m.s: Add dmb, dsb, and isb.
* gas/arm/archv6m.d: Likewise.

gas/ChangeLog
gas/config/tc-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/archv6m.d
gas/testsuite/gas/arm/archv6m.s

index b3f22a87b4f572eeaf392824affc9fc6954c7b1f..8b8db8ec3b6a746a9461bdf3fa30f7ca8fb63342 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-01  Mark Mitchell  <mark@codesourcery.com>
+
+       * config/tc-arm.c (md_assemble): Allow barrier instructions on
+       ARMv6-M cores.
+
 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * configure: Regenerate.
index a1e5d12ccb0255702655a75aa110341175bead1f..bb783bdd40effd336bf7730b34cb606339beb017 100644 (file)
@@ -14747,7 +14747,8 @@ md_assemble (char *str)
          /* Implicit require narrow instructions on Thumb-1.  This avoids
             relaxation accidentally introducing Thumb-2 instructions.  */
          if (opcode->tencode != do_t_blx && opcode->tencode != do_t_branch23
-             && !ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr))
+             && !(ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr)
+                  || ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_barrier)))
            inst.size_req = 2;
        }
 
@@ -14805,7 +14806,8 @@ md_assemble (char *str)
         This is overly pessimistic for relaxable instructions.  */
       if (((inst.size == 4 && (inst.instruction & 0xf800e800) != 0xf000e800)
           || inst.relax)
-         && !ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr))
+         && !(ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_msr)
+              || ARM_CPU_HAS_FEATURE(*opcode->tvariant, arm_ext_barrier)))
        ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
                                arm_ext_v6t2);
     }
index 31c1dd0d772017d30d5c74714be5425c0979dfe5..69d31f497d89b09fa7988cf49de0538a5890f8dd 100644 (file)
@@ -1,3 +1,8 @@
+2009-03-01  Mark Mitchell  <mark@codesourcery.com>
+
+       * gas/arm/archv6m.s: Add dmb, dsb, and isb.
+       * gas/arm/archv6m.d: Likewise.
+
 2009-02-26  Peter Bergner  <bergner@vnet.ibm.com>
 
        * gas/ppc/e500mc.d ("wait", "waitsrv", "waitimpl"): Add tests.
index 31d06a31584391494835444b7ee154f45cc08163..2ad48a769e9415c06148d871e13797082f0077ce 100644 (file)
@@ -13,3 +13,6 @@ Disassembly of section .text:
 0[0-9a-f]+ <[^>]+> bf40        sev
 0[0-9a-f]+ <[^>]+> 4408        add     r0, r1
 0[0-9a-f]+ <[^>]+> 46c0        nop.*
+0[0-9a-f]+ <[^>]+> f3bf 8f5f   dmb     sy
+0[0-9a-f]+ <[^>]+> f3bf 8f4f   dsb     sy
+0[0-9a-f]+ <[^>]+> f3bf 8f6f   isb     sy
index 158b6a6d93612c3893dfcd28dca3089d7a028aba..013bba915fd05990afb003187f70cf3e52988a1b 100644 (file)
@@ -14,3 +14,7 @@ foo:
        sev
        add r0, r0, r1
        nop
+       dmb
+       dsb
+       isb
+