===================================================================
@@ -297,6 +297,9 @@
;;
esac
+# Save parameter --with-llsc for later check.
+param_llsc="$with_llsc"
+
# Set default cpu_type, tm_file, tm_p_file and xm_file so it can be
# updated in each machine entry. Also set default extra_headers for some
# machines.
@@ -2985,7 +2988,7 @@
mips64r5900-*-* | mips64r5900el-*-* | mipsr5900-*-* | mipsr5900el-*-*)
with_arch=r5900
with_tune=r5900
- if test x$with_llsc = x; then
+ if test x$param_llsc = x; then
# r5900 doesn't support ll, sc, lld and scd instructions:
with_llsc=no
fi
===================================================================
@@ -12463,7 +12463,11 @@
if (!ISA_HAS_LL_SC)
{
output_asm_insn (".set\tpush", 0);
- output_asm_insn (".set\tmips2", 0);
+ if (TARGET_64BIT) {
+ output_asm_insn (".set\tmips3", 0);
+ } else {
+ output_asm_insn (".set\tmips2", 0);
+ }
}
}
===================================================================
@@ -1063,7 +1081,7 @@
/* ISA includes ll and sc. Note that this implies ISA_HAS_SYNC
because the expanders use both ISA_HAS_SYNC and ISA_HAS_LL_SC
instructions. */
-#define ISA_HAS_LL_SC (mips_isa >= 2 && !TARGET_MIPS16)
+#define ISA_HAS_LL_SC (mips_isa >= 2 && !TARGET_MIPS16 && !TARGET_MIPS5900)
#define GENERATE_LL_SC \
(target_flags_explicit & MASK_LLSC \
? TARGET_LLSC && !TARGET_MIPS16 \