From: Michael Meissner <meissner@cygnus.com>
To: cagney@highland.com.au
Cc: gas2@cygnus.com
Subject: gas-950726/ss-950728/powerpc*-*-eabi: addis 9,0,a-400000@ha ???
Date: Fri, 11 Aug 1995 10:31:00 -0000 [thread overview]
Message-ID: <199508111731.NAA01820@tiktok.cygnus.com> (raw)
In-Reply-To: <kk7R4ob02QU6ReMY4t@highland.com.au>
| Hello,
|
| c-torture-1.34/execute/index-1.c
|
| from the lines:
|
| int
| f (int n)
| {
| return a[n - 100000];
| }
|
| outputs the assembler:
|
| addis 9,0,a-400000@ha
| addi 11,9,a-400000@l
|
| quite simply, is this valid PowerPC assembler? Gas doesn't think so:
This will be fixed in tonights fixes. Here are the patches:
Fri Aug 11 13:23:56 1995 Michael Meissner <meissner@cygnus.com>
* write.h (struct fix): Add new field fx_no_overflow.
* write.c (fixup_segment): If fx_no_overflow is non-zero, don't
complain if the addend is too large.
* config/tc-ppc.c (md_assemble): Set fx_no_overflow if the half
word relocations BFD_RELOC_{LO16,HI16,HI16_S}.
*** write.h.~1~ Wed Jul 12 10:17:43 1995
--- write.h Fri Aug 11 13:16:44 1995
*************** struct fix
*** 78,83 ****
--- 78,88 ----
/* Has this relocation already been applied? */
unsigned fx_done : 1;
+ /* Suppress overflow complaints on large addends. This is used
+ in the PowerPC ELF config to allow large addends on the
+ BFD_RELOC_{LO16,HI16,HI16_S} relocations. */
+ unsigned fx_no_overflow : 1;
+
/* How many bytes are involved? */
short int fx_size;
*** write.c.~1~ Thu Aug 10 09:13:24 1995
--- write.c Fri Aug 11 13:17:16 1995
*************** fixup_segment (fixP, this_segment_type)
*** 2391,2397 ****
}
}
! if (!fixP->fx_bit_fixP && size > 0)
{
valueT mask = 0;
if (size < sizeof (mask))
--- 2391,2397 ----
}
}
! if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0)
{
valueT mask = 0;
if (size < sizeof (mask))
*** config/tc-ppc.c.~1~ Fri Jul 21 23:10:32 1995
--- config/tc-ppc.c Fri Aug 11 13:16:54 1995
*************** md_assemble (str)
*** 875,887 ****
reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
int size = (!reloc_howto) ? 0 : bfd_get_reloc_size (reloc_howto);
int offset = target_big_endian ? (4 - size) : 0;
if (size > 4)
abort();
! fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size,
! &fixups[i].exp, (reloc_howto && reloc_howto->pc_relative),
! fixups[i].reloc);
}
else
fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
--- 875,899 ----
reloc_howto_type *reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
int size = (!reloc_howto) ? 0 : bfd_get_reloc_size (reloc_howto);
int offset = target_big_endian ? (4 - size) : 0;
+ fixS *fixP;
if (size > 4)
abort();
! fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset, size,
! &fixups[i].exp, (reloc_howto && reloc_howto->pc_relative),
! fixups[i].reloc);
!
! /* Turn off complaints that the addend is too large for things like
! foo+100000@ha. */
! switch (fixups[i].reloc)
! {
! case BFD_RELOC_LO16:
! case BFD_RELOC_HI16:
! case BFD_RELOC_HI16_S:
! fixP->fx_no_overflow = 1;
! break;
! }
}
else
fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
--
Michael Meissner, Cygnus Support (East Coast)
Suite 105, 48 Grove Street, Somerville, MA 02144, USA
meissner@cygnus.com, 617-629-3016 (office), 617-629-3010 (fax)
prev parent reply other threads:[~1995-08-11 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-08-01 0:41 Andrew Cagney
1995-08-09 12:38 ` Michael Meissner
1995-08-11 10:31 ` Michael Meissner [this message]
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=199508111731.NAA01820@tiktok.cygnus.com \
--to=meissner@cygnus.com \
--cc=cagney@highland.com.au \
--cc=gas2@cygnus.com \
/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).