diff options
Diffstat (limited to 'utils/hwstub/stub/asm/arm/atomic_rw.S')
-rw-r--r-- | utils/hwstub/stub/asm/arm/atomic_rw.S | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/utils/hwstub/stub/asm/arm/atomic_rw.S b/utils/hwstub/stub/asm/arm/atomic_rw.S new file mode 100644 index 0000000000..cb6272b4dc --- /dev/null +++ b/utils/hwstub/stub/asm/arm/atomic_rw.S | |||
@@ -0,0 +1,58 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2014 by Marcin Bukat | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License | ||
13 | * as published by the Free Software Foundation; either version 2 | ||
14 | * of the License, or (at your option) any later version. | ||
15 | * | ||
16 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
17 | * KIND, either express or implied. | ||
18 | * | ||
19 | ****************************************************************************/ | ||
20 | |||
21 | .section .text, "ax", %progbits | ||
22 | .global target_read8 | ||
23 | .type target_read8, %function | ||
24 | .global target_read16 | ||
25 | .type target_read16, %function | ||
26 | .global target_read32 | ||
27 | .type target_read32, %function | ||
28 | .global target_write8 | ||
29 | .type target_write8, %function | ||
30 | .global target_write16 | ||
31 | .type target_write16, %function | ||
32 | .global target_write32 | ||
33 | .type target_write32, %function | ||
34 | |||
35 | target_read8: | ||
36 | ldrb r0, [r0] | ||
37 | bx lr | ||
38 | |||
39 | target_read16: | ||
40 | ldrh r0, [r0] | ||
41 | bx lr | ||
42 | |||
43 | target_read32: | ||
44 | ldr r0, [r0] | ||
45 | bx lr | ||
46 | |||
47 | target_write8: | ||
48 | strb r1, [r0] | ||
49 | bx lr | ||
50 | |||
51 | target_write16: | ||
52 | strh r1, [r0] | ||
53 | bx lr | ||
54 | |||
55 | target_write32: | ||
56 | str r1, [r0] | ||
57 | bx lr | ||
58 | |||