public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* power10 on ppc32
@ 2020-09-09 13:20 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-09-09 13:20 UTC (permalink / raw)
  To: binutils

We don't support power10 on ppc32, mainly because some instructions
have 34-bit fields for which we don't have relocations on ppc32.
If you try to assemble typical code, you'll see errors saying
"reloc ... not supported by object file format".  Also, on 32-bit
hosts with binutils configured without a 64-bit bfd, you'll see errors
saying "bignum invalid" when using large offsets.  But let's not kill
output of prefix insns entirely on 32-bit hosts.

	* config/tc-ppc.c (md_assemble): Emit prefix insn by parts when
	valueT is smaller than 64 bits.

diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 1ff1cd9eab..441818215e 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3882,7 +3882,8 @@ md_assemble (char *str)
 
   /* The prefix part of an 8-byte instruction always occupies the lower
      addressed word in a doubleword, regardless of endianness.  */
-  if (!target_big_endian && insn_length == 8)
+  if (insn_length == 8
+      && (sizeof (insn) > sizeof (valueT) || !target_big_endian))
     {
       md_number_to_chars (f, PPC_GET_PREFIX (insn), 4);
       md_number_to_chars (f + 4, PPC_GET_SUFFIX (insn), 4);

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-09 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 13:20 power10 on ppc32 Alan Modra

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