[AArch64] Record instruction alignment for .inst directive
[deliverable/binutils-gdb.git] / gas / config / tc-aarch64.c
index 12012de3f2e4830f6ff5bf7e9af816b566d5e425..ae0e2d64f756d5e3ae98d3e2b0739623553f9133 100644 (file)
@@ -1460,17 +1460,17 @@ mapping_state (enum mstate state)
 {
   enum mstate mapstate = seg_info (now_seg)->tc_segment_info_data.mapstate;
 
-  if (mapstate == state)
-    /* The mapping symbol has already been emitted.
-       There is nothing else to do.  */
-    return;
-
   if (state == MAP_INSN)
     /* AArch64 instructions require 4-byte alignment.  When emitting
        instructions into any section, record the appropriate section
        alignment.  */
     record_alignment (now_seg, 2);
 
+  if (mapstate == state)
+    /* The mapping symbol has already been emitted.
+       There is nothing else to do.  */
+    return;
+
 #define TRANSITION(from, to) (mapstate == (from) && state == (to))
   if (TRANSITION (MAP_UNDEFINED, MAP_DATA) && !subseg_text_p (now_seg))
     /* Emit MAP_DATA within executable section in order.  Otherwise, it will be
This page took 0.024449 seconds and 4 git commands to generate.