summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/uaccess.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-01 17:57:09 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-01 17:57:09 +0000
commita62a0f262e0179df8c632f529c95abf54ef78332 (patch)
tree80e6a7a7d407d08e218332bb3fcccdaf9f28fcc1 /include/asm-mips/uaccess.h
parentfd095d09f2d475dc2e8599b1b8bae1cd65e91685 (diff)
Part #2 merging back my changes ...
Diffstat (limited to 'include/asm-mips/uaccess.h')
-rw-r--r--include/asm-mips/uaccess.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index 608d86834..97181113a 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -7,7 +7,7 @@
*
* Copyright (C) 1996, 1997 by Ralf Baechle
*
- * $Id: uaccess.h,v 1.2 1997/06/25 20:18:19 ralf Exp $
+ * $Id: uaccess.h,v 1.5 1997/12/01 16:44:08 ralf Exp $
*/
#ifndef __ASM_MIPS_UACCESS_H
#define __ASM_MIPS_UACCESS_H
@@ -321,23 +321,23 @@ if (copy_from_user(to,from,n)) \
void *__cu_end; \
__asm__ __volatile__( \
".set\tnoreorder\n\t" \
- "1:\tsb\t$0,(%0)\n\t" \
+ "1:\taddiu\t%0,1\n" \
"bne\t%0,%1,1b\n\t" \
- "addiu\t%0,1\n" \
+ "sb\t$0,-1(%0)\n\t" \
"2:\t.set\treorder\n\t" \
".section\t.fixup,\"ax\"\n" \
"3:\t.set\tnoat\n\t" \
- "la\t$1,2b\n\t" \
- "jr\t$1\n\t" \
+ "subu\t%0,1\n\t" \
+ "j\t2b\n\t" \
".set\tat\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
STR(PTR)"\t1b,3b\n\t" \
".previous" \
:"=r" (addr), "=r" (__cu_end) \
- :"0" (addr), "1" (addr + size - 1), "i" (-EFAULT) \
+ :"0" (addr), "1" (addr + size), "i" (-EFAULT) \
:"$1","memory"); \
- size = __cu_end - (addr) - 1; \
+ size = __cu_end - (addr); \
})
#define clear_user(addr,n) ({ \