source: rtems/cpukit/score/cpu/arm/include/rtems/score/arm.h @ 9955487d

Last change on this file since 9955487d was 9955487d, checked in by Sebastian Huber <sebastian.huber@…>, on 12/07/20 at 13:15:10

arm: Support Armv8 in <rtems/score/arm.h>

Update #4202.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSScoreCPUARM
5 *
6 * @brief This header file provides defines derived from ARM multilib defines.
7 */
8
9/*
10 *  COPYRIGHT (c) 2000 Canon Research Centre France SA.
11 *  Emmanuel Raguet, mailto:raguet@crf.canon.fr
12 *
13 *  Copyright (c) 2002 Advent Networks, Inc.
14 *       Jay Monkman <jmonkman@adventnetworks.com>
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 *
20 */
21
22#ifndef _RTEMS_SCORE_ARM_H
23#define _RTEMS_SCORE_ARM_H
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29/**
30 * @addtogroup RTEMSScoreCPUARM
31 *
32 * @{
33 */
34
35#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
36  #define CPU_MODEL_NAME "ARMv7M"
37  #define ARM_MULTILIB_ARCH_V7M
38#elif defined(__ARM_ARCH_6M__)
39  #define CPU_MODEL_NAME "ARMv6M"
40  #define ARM_MULTILIB_ARCH_V6M
41#else
42  #define CPU_MODEL_NAME "ARMv4"
43  #define ARM_MULTILIB_ARCH_V4
44#endif
45
46#if __ARM_ARCH >= 7
47  #define ARM_MULTILIB_HAS_WFI
48  #define ARM_MULTILIB_HAS_LOAD_STORE_EXCLUSIVE
49  #define ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
50#endif
51
52#ifndef ARM_DISABLE_THREAD_ID_REGISTER_USE
53  #if defined(__ARM_ARCH_7A__) \
54    || defined(__ARM_ARCH_7R__) \
55    || __ARM_ARCH >= 8
56    #define ARM_MULTILIB_HAS_THREAD_ID_REGISTER
57  #endif
58#endif
59
60#if defined(__ARM_ARCH_7A__) || __ARM_ARCH >= 8
61  #define ARM_MULTILIB_CACHE_LINE_MAX_64
62#endif
63
64#if __ARM_ARCH >= 7
65  #define ARM_MULTILIB_HAS_CPACR
66#endif
67
68#if !defined(__SOFTFP__)
69  #if defined(__ARM_NEON__)
70    #define ARM_MULTILIB_VFP_D32
71  #elif defined(__VFP_FP__)
72    #define ARM_MULTILIB_VFP_D16
73  #else
74    #error "FPU support not implemented"
75  #endif
76#endif
77
78#if defined(ARM_MULTILIB_VFP_D16) \
79  || defined(ARM_MULTILIB_VFP_D32)
80  #define ARM_MULTILIB_VFP
81#endif
82
83/*
84 *  Define the name of the CPU family.
85 */
86
87#define CPU_NAME "ARM"
88
89/** @} */
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* _RTEMS_SCORE_ARM_H */
Note: See TracBrowser for help on using the repository browser.