aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysdeps/mips/machine-gmon.h9
-rw-r--r--sysdeps/mips/sys/asm.h11
2 files changed, 16 insertions, 4 deletions
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index aac1723..f5d1c64 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -83,8 +83,13 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
#endif
#if _MIPS_SIM == _ABIN32
-# define PTR_ADDU_STRING "add" /* no u */
-# define PTR_SUBU_STRING "sub" /* no u */
+# if __mips_isa_rev < 6
+# define PTR_ADDU_STRING "add" /* no u */
+# define PTR_SUBU_STRING "sub" /* no u */
+# else
+# define PTR_ADDU_STRING "addu"
+# define PTR_SUBU_STRING "subu"
+# endif
#elif _MIPS_SIM == _ABI64
# define PTR_ADDU_STRING "daddu"
# define PTR_SUBU_STRING "dsubu"
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index e479e9b..a618d49 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -416,12 +416,19 @@ symbol = value
#if _MIPS_SIM == _ABIN32
# define PTR_ADD add
# define PTR_ADDI addi
-# define PTR_ADDU add /* no u */
-# define PTR_ADDIU addi /* no u */
# define PTR_SUB sub
# define PTR_SUBI subi
+#if __mips_isa_rev < 6
+# define PTR_ADDU add /* no u */
+# define PTR_ADDIU addi /* no u */
# define PTR_SUBU sub /* no u */
# define PTR_SUBIU sub /* no u */
+#else
+# define PTR_ADDU addu
+# define PTR_ADDIU addiu
+# define PTR_SUBU subu
+# define PTR_SUBIU subu
+#endif
# define PTR_L lw
# define PTR_LA la
# define PTR_S sw