From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: binutils@sources.redhat.com
Subject: [patch] MIPS/gas: GPREL16 relocs against constants
Date: Thu, 14 Apr 2005 14:50:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.61L.0504141538070.22596@blysk.ds.pg.gda.pl> (raw)
Hello,
Due to a recent code rearrangement we now attempt to emit GPREL16 relocs
against constants for the "ldd_std" case in macro(). This is of course
not going to work, and actually ends up with an assertion failure later.
Here's an obvious fix.
2005-04-14 Maciej W. Rozycki <macro@linux-mips.org>
* config/tc-mips.c (macro) [ldd_std]: Don't attempt the GP
optimization for constant addresses.
OK to apply?
Maciej
binutils-2.15.96-20050331-mips-gas-gprel-symbol.patch
diff -up --recursive --new-file binutils-2.15.96-20050331.macro/gas/config/tc-mips.c binutils-2.15.96-20050331/gas/config/tc-mips.c
--- binutils-2.15.96-20050331.macro/gas/config/tc-mips.c 2005-03-22 04:25:33.000000000 +0000
+++ binutils-2.15.96-20050331/gas/config/tc-mips.c 2005-04-11 02:44:42.000000000 +0000
@@ -6397,7 +6397,8 @@ macro (struct mips_cl_insn *ip)
If there is a base register, we add it to $at after the
lui instruction. If there is a constant, we always use
the last case. */
- if ((valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
+ if (offset_expr.X_op == O_symbol
+ && (valueT) offset_expr.X_add_number <= MAX_GPREL_OFFSET
&& !nopic_need_relax (offset_expr.X_add_symbol, 1))
{
relax_start (offset_expr.X_add_symbol);
next reply other threads:[~2005-04-14 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-14 14:50 Maciej W. Rozycki [this message]
2005-04-14 15:11 ` Thiemo Seufer
2005-04-14 15:33 ` Maciej W. Rozycki
2005-04-14 15:36 ` Daniel Jacobowitz
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=Pine.LNX.4.61L.0504141538070.22596@blysk.ds.pg.gda.pl \
--to=macro@linux-mips.org \
--cc=binutils@sources.redhat.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).