Last change
on this file since 9165349d was
242887bc,
checked in by Sebastian Huber <sebastian.huber@…>, on 09/13/18 at 04:19:05
|
Rename files to make them unique within cpukit
This allows to build librtemscpu.a in one rush in the future.
|
-
Property mode set to
100644
|
File size:
1.8 KB
|
Line | |
---|
1 | /* |
---|
2 | * Optimized access routines for SPARC. |
---|
3 | * |
---|
4 | * Note the difference between byteorder.h (inlined functions) and access.S |
---|
5 | * where the functions will be declared in the library archive librtemscpu.a. |
---|
6 | * Function names starting with _ are in library and can be referenced by |
---|
7 | * function pointers. |
---|
8 | * |
---|
9 | * _ldN, _stN standard machine endianess access (SPARC: big-endian) |
---|
10 | * _ld_beN, _st_beN forced big-endian |
---|
11 | * _ld_leN, _st_leN forced little-endian (defined in access_le.C) |
---|
12 | * |
---|
13 | * This file is written in assembly because the big-endian functions maps to |
---|
14 | * machine dependant access methods, i.e. same function has two names. |
---|
15 | * |
---|
16 | * COPYRIGHT (c) 2011 |
---|
17 | * Aeroflex Gaisler. |
---|
18 | * |
---|
19 | * The license and distribution terms for this file may be |
---|
20 | * found in the file LICENSE in this distribution or at |
---|
21 | * http://www.rtems.org/license/LICENSE. |
---|
22 | */ |
---|
23 | |
---|
24 | #include <rtems/asm.h> |
---|
25 | |
---|
26 | .align 4 |
---|
27 | .section ".text" |
---|
28 | PUBLIC(_ld8) |
---|
29 | PUBLIC(_ld16) |
---|
30 | PUBLIC(_ld32) |
---|
31 | PUBLIC(_ld64) |
---|
32 | PUBLIC(_st8) |
---|
33 | PUBLIC(_st16) |
---|
34 | PUBLIC(_st32) |
---|
35 | PUBLIC(_st64) |
---|
36 | PUBLIC(_ld_be16) |
---|
37 | PUBLIC(_ld_be32) |
---|
38 | PUBLIC(_ld_be64) |
---|
39 | PUBLIC(_st_be16) |
---|
40 | PUBLIC(_st_be32) |
---|
41 | PUBLIC(_st_be64) |
---|
42 | |
---|
43 | SYM(_ld8): |
---|
44 | retl |
---|
45 | ldub [%o0], %o0 |
---|
46 | |
---|
47 | SYM(_ld_be16): |
---|
48 | SYM(_ld16): |
---|
49 | retl |
---|
50 | lduh [%o0], %o0 |
---|
51 | |
---|
52 | SYM(_ld_be32): |
---|
53 | SYM(_ld32): |
---|
54 | retl |
---|
55 | ld [%o0], %o0 |
---|
56 | |
---|
57 | SYM(_ld_be64): |
---|
58 | SYM(_ld64): |
---|
59 | retl |
---|
60 | ldd [%o0], %o0 |
---|
61 | |
---|
62 | #if defined(__FIX_LEON3FT_B2BST) |
---|
63 | |
---|
64 | SYM(_st8): |
---|
65 | stub %o1, [%o0] |
---|
66 | retl |
---|
67 | nop |
---|
68 | |
---|
69 | SYM(_st_be16): |
---|
70 | SYM(_st16): |
---|
71 | stuh %o1, [%o0] |
---|
72 | retl |
---|
73 | nop |
---|
74 | |
---|
75 | SYM(_st_be32): |
---|
76 | SYM(_st32): |
---|
77 | st %o1, [%o0] |
---|
78 | retl |
---|
79 | nop |
---|
80 | |
---|
81 | SYM(_st_be64): |
---|
82 | SYM(_st64): |
---|
83 | std %o1, [%o0] |
---|
84 | retl |
---|
85 | nop |
---|
86 | |
---|
87 | #else |
---|
88 | |
---|
89 | SYM(_st8): |
---|
90 | retl |
---|
91 | stb %o1, [%o0] |
---|
92 | |
---|
93 | SYM(_st_be16): |
---|
94 | SYM(_st16): |
---|
95 | retl |
---|
96 | sth %o1, [%o0] |
---|
97 | |
---|
98 | SYM(_st_be32): |
---|
99 | SYM(_st32): |
---|
100 | retl |
---|
101 | st %o1, [%o0] |
---|
102 | |
---|
103 | SYM(_st_be64): |
---|
104 | SYM(_st64): |
---|
105 | mov %o2, %o3 |
---|
106 | mov %o1, %o2 |
---|
107 | retl |
---|
108 | std %o2, [%o0] |
---|
109 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.