source: mainline/kernel/arch/arm32/src/asm.S@ 9ce35f0

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 9ce35f0 was a35b458, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 7 years ago

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 * Copyright (c) 2007 Michal Kebrt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <abi/asmtool.h>
30
31.text
32
33FUNCTION_BEGIN(memcpy_from_uspace)
34FUNCTION_BEGIN(memcpy_to_uspace)
35 add r3, r1, #3
36 bic r3, r3, #3
37 cmp r1, r3
38 stmdb sp!, {r4, r5, lr}
39 mov r5, r0 /* save dst */
40 beq 4f
41
42 1:
43 cmp r2, #0
44 movne ip, #0
45 beq 3f
46
47 2:
48 ldrb r3, [ip, r1]
49 strb r3, [ip, r0]
50 add ip, ip, #1
51 cmp ip, r2
52 bne 2b
53
54 3:
55 mov r0, r5
56 ldmia sp!, {r4, r5, pc}
57
58 4:
59 add r3, r0, #3
60 bic r3, r3, #3
61 cmp r0, r3
62 bne 1b
63 movs r4, r2, lsr #2
64 moveq lr, r4
65 beq 6f
66 mov lr, #0
67 mov ip, lr
68
69 5:
70 ldr r3, [ip, r1]
71 add lr, lr, #1
72 cmp lr, r4
73 str r3, [ip, r0]
74 add ip, ip, #4
75 bne 5b
76
77 6:
78 ands r4, r2, #3
79 beq 3b
80 mov r3, lr, lsl #2
81 add r0, r3, r0
82 add ip, r3, r1
83 mov r2, #0
84
85 7:
86 ldrb r3, [r2, ip]
87 strb r3, [r2, r0]
88 add r2, r2, #1
89 cmp r2, r4
90 bne 7b
91 b 3b
92FUNCTION_END(memcpy_from_uspace)
93FUNCTION_END(memcpy_to_uspace)
94
95SYMBOL(memcpy_from_uspace_failover_address)
96SYMBOL(memcpy_to_uspace_failover_address)
97 mov r0, #0
98 ldmia sp!, {r4, r5, pc}
99
100FUNCTION_BEGIN(early_putchar)
101 mov pc, lr
102FUNCTION_END(early_putchar)
Note: See TracBrowser for help on using the repository browser.