Commit 0b6583d7 authored by Russell King's avatar Russell King

[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.
parent 015498d5
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
.global __put_user_1 .global __put_user_1
__put_user_1: __put_user_1:
bic r2, sp, #0x1f00 bic ip, sp, #0x1f00
bic r2, r2, #0x00ff bic ip, ip, #0x00ff
ldr r2, [r2, #TI_ADDR_LIMIT] ldr ip, [ip, #TI_ADDR_LIMIT]
sub r2, r2, #1 sub ip, ip, #1
cmp r0, r2 cmp r0, ip
1: strlsbt r1, [r0] 1: strlsbt r1, [r0]
movls r0, #0 movls r0, #0
movls pc, lr movls pc, lr
...@@ -43,17 +43,17 @@ __put_user_1: ...@@ -43,17 +43,17 @@ __put_user_1:
.global __put_user_2 .global __put_user_2
__put_user_2: __put_user_2:
bic r2, sp, #0x1f00 bic ip, sp, #0x1f00
bic r2, r2, #0x00ff bic ip, ip, #0x00ff
ldr r2, [r2, #TI_ADDR_LIMIT] ldr ip, [ip, #TI_ADDR_LIMIT]
sub r2, r2, #2 sub ip, ip, #2
cmp r0, r2 cmp r0, ip
movls r2, r1, lsr #8 movls ip, r1, lsr #8
#ifndef __ARMEB__ #ifndef __ARMEB__
2: strlsbt r1, [r0], #1 2: strlsbt r1, [r0], #1
3: strlsbt r2, [r0] 3: strlsbt ip, [r0]
#else #else
2: strlsbt r2, [r0], #1 2: strlsbt ip, [r0], #1
3: strlsbt r1, [r0] 3: strlsbt r1, [r0]
#endif #endif
movls r0, #0 movls r0, #0
...@@ -62,11 +62,11 @@ __put_user_2: ...@@ -62,11 +62,11 @@ __put_user_2:
.global __put_user_4 .global __put_user_4
__put_user_4: __put_user_4:
bic r2, sp, #0x1f00 bic ip, sp, #0x1f00
bic r2, r2, #0x00ff bic ip, ip, #0x00ff
ldr r2, [r2, #TI_ADDR_LIMIT] ldr ip, [ip, #TI_ADDR_LIMIT]
sub r2, r2, #4 sub ip, ip, #4
cmp r0, r2 cmp r0, ip
4: strlst r1, [r0] 4: strlst r1, [r0]
movls r0, #0 movls r0, #0
movls pc, lr movls pc, lr
......
...@@ -144,13 +144,13 @@ extern int __put_user_bad(void); ...@@ -144,13 +144,13 @@ extern int __put_user_bad(void);
register int __e asm("r0"); \ register int __e asm("r0"); \
switch (sizeof(*(__p))) { \ switch (sizeof(*(__p))) { \
case 1: \ case 1: \
__put_user_x(__r1, __p, __e, 1, "r2", "lr"); \ __put_user_x(__r1, __p, __e, 1, "ip", "lr"); \
break; \ break; \
case 2: \ case 2: \
__put_user_x(__r1, __p, __e, 2, "r2", "lr"); \ __put_user_x(__r1, __p, __e, 2, "ip", "lr"); \
break; \ break; \
case 4: \ case 4: \
__put_user_x(__r1, __p, __e, 4, "r2", "lr"); \ __put_user_x(__r1, __p, __e, 4, "ip", "lr"); \
break; \ break; \
case 8: \ case 8: \
__put_user_x(__r1, __p, __e, 8, "ip", "lr"); \ __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment