public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "CHIGOT, CLEMENT" <clement.chigot@atos.net>
To: "binutils@sourceware.org" <binutils@sourceware.org>
Subject: [PATCH] gas: update csect alignment for PPC prefixed instructions on XCOFF
Date: Tue, 22 Jun 2021 11:19:30 +0000	[thread overview]
Message-ID: <PA4PR02MB66863B5F6E73A221E72ABB38EA099@PA4PR02MB6686.eurprd02.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

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  <clement.chigot@atos.net>

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




[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gas-update-csect-alignment-for-PPC-prefixed-instruct.patch --]
[-- Type: text/x-patch; name="0001-gas-update-csect-alignment-for-PPC-prefixed-instruct.patch", Size: 1324 bytes --]

From d4b4c74e9794dfc77d62f39ca16b6f8d1076c7c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <clement.chigot@atos.net>
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  <clement.chigot@atos.net>

	* 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


             reply	other threads:[~2021-06-22 11:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 11:19 CHIGOT, CLEMENT [this message]
2021-06-23  1:11 ` Alan Modra
2021-06-23  6:49   ` CHIGOT, CLEMENT
2021-06-24  1:23     ` Alan Modra
2021-06-23 17:00 David Edelsohn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PA4PR02MB66863B5F6E73A221E72ABB38EA099@PA4PR02MB6686.eurprd02.prod.outlook.com \
    --to=clement.chigot@atos.net \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).