From d4b4c74e9794dfc77d62f39ca16b6f8d1076c7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= Date: Tue, 22 Jun 2021 10:15:06 +0200 Subject: [PATCH] gas: update csect alignment for PPC prefixed instructions on XCOFF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. gas/ChangeLog: 2021-06-22 Clément Chigot * config/tc-ppc.c (md_assemble): Update ppc_current_csect alignment when finding prefixed instructions. --- gas/config/tc-ppc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index ad85d3863b0..1f49db34659 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -4039,6 +4039,10 @@ md_assemble (char *str) boundaries. */ frag_align_code (6, 4); record_alignment (now_seg, 6); +#ifdef OBJ_XCOFF + /* Update alignment of the containing csect. */ + 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 -- 2.25.1