OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [arm/] [lib/] [io-readsl-armv3.S] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 *  linux/arch/arm/lib/io-readsl-armv3.S
3
 *
4
 *  Copyright (C) 1995-2000 Russell King
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License version 2 as
8
 * published by the Free Software Foundation.
9
 */
10
#include 
11
#include 
12
#include 
13
 
14
/*
15
 * Note that some reads can be aligned on half-word boundaries.
16
 */
17
ENTRY(__raw_readsl)
18
                teq     r2, #0          @ do we have to check for the zero len?
19
                moveq   pc, lr
20
                ands    ip, r1, #3
21
                bne     2f
22
 
23
1:              ldr     r3, [r0]
24
                str     r3, [r1], #4
25
                subs    r2, r2, #1
26
                bne     1b
27
                mov     pc, lr
28
 
29
2:              cmp     ip, #2
30
                ldr     ip, [r0]
31
                blt     4f
32
                bgt     6f
33
 
34
                strb    ip, [r1], #1
35
                mov     ip, ip, lsr #8
36
                strb    ip, [r1], #1
37
                mov     ip, ip, lsr #8
38
3:              subs    r2, r2, #1
39
                ldrne   r3, [r0]
40
                orrne   ip, ip, r3, lsl #16
41
                strne   ip, [r1], #4
42
                movne   ip, r3, lsr #16
43
                bne     3b
44
                strb    ip, [r1], #1
45
                mov     ip, ip, lsr #8
46
                strb    ip, [r1], #1
47
                mov     pc, lr
48
 
49
4:              strb    ip, [r1], #1
50
                mov     ip, ip, lsr #8
51
                strb    ip, [r1], #1
52
                mov     ip, ip, lsr #8
53
                strb    ip, [r1], #1
54
                mov     ip, ip, lsr #8
55
5:              subs    r2, r2, #1
56
                ldrne   r3, [r0]
57
                orrne   ip, ip, r3, lsl #8
58
                strne   ip, [r1], #4
59
                movne   ip, r3, lsr #24
60
                bne     5b
61
                strb    ip, [r1], #1
62
                mov     pc, lr
63
 
64
6:              strb    ip, [r1], #1
65
                mov     ip, ip, lsr #8
66
7:              subs    r2, r2, #1
67
                ldrne   r3, [r0]
68
                orrne   ip, ip, r3, lsl #24
69
                strne   ip, [r1], #4
70
                movne   ip, r3, lsr #8
71
                bne     7b
72
                strb    ip, [r1], #1
73
                mov     ip, ip, lsr #8
74
                strb    ip, [r1], #1
75
                mov     ip, ip, lsr #8
76
                strb    ip, [r1], #1
77
                mov     pc, lr
78
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.