aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2021-06-22 10:15:06 +0200
committerAlan Modra <amodra@gmail.com>2021-06-24 10:51:27 +0930
commit1daf786ba3db83455d4d2a9661d0715f433f8a3f (patch)
treeadaa0eaa03bd68f52b75efb7ed38fde90a7d5f3c /gas
parent2f631626f1d8a354d3c5f9d2fce15b47d05d1455 (diff)
downloadgdb-1daf786ba3db83455d4d2a9661d0715f433f8a3f.zip
gdb-1daf786ba3db83455d4d2a9661d0715f433f8a3f.tar.gz
gdb-1daf786ba3db83455d4d2a9661d0715f433f8a3f.tar.bz2
gas: update csect alignment for PPC prefixed instructions on XCOFF
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ppc.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 927e443..1b31855 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index ad85d38..80818e9 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -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