diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2003-05-28 16:18:25 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2003-05-28 16:18:25 +0100 |
| commit | 0b6583d7d7d0fbbd65053d50d2d39aca7cec4c73 (patch) | |
| tree | cd551277b1108e6ddff5a4987229f73284ba83ec | |
| parent | 015498d534572f8a9c3bf5f1dfc02bd02bfb2c9d (diff) | |
[ARM] Fix GCC3.3 build error
GCC 3.3 complains that r2 overlaps input operands when a u64 pointer
is passed into __put_user(). Fix this by using ip as a temporary
register instead.
| -rw-r--r-- | arch/arm/lib/putuser.S | 36 | ||||
| -rw-r--r-- | include/asm-arm/uaccess.h | 6 |
2 files changed, 21 insertions, 21 deletions
diff --git a/arch/arm/lib/putuser.S b/arch/arm/lib/putuser.S index 81d8c5d14435..9dc9a89cea49 100644 --- a/arch/arm/lib/putuser.S +++ b/arch/arm/lib/putuser.S @@ -31,11 +31,11 @@ .global __put_user_1 __put_user_1: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #1 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #1 + cmp r0, ip 1: strlsbt r1, [r0] movls r0, #0 movls pc, lr @@ -43,17 +43,17 @@ __put_user_1: .global __put_user_2 __put_user_2: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #2 - cmp r0, r2 - movls r2, r1, lsr #8 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #2 + cmp r0, ip + movls ip, r1, lsr #8 #ifndef __ARMEB__ 2: strlsbt r1, [r0], #1 -3: strlsbt r2, [r0] +3: strlsbt ip, [r0] #else -2: strlsbt r2, [r0], #1 +2: strlsbt ip, [r0], #1 3: strlsbt r1, [r0] #endif movls r0, #0 @@ -62,11 +62,11 @@ __put_user_2: .global __put_user_4 __put_user_4: - bic r2, sp, #0x1f00 - bic r2, r2, #0x00ff - ldr r2, [r2, #TI_ADDR_LIMIT] - sub r2, r2, #4 - cmp r0, r2 + bic ip, sp, #0x1f00 + bic ip, ip, #0x00ff + ldr ip, [ip, #TI_ADDR_LIMIT] + sub ip, ip, #4 + cmp r0, ip 4: strlst r1, [r0] movls r0, #0 movls pc, lr diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index a5281acd7fb1..23bf0cbc1c76 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h @@ -144,13 +144,13 @@ extern int __put_user_bad(void); register int __e asm("r0"); \ switch (sizeof(*(__p))) { \ case 1: \ - __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \ + __put_user_x(__r1, __p, __e, 1, "ip", "lr"); \ break; \ case 2: \ - __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \ + __put_user_x(__r1, __p, __e, 2, "ip", "lr"); \ break; \ case 4: \ - __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \ + __put_user_x(__r1, __p, __e, 4, "ip", "lr"); \ break; \ case 8: \ __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \ |
