If the triple is mipsisa32r6* or mipsisa64r6*, ld/as should output
r6 objects by default.
The triples with vendor `img` should do same.
The examples include:
as xx.s -o xx.o
ld -r -b binary xx.dat -o xx.o
targ_archs="$targ_archs bfd_iamcu_arch"
;;
esac
+
+case "${targ}" in
+ mipsisa32r6* | mipsisa64r6* | mips*-img-*)
+ targ_cflags="$targ_cflags -DMIPS_DEFAULT_R6=1"
+ ;;
+esac
{
default:
if (ABI_N32_P (abfd) || ABI_64_P (abfd))
- val = E_MIPS_ARCH_3;
+ val = MIPS_DEFAULT_R6 ? E_MIPS_ARCH_64R6 : E_MIPS_ARCH_3;
else
- val = E_MIPS_ARCH_1;
+ val = MIPS_DEFAULT_R6 ? E_MIPS_ARCH_32R6 : E_MIPS_ARCH_1;
break;
case bfd_mach_mips3000:
check_shuffle
};
+#ifndef MIPS_DEFAULT_R6
+#define MIPS_DEFAULT_R6 0
+#endif
+
extern bool _bfd_mips_elf_mkobject
(bfd *);
extern bool _bfd_mips_elf_close_and_cleanup
use_e_mips_abi_o32=1
;;
esac
+ # If Vendor is IMG, then MIPSr6 is used
+ case ${target} in
+ mips*64*-img-*)
+ mips_cpu=mips64r6
+ ;;
+ mips*-img-*)
+ mips_cpu=mips32r6
+ ;;
+ esac
# Decide whether to generate 32-bit or 64-bit code by default.
# Used to resolve -march=from-abi when an embedded ABI is selected.
case ${target} in
use_e_mips_abi_o32=1
;;
esac
+ # If Vendor is IMG, then MIPSr6 is used
+ case ${target} in
+ mips*64*-img-*)
+ mips_cpu=mips64r6
+ ;;
+ mips*-img-*)
+ mips_cpu=mips32r6
+ ;;
+ esac
# Decide whether to generate 32-bit or 64-bit code by default.
# Used to resolve -march=from-abi when an embedded ABI is selected.
case ${target} in