[PATCH] do not use .set mips2 on mips64
Atsushi Nemoto
anemo at mba.ocn.ne.jp
Wed Jul 5 07:51:43 PDT 2006
The ".set mips2" downgrades the ISA level on mips64 (which implies at
least mips3). Do not use it if mips64.
diff -urNp uClibc-20060611/libc/sysdeps/linux/mips/bits/atomicity.h uClibc/libc/sysdeps/linux/mips/bits/atomicity.h
--- uClibc-20060611/libc/sysdeps/linux/mips/bits/atomicity.h 2006-06-11 16:11:24.000000000 +0900
+++ uClibc/libc/sysdeps/linux/mips/bits/atomicity.h 2006-07-05 22:04:44.000000000 +0900
@@ -32,7 +32,9 @@ exchange_and_add (volatile uint32_t *mem
("/* Inline exchange & add */\n"
"1:\n\t"
".set push\n\t"
+#ifndef __mips64
".set mips2\n\t"
+#endif
"ll %0,%3\n\t"
"addu %1,%4,%0\n\t"
"sc %1,%2\n\t"
@@ -56,7 +58,9 @@ atomic_add (volatile uint32_t *mem, int
("/* Inline atomic add */\n"
"1:\n\t"
".set push\n\t"
+#ifndef __mips64
".set mips2\n\t"
+#endif
"ll %0,%2\n\t"
"addu %0,%3,%0\n\t"
"sc %0,%1\n\t"
@@ -78,7 +82,9 @@ compare_and_swap (volatile long int *p,
("/* Inline compare & swap */\n"
"1:\n\t"
".set push\n\t"
+#ifndef __mips64
".set mips2\n\t"
+#endif
"ll %1,%5\n\t"
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
More information about the uClibc
mailing list