RTEMS  5.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
access.h
1 /*
2  * access.h - access routines for SPARC. SPARC is big endian only.
3  *
4  * COPYRIGHT (c) 2011
5  * Aeroflex Gaisler.
6  *
7  * The license and distribution terms for this file may be
8  * found in the file LICENSE in this distribution or at
9  * http://www.rtems.org/license/LICENSE.
10  */
11 
12 #ifndef _LIBCPU_ACCESS_H
13 #define _LIBCPU_ACCESS_H
14 
15 #include <rtems/score/cpu.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /* "Raw" access */
22 extern uint8_t _ld8(uint8_t *addr);
23 extern void _st8(uint8_t *addr, uint8_t val);
24 extern uint16_t _ld16(uint16_t *addr);
25 extern void _st16(uint16_t *addr, uint16_t val);
26 extern uint32_t _ld32(uint32_t *addr);
27 extern void _st32(uint32_t *addr, uint32_t val);
28 extern uint64_t _ld64(uint64_t *addr);
29 extern void _st64(uint64_t *addr, uint64_t val);
30 
31 /* Aliases for Big Endian */
32 extern uint16_t _ld_be16(uint16_t *addr);
33 extern void _st_be16(uint16_t *addr, uint16_t val);
34 extern uint32_t _ld_be32(uint32_t *addr);
35 extern void _st_be32(uint32_t *addr, uint32_t val);
36 extern uint64_t _ld_be64(uint64_t *addr);
37 extern void _st_be64(uint64_t *addr, uint64_t val);
38 
39 /* Little endian */
40 extern uint16_t _ld_le16(uint16_t *addr);
41 extern void _st_le16(uint16_t *addr, uint16_t val);
42 extern uint32_t _ld_le32(uint32_t *addr);
43 extern void _st_le32(uint32_t *addr, uint32_t val);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif