~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to src/reference/bionic/memcmp16.S

  • Committer: Michael Hope
  • Date: 2010-08-30 23:30:25 UTC
  • Revision ID: michael.hope@linaro.org-20100830233025-2f14wknqev6ryj01
Modified the imported versions to build locally.  Added the CSL routines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 * SUCH DAMAGE.
27
27
 */
28
28
 
29
 
#include <machine/cpu-features.h>
30
 
 
31
29
    .text
32
30
 
33
31
    .global __memcmp16
45
43
 
46
44
__memcmp16:
47
45
        .fnstart
48
 
        PLD         (r0, #0)
49
 
        PLD         (r1, #0)
 
46
        PLD         [r0, #0]
 
47
        PLD         [r1, #0]
50
48
 
51
49
        /* take of the case where length is nul or the buffers are the same */
52
50
        cmp         r0, r1
68
66
        bpl         0f
69
67
 
70
68
        /* small blocks (less then 12 words) */
71
 
        PLD         (r0, #32)
72
 
        PLD         (r1, #32)
 
69
        PLD         [r0, #32]
 
70
        PLD         [r1, #32]
73
71
 
74
72
1:      ldrh        r0, [r3], #2
75
73
        ldrh        ip, [r1], #2
119
117
        bmi         1f
120
118
        
121
119
0:
122
 
        PLD         (r3, #64)
123
 
        PLD         (r1, #64)
 
120
        PLD         [r3, #64]
 
121
        PLD         [r1, #64]
124
122
        ldr         r0, [r3], #4
125
123
        ldr         lr, [r1, #4]!
126
124
        eors        r0, r0, ip
201
199
        sub         r2, r2, #8
202
200
 
203
201
6:
204
 
        PLD         (r3, #64)
205
 
        PLD         (r1, #64)
 
202
        PLD         [r3, #64]
 
203
        PLD         [r1, #64]
206
204
        mov         ip, lr, lsr #16
207
205
        ldr         lr, [r1], #4
208
206
        ldr         r0, [r3], #4