gas: update csect alignment for PPC prefixed instructions on XCOFF
authorClément Chigot <clement.chigot@atos.net>
Tue, 22 Jun 2021 08:15:06 +0000 (10:15 +0200)
committerAlan Modra <amodra@gmail.com>
Thu, 24 Jun 2021 01:21:27 +0000 (10:51 +0930)
Power10 prefixed instructions must not cross 64-byte boundaries.
This is already handled.
However, on XCOFF, the csect must be updated to match the new
alignment.

* config/tc-ppc.c (md_assemble): Update ppc_current_csect
alignment when finding prefixed instructions.

gas/ChangeLog
gas/config/tc-ppc.c

index 927e443d891233df47f3884d25e160dc7212cc64..1b318559212c8662ac7f2caa9d982ad60175d774 100644 (file)
@@ -1,3 +1,8 @@
+2021-06-24  Clément Chigot  <clement.chigot@atos.net>
+
+       * config/tc-ppc.c (md_assemble): Update ppc_current_csect
+       alignment when finding prefixed instructions.
+
 2021-06-22  Alan Modra  <amodra@gmail.com>
 
        * config/tc-pj.c (md_apply_fix): Apply PJ_CODE_REL32 relocs.
index ad85d3863b0025be1809e33dc331f04920889e39..80818e9c9435fc401a7444b26e49622a42ab3c6e 100644 (file)
@@ -4039,6 +4039,11 @@ md_assemble (char *str)
         boundaries.  */
       frag_align_code (6, 4);
       record_alignment (now_seg, 6);
+#ifdef OBJ_XCOFF
+      /* Update alignment of the containing csect.  */
+      if (symbol_get_tc (ppc_current_csect)->align < 6)
+       symbol_get_tc (ppc_current_csect)->align = 6;
+#endif
 
       /* Update "dot" in any expressions used by this instruction, and
         a label attached to the instruction.  By "attached" we mean
This page took 0.029496 seconds and 4 git commands to generate.