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.
This commit is contained in:
Clément Chigot 2021-06-22 10:15:06 +02:00 committed by Alan Modra
parent 2f631626f1
commit 1daf786ba3
2 changed files with 10 additions and 0 deletions

View 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.

View 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