MIPS gas is broken now.
H. J. Lu
hjl@lucon.org
Wed Aug 14 07:51:00 GMT 2002
On Wed, Aug 14, 2002 at 10:11:26AM -0400, Daniel Jacobowitz wrote:
> On Wed, Aug 14, 2002 at 12:29:58AM -0700, H. J. Lu wrote:
> > Hi Maciej,
> >
> > Your mips change breaks mips gas. I checked in the following patch to
> > fix some of them. However, now I got
> >
> > # ../as-new -membedded-pic -mips3 -o dump.o /home/hjl/work/linux/src/binutils/binutils/gas/testsuite/gas/mips/empic.s
> > ...
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1241
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binutils/binutils/bfd/libbfd.c:1132
> > ../as-new: BFD 2.13.90.0.4 20020814 assertion fail
> > /home/hjl/work/linux/src/binu
> >
> > The problem is Linux/mips is no longer 64bit by default. Could you
> > please fix mips?
>
> Let's see... I've got:
> FAIL: MIPS -mgp64 -mfp32
>
> #name: MIPS -mgp64 -mfp32
> #as: -march=8000 -EB -mfp32
> and
> 92 bgtu $4, 0xffffffff, end # 012c li at,0x8000
> 93 # 0130 dsll at,at,17
> 94 # 0134 sltu at,a0,at
> 95 # 0138 beqz at,end
> produce:
> /opt/src/binutils/src/gas/testsuite/gas/mips/mips-gp64-fp64.s:92: Warning: Branch bgtu is always true
>
> So -march=8000 is no longer setting gp64.
>
> I've also got the assertion failure HJ mentioned, which is in
> bfd_getl64 but !BFD64.
>
> I'd say the bug was related to (at a guess):
> 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
>
> * Makefile.am: Add n32 ABI support.
> * Makefile.in: Regenerate.
> * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
> bit vectors for mips*-*-linux targets as optional.
> * configure.in: Add n32 ABI vectors.
> * configure: Regenerate.
> * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
> * elfn32-mips.c: New file, n32 ABI support.
> * targets.c: Add n32 ABI vectors.
>
> The problem is that elf32-mips.c contains things like:
> /* A 64 bit relocation. */
> HOWTO (R_MIPS_64, /* type */
> 0, /* rightshift */
> 4, /* size (0 = byte, 1 = short, 2 = long) */
> 64, /* bitsize */
> false, /* pc_relative */
> 0, /* bitpos */
> complain_overflow_dont, /* complain_on_overflow */
> mips32_64bit_reloc, /* special_function */
> "R_MIPS_64", /* name */
> true, /* partial_inplace */
> MINUS_ONE, /* src_mask */
> MINUS_ONE, /* dst_mask */
> false), /* pcrel_offset */
>
> where size == 4 implies 64-bit. As a consequence BFD64 must always be
> defined for MIPS targets.
>
> (Have targets which didn't include the 64-bit vectors, like netbsd,
> been seeing this failure for a while?)
>
Thanks. I will check in the following patch to fix Linux/mips. I will
leave the rest mips ports to others.
H.J.
-------------- next part --------------
bfd/
2002-08-14 H.J. Lu <hjl@gnu.org>
* config.bfd: Always add 64bit vectors to 32bit Linux/mips.
ld/
2002-08-14 H.J. Lu <hjl@gnu.org>
* configure.tgt: Always enable 64bit emulations for 32bit
Linux/mips.
--- binutils/bfd/config.bfd.32bit Tue Aug 13 20:48:33 2002
+++ binutils/bfd/config.bfd Wed Aug 14 07:39:44 2002
@@ -759,13 +759,11 @@ case "${targ}" in
#endif
mips*el-*-linux*)
targ_defvec=bfd_elf32_tradlittlemips_vec
- targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
- targ64_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
+ targ_selvecs="bfd_elf32_tradbigmips_vec ecoff_little_vec ecoff_big_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec"
;;
mips*-*-linux*)
targ_defvec=bfd_elf32_tradbigmips_vec
- targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
- targ64_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
+ targ_selvecs="bfd_elf32_tradlittlemips_vec ecoff_big_vec ecoff_little_vec bfd_elf32_ntradbigmips_vec bfd_elf64_tradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradlittlemips_vec"
;;
#ifdef BFD64
mmix-*-*)
--- binutils/ld/configure.tgt.32bit Tue Aug 13 20:49:23 2002
+++ binutils/ld/configure.tgt Wed Aug 14 07:45:18 2002
@@ -399,16 +399,10 @@ mips64*-*-linux-gnu*) targ_emul=elf32bts
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
;;
mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip"
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
- fi
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
;;
mips*-*-linux-gnu*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip"
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
- fi
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
mips*-*-sysv4*) targ_emul=elf32btsmip ;;
More information about the Binutils
mailing list