PERFORCE change 30906 for review
Juli Mallett
jmallett at FreeBSD.org
Fri May 9 21:56:10 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30906
Change 30906 by jmallett at jmallett_dalek on 2003/05/09 21:55:24
Mark temp variables as outputs so it doesn't look like we
are getting values from them, and doing something wrong
with them uninitialised. The asm doesn't make any use of
existing values in them.
XXX, need to find a way to just get *A* temporary register
in the inline assembler. Maybe just mark $8 as clobbered
and use it?
Affected files ...
.. //depot/projects/mips/sys/mips/include/atomic.h#15 edit
Differences ...
==== //depot/projects/mips/sys/mips/include/atomic.h#15 (text+ko) ====
@@ -107,8 +107,8 @@
asmop "\n\t" \
"sc %[temp], %[p]\n\t" \
"beqz %[temp], 1b\n\t" \
- : [val] "=&r"(val), [p] "+m"(*p) \
- : [temp] "r"(temp) \
+ : [val] "=&r"(val), [temp] "=&r"(temp), [p] "+m"(*p) \
+ : \
: "memory" \
); \
}
@@ -146,8 +146,8 @@
"sc %[temp], %[p]\n\t"
"beqz %[temp], 1b\n\t"
"2:\n\t"
- : [res] "=&r"(res), [p] "+m"(*p)
- : [old] "r"(old), [val] "r"(val), [temp] "r"(temp)
+ : [res] "=&r"(res), [temp] "=&r"(temp), [p] "+m"(*p)
+ : [old] "r"(old), [val] "r"(val)
: "memory"
);
@@ -169,8 +169,8 @@
"move %[temp], $0\n\t"
"sc %[temp], %[p]\n\t"
"beqz %[temp], 1b\n\t"
- : [res] "=&r"(res), [p] "+m"(*p)
- : [temp] "r"(temp)
+ : [res] "=&r"(res), [temp] "=&r"(temp), [p] "+m"(*p)
+ :
: "memory"
);
@@ -195,8 +195,8 @@
asmop "\n\t" \
"scd %[temp], %[p]\n\t" \
"beqz %[temp], 1b\n\t" \
- : [val] "=&r"(val), [p] "+m"(*p) \
- : [temp] "r"(temp) \
+ : [val] "=&r"(val), [temp] "=&r"(temp), [p] "+m"(*p) \
+ : \
: "memory" \
); \
}
@@ -234,8 +234,8 @@
"scd %[temp], %[p]\n\t"
"beqz %[temp], 1b\n\t"
"2:\n\t"
- : [res] "=&r"(res), [p] "+m"(*p)
- : [old] "r"(old), [val] "r"(val), [temp] "r"(temp)
+ : [res] "=&r"(res), [temp] "=&r"(temp), [p] "+m"(*p)
+ : [old] "r"(old), [val] "r"(val)
: "memory"
);
@@ -257,8 +257,8 @@
"move %[temp], $0\n\t"
"scd %[temp], %[p]\n\t"
"beqz %[temp], 1b\n\t"
- : [res] "=&r"(res), [p] "+m"(*p)
- : [temp] "r"(temp)
+ : [res] "=&r"(res), [temp] "=&r"(temp), [p] "+m"(*p)
+ :
: "memory"
);
More information about the p4-projects
mailing list