This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: how close to binutils-2.12 previews
Maciej W. Rozycki wrote:
[snip]
> binutils-2.11.93-20020129-ulfc-mips-la.patch
> diff -up --recursive --new-file binutils.macro/gas/config/tc-mips.c binutils/gas/config/tc-mips.c
> --- binutils.macro/gas/config/tc-mips.c Thu Jan 17 04:25:24 2002
> +++ binutils/gas/config/tc-mips.c Wed Jan 30 19:43:22 2002
> @@ -4569,6 +4569,14 @@ macro (ip)
> /* Load the address of a symbol into a register. If breg is not
> zero, we then add a base register to it. */
>
> + if (dbl != HAVE_64BIT_ADDRESSES)
> + {
> + if (dbl)
> + as_warn (_("dla instruction used in 32-bit mode"));
> + else
> + as_warn (_("la instruction used in 64-bit mode"));
> + }
It's valid to use 64bit opcodes in 32bit object format. Warnings
would be misleading in this case. I had this code in my private
tree for a while but didn't contribute it due to testsuite failures
caused by it.
if (dbl && HAVE_32BIT_GPRS)
as_warn (_("dla used to load 32-bit register"));
if (! dbl && HAVE_64BIT_ADDRESSES)
as_warn (_("la used to load 64-bit address"));
[snip]
> #ifdef BFD64
> mips64*el-*-linux*)
> - targ_defvec=bfd_elf32_tradlittlemips_vec
> - targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
> + targ_defvec=bfd_elf64_tradlittlemips_vec
> + targ_selvecs="bfd_elf64_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec"
> ;;
> mips64*-*-linux*)
> - targ_defvec=bfd_elf32_tradbigmips_vec
> - targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
> + targ_defvec=bfd_elf64_tradbigmips_vec
> + targ_selvecs="bfd_elf64_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec"
> ;;
> #endif
Default for mips64 is to generate 32bit code, so targ_defvec
shouldn't be changed like this.
Thiemo