aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2009-08-05 21:22:15 +0000
committerChao-ying Fu <fu@mips.com>2009-08-05 21:22:15 +0000
commitb12dd2e413a8a2491986dcb46ae42d3c8362629b (patch)
tree6cefdb3a6181384f589079649a651be3f1894d91 /gas
parentcd8d5a82a25684b60494b5ac21e7807b985e1ca4 (diff)
downloadgdb-b12dd2e413a8a2491986dcb46ae42d3c8362629b.zip
gdb-b12dd2e413a8a2491986dcb46ae42d3c8362629b.tar.gz
gdb-b12dd2e413a8a2491986dcb46ae42d3c8362629b.tar.bz2
2009-08-05 Chao-ying Fu <fu@mips.com>
* config/tc-mips.c (MIPS_JALR_HINT_P): New define. For IRIX, it is true for new abi. For non-IRIX targets, it is always true. (macro_build_jalr): If MIPS_JALR_HINT_P, emit BFD_RELOC_MIPS_JALR.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c12
2 files changed, 16 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3b9dc58..6bbf281 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-05 Chao-ying Fu <fu@mips.com>
+
+ * config/tc-mips.c (MIPS_JALR_HINT_P): New define. For IRIX, it is
+ true for new abi. For non-IRIX targets, it is always true.
+ (macro_build_jalr): If MIPS_JALR_HINT_P, emit BFD_RELOC_MIPS_JALR.
+
2009-08-05 Eric B. Weddington <eric.weddington@atmel.com>
* config/tc-avr.c (mcu_types): Add attiny2313a, attiny4313, attiny261a,
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 5f8d447..0a2f9e4 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -290,6 +290,14 @@ static int file_ase_mips16;
|| mips_opts.isa == ISA_MIPS64 \
|| mips_opts.isa == ISA_MIPS64R2)
+/* True if we want to create R_MIPS_JALR for jalr $25. */
+#ifdef TE_IRIX
+#define MIPS_JALR_HINT_P HAVE_NEWABI
+#else
+/* As a GNU extension, we use R_MIPS_JALR for o32 too. */
+#define MIPS_JALR_HINT_P 1
+#endif
+
/* True if -mips3d was passed or implied by arguments passed on the
command line (e.g., by -march). */
static int file_ase_mips3d;
@@ -3922,13 +3930,13 @@ macro_build_jalr (expressionS *ep)
{
char *f = NULL;
- if (HAVE_NEWABI)
+ if (MIPS_JALR_HINT_P)
{
frag_grow (8);
f = frag_more (0);
}
macro_build (NULL, "jalr", "d,s", RA, PIC_CALL_REG);
- if (HAVE_NEWABI)
+ if (MIPS_JALR_HINT_P)
fix_new_exp (frag_now, f - frag_now->fr_literal,
4, ep, FALSE, BFD_RELOC_MIPS_JALR);
}