diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-03-18 05:42:11 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-03-18 05:44:26 -0400 |
| commit | 2c76397bddd3abcd36aca1941f47570dbc249542 (patch) | |
| tree | 2bfc4936a4bb15811effbbffd8497c144c738fbb | |
| parent | 0d2eb44f631d9d0a826efa3156f157477fdaecf4 (diff) | |
x86: Clean up csum-copy_64.S a bit
The many stray whitespaces and other uncleanlinesses made this code
almost unreadable to me - so fix those.
No changes to the code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
| -rw-r--r-- | arch/x86/lib/csum-copy_64.S | 240 |
1 files changed, 120 insertions, 120 deletions
diff --git a/arch/x86/lib/csum-copy_64.S b/arch/x86/lib/csum-copy_64.S index ebf753e48ba9..fb903b758da8 100644 --- a/arch/x86/lib/csum-copy_64.S +++ b/arch/x86/lib/csum-copy_64.S | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright 2002,2003 Andi Kleen, SuSE Labs. | 2 | * Copyright 2002, 2003 Andi Kleen, SuSE Labs. |
| 3 | * | 3 | * |
| 4 | * This file is subject to the terms and conditions of the GNU General Public | 4 | * This file is subject to the terms and conditions of the GNU General Public |
| 5 | * License. See the file COPYING in the main directory of this archive | 5 | * License. See the file COPYING in the main directory of this archive |
| 6 | * for more details. No warranty for anything given at all. | 6 | * for more details. No warranty for anything given at all. |
| @@ -11,82 +11,82 @@ | |||
| 11 | 11 | ||
| 12 | /* | 12 | /* |
| 13 | * Checksum copy with exception handling. | 13 | * Checksum copy with exception handling. |
| 14 | * On exceptions src_err_ptr or dst_err_ptr is set to -EFAULT and the | 14 | * On exceptions src_err_ptr or dst_err_ptr is set to -EFAULT and the |
| 15 | * destination is zeroed. | 15 | * destination is zeroed. |
| 16 | * | 16 | * |
| 17 | * Input | 17 | * Input |
| 18 | * rdi source | 18 | * rdi source |
| 19 | * rsi destination | 19 | * rsi destination |
| 20 | * edx len (32bit) | 20 | * edx len (32bit) |
| 21 | * ecx sum (32bit) | 21 | * ecx sum (32bit) |
| 22 | * r8 src_err_ptr (int) | 22 | * r8 src_err_ptr (int) |
| 23 | * r9 dst_err_ptr (int) | 23 | * r9 dst_err_ptr (int) |
| 24 | * | 24 | * |
| 25 | * Output | 25 | * Output |
| 26 | * eax 64bit sum. undefined in case of exception. | 26 | * eax 64bit sum. undefined in case of exception. |
| 27 | * | 27 | * |
| 28 | * Wrappers need to take care of valid exception sum and zeroing. | 28 | * Wrappers need to take care of valid exception sum and zeroing. |
| 29 | * They also should align source or destination to 8 bytes. | 29 | * They also should align source or destination to 8 bytes. |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | .macro source | 32 | .macro source |
| 33 | 10: | 33 | 10: |
| 34 | .section __ex_table,"a" | 34 | .section __ex_table, "a" |
| 35 | .align 8 | 35 | .align 8 |
| 36 | .quad 10b,.Lbad_source | 36 | .quad 10b, .Lbad_source |
| 37 | .previous | 37 | .previous |
| 38 | .endm | 38 | .endm |
| 39 | 39 | ||
| 40 | .macro dest | 40 | .macro dest |
| 41 | 20: | 41 | 20: |
| 42 | .section __ex_table,"a" | 42 | .section __ex_table, "a" |
| 43 | .align 8 | 43 | .align 8 |
| 44 | .quad 20b,.Lbad_dest | 44 | .quad 20b, .Lbad_dest |
| 45 | .previous | 45 | .previous |
| 46 | .endm | 46 | .endm |
| 47 | 47 | ||
| 48 | .macro ignore L=.Lignore | 48 | .macro ignore L=.Lignore |
| 49 | 30: | 49 | 30: |
| 50 | .section __ex_table,"a" | 50 | .section __ex_table, "a" |
| 51 | .align 8 | 51 | .align 8 |
| 52 | .quad 30b,\L | 52 | .quad 30b, \L |
| 53 | .previous | 53 | .previous |
| 54 | .endm | 54 | .endm |
| 55 | 55 | ||
| 56 | 56 | ||
| 57 | ENTRY(csum_partial_copy_generic) | 57 | ENTRY(csum_partial_copy_generic) |
| 58 | CFI_STARTPROC | 58 | CFI_STARTPROC |
| 59 | cmpl $3*64,%edx | 59 | cmpl $3*64, %edx |
| 60 | jle .Lignore | 60 | jle .Lignore |
| 61 | 61 | ||
| 62 | .Lignore: | 62 | .Lignore: |
| 63 | subq $7*8,%rsp | 63 | subq $7*8, %rsp |
| 64 | CFI_ADJUST_CFA_OFFSET 7*8 | 64 | CFI_ADJUST_CFA_OFFSET 7*8 |
| 65 | movq %rbx,2*8(%rsp) | 65 | movq %rbx, 2*8(%rsp) |
| 66 | CFI_REL_OFFSET rbx, 2*8 | 66 | CFI_REL_OFFSET rbx, 2*8 |
| 67 | movq %r12,3*8(%rsp) | 67 | movq %r12, 3*8(%rsp) |
| 68 | CFI_REL_OFFSET r12, 3*8 | 68 | CFI_REL_OFFSET r12, 3*8 |
| 69 | movq %r14,4*8(%rsp) | 69 | movq %r14, 4*8(%rsp) |
| 70 | CFI_REL_OFFSET r14, 4*8 | 70 | CFI_REL_OFFSET r14, 4*8 |
| 71 | movq %r13,5*8(%rsp) | 71 | movq %r13, 5*8(%rsp) |
| 72 | CFI_REL_OFFSET r13, 5*8 | 72 | CFI_REL_OFFSET r13, 5*8 |
| 73 | movq %rbp,6*8(%rsp) | 73 | movq %rbp, 6*8(%rsp) |
| 74 | CFI_REL_OFFSET rbp, 6*8 | 74 | CFI_REL_OFFSET rbp, 6*8 |
| 75 | 75 | ||
| 76 | movq %r8,(%rsp) | 76 | movq %r8, (%rsp) |
| 77 | movq %r9,1*8(%rsp) | 77 | movq %r9, 1*8(%rsp) |
| 78 | |||
| 79 | movl %ecx,%eax | ||
| 80 | movl %edx,%ecx | ||
| 81 | 78 | ||
| 82 | xorl %r9d,%r9d | 79 | movl %ecx, %eax |
| 83 | movq %rcx,%r12 | 80 | movl %edx, %ecx |
| 84 | 81 | ||
| 85 | shrq $6,%r12 | 82 | xorl %r9d, %r9d |
| 86 | jz .Lhandle_tail /* < 64 */ | 83 | movq %rcx, %r12 |
| 84 | |||
| 85 | shrq $6, %r12 | ||
| 86 | jz .Lhandle_tail /* < 64 */ | ||
| 87 | 87 | ||
| 88 | clc | 88 | clc |
| 89 | 89 | ||
| 90 | /* main loop. clear in 64 byte blocks */ | 90 | /* main loop. clear in 64 byte blocks */ |
| 91 | /* r9: zero, r8: temp2, rbx: temp1, rax: sum, rcx: saved length */ | 91 | /* r9: zero, r8: temp2, rbx: temp1, rax: sum, rcx: saved length */ |
| 92 | /* r11: temp3, rdx: temp4, r12 loopcnt */ | 92 | /* r11: temp3, rdx: temp4, r12 loopcnt */ |
| @@ -94,156 +94,156 @@ ENTRY(csum_partial_copy_generic) | |||
| 94 | .p2align 4 | 94 | .p2align 4 |
| 95 | .Lloop: | 95 | .Lloop: |
| 96 | source | 96 | source |
| 97 | movq (%rdi),%rbx | 97 | movq (%rdi), %rbx |
| 98 | source | 98 | source |
| 99 | movq 8(%rdi),%r8 | 99 | movq 8(%rdi), %r8 |
| 100 | source | 100 | source |
| 101 | movq 16(%rdi),%r11 | 101 | movq 16(%rdi), %r11 |
| 102 | source | 102 | source |
| 103 | movq 24(%rdi),%rdx | 103 | movq 24(%rdi), %rdx |
| 104 | 104 | ||
| 105 | source | 105 | source |
| 106 | movq 32(%rdi),%r10 | 106 | movq 32(%rdi), %r10 |
| 107 | source | 107 | source |
| 108 | movq 40(%rdi),%rbp | 108 | movq 40(%rdi), %rbp |
| 109 | source | 109 | source |
| 110 | movq 48(%rdi),%r14 | 110 | movq 48(%rdi), %r14 |
| 111 | source | 111 | source |
| 112 | movq 56(%rdi),%r13 | 112 | movq 56(%rdi), %r13 |
| 113 | 113 | ||
| 114 | ignore 2f | 114 | ignore 2f |
| 115 | prefetcht0 5*64(%rdi) | 115 | prefetcht0 5*64(%rdi) |
| 116 | 2: | 116 | 2: |
| 117 | adcq %rbx,%rax | 117 | adcq %rbx, %rax |
| 118 | adcq %r8,%rax | 118 | adcq %r8, %rax |
| 119 | adcq %r11,%rax | 119 | adcq %r11, %rax |
| 120 | adcq %rdx,%rax | 120 | adcq %rdx, %rax |
| 121 | adcq %r10,%rax | 121 | adcq %r10, %rax |
| 122 | adcq %rbp,%rax | 122 | adcq %rbp, %rax |
| 123 | adcq %r14,%rax | 123 | adcq %r14, %rax |
| 124 | adcq %r13,%rax | 124 | adcq %r13, %rax |
| 125 | 125 | ||
| 126 | decl %r12d | 126 | decl %r12d |
| 127 | 127 | ||
| 128 | dest | 128 | dest |
| 129 | movq %rbx,(%rsi) | 129 | movq %rbx, (%rsi) |
| 130 | dest | 130 | dest |
| 131 | movq %r8,8(%rsi) | ||
