5
Last change
on this file since 1549beb was
8639685,
checked in by Jacob Hansen <jacob.hansen@…>, on 10/28/16 at 14:05:56
|
sparc: Adjust assembly to improve compability with LLVM
- All references of %0 changed to %g0
- 'call label,0' changed to 'call label'. According to the sparc
specification call does not take any registers
- '.seg "text"' changed to '.section ".text"'
- the synonym stub is replaced with stb
- the synonym stuh is replaced with sth
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Rev | Line | |
---|
[80d01b3c] | 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 |
---|
[c499856] | 21 | * http://www.rtems.org/license/LICENSE. |
---|
[80d01b3c] | 22 | */ |
---|
| 23 | |
---|
| 24 | #include <rtems/asm.h> |
---|
| 25 | |
---|
| 26 | .align 4 |
---|
[8639685] | 27 | .section ".text" |
---|
[80d01b3c] | 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 | SYM(_st8): |
---|
| 63 | retl |
---|
[8639685] | 64 | stb %o1, [%o0] |
---|
[80d01b3c] | 65 | |
---|
| 66 | SYM(_st_be16): |
---|
| 67 | SYM(_st16): |
---|
| 68 | retl |
---|
[8639685] | 69 | sth %o1, [%o0] |
---|
[80d01b3c] | 70 | |
---|
| 71 | SYM(_st_be32): |
---|
| 72 | SYM(_st32): |
---|
| 73 | retl |
---|
| 74 | st %o1, [%o0] |
---|
| 75 | |
---|
| 76 | SYM(_st_be64): |
---|
| 77 | SYM(_st64): |
---|
| 78 | mov %o2, %o3 |
---|
| 79 | mov %o1, %o2 |
---|
| 80 | retl |
---|
| 81 | std %o2, [%o0] |
---|
Note: See
TracBrowser
for help on using the repository browser.