diff options
Diffstat (limited to 'arch/ia64/lib/memcpy_mck.S')
-rw-r--r-- | arch/ia64/lib/memcpy_mck.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ia64/lib/memcpy_mck.S b/arch/ia64/lib/memcpy_mck.S index 46c9331e7ab5..9e534d52b1d5 100644 --- a/arch/ia64/lib/memcpy_mck.S +++ b/arch/ia64/lib/memcpy_mck.S | |||
@@ -6,7 +6,9 @@ | |||
6 | * in1: source address | 6 | * in1: source address |
7 | * in2: number of bytes to copy | 7 | * in2: number of bytes to copy |
8 | * Output: | 8 | * Output: |
9 | * 0 if success, or number of byte NOT copied if error occurred. | 9 | * for memcpy: return dest |
10 | * for copy_user: return 0 if success, | ||
11 | * or number of byte NOT copied if error occurred. | ||
10 | * | 12 | * |
11 | * Copyright (C) 2002 Intel Corp. | 13 | * Copyright (C) 2002 Intel Corp. |
12 | * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com> | 14 | * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com> |
@@ -73,6 +75,7 @@ GLOBAL_ENTRY(memcpy) | |||
73 | and r28=0x7,in0 | 75 | and r28=0x7,in0 |
74 | and r29=0x7,in1 | 76 | and r29=0x7,in1 |
75 | mov f6=f0 | 77 | mov f6=f0 |
78 | mov retval=in0 | ||
76 | br.cond.sptk .common_code | 79 | br.cond.sptk .common_code |
77 | ;; | 80 | ;; |
78 | END(memcpy) | 81 | END(memcpy) |
@@ -84,7 +87,7 @@ GLOBAL_ENTRY(__copy_user) | |||
84 | mov f6=f1 | 87 | mov f6=f1 |
85 | mov saved_in0=in0 // save dest pointer | 88 | mov saved_in0=in0 // save dest pointer |
86 | mov saved_in1=in1 // save src pointer | 89 | mov saved_in1=in1 // save src pointer |
87 | mov saved_in2=in2 // save len | 90 | mov retval=r0 // initialize return value |
88 | ;; | 91 | ;; |
89 | .common_code: | 92 | .common_code: |
90 | cmp.gt p15,p0=8,in2 // check for small size | 93 | cmp.gt p15,p0=8,in2 // check for small size |
@@ -92,7 +95,7 @@ GLOBAL_ENTRY(__copy_user) | |||
92 | cmp.ne p14,p0=0,r29 // check src alignment | 95 | cmp.ne p14,p0=0,r29 // check src alignment |
93 | add src0=0,in1 | 96 | add src0=0,in1 |
94 | sub r30=8,r28 // for .align_dest | 97 | sub r30=8,r28 // for .align_dest |
95 | mov retval=r0 // initialize return value | 98 | mov saved_in2=in2 // save len |
96 | ;; | 99 | ;; |
97 | add dst0=0,in0 | 100 | add dst0=0,in0 |
98 | add dst1=1,in0 // dest odd index | 101 | add dst1=1,in0 // dest odd index |