Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
{
switch (len) {
case 4:
+ {
unsigned int old_val;
__asm__ __volatile__(
: "=&r"(old_val), "=m" (*addr)
: "r"(val), "m" (*addr)
: "memory", "cc");
+ }
#if (BITS_PER_LONG == 64)
case 8:
+ {
unsigned long old_val;
__asm__ __volatile__(
: "=&r"(old_val), "=m" (*addr)
: "r"(val), "m" (*addr)
: "memory", "cc");
+ }
#endif
default:
__asm__ __volatile__(".long 0xd00d00");
{
switch (len) {
case 4:
+ {
unsigned int old_val = (unsigned int)old;
__asm__ __volatile__(
: "r"(new)
: "memory", "cc");
return old_val;
+ }
#if (BITS_PER_LONG == 64)
case 8:
__asm__ __volatile__(