mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
compiler: add __ARM_ARCH, __ARM_FEATURE_DSP macro definition in ghs
when we build mbedtls in vela with ghs compiler, the mbedtls need to access __ARM_ARCH and __ARM_FEATURE_DSP, and to construct the inline asm code based on these two macros. With ghs compiler, these two macros are not defined, and will be evaluated as 0 by default, and thus will using to wrong inline asm code, in order to handle this issue, we need to add conversion between the ghs and gcc with __ARM_ARCH, __ARM_FEATURE_DSP Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
@@ -43,6 +43,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 6
|
||||
#endif
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* If this is a kernel build,
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 7
|
||||
#endif
|
||||
|
||||
/* IRQ Stack Frame Format:
|
||||
*
|
||||
* Context is always saved/restored in the same way:
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 7
|
||||
#endif
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* If this is a kernel build, how many nested system calls should we
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 7
|
||||
#endif
|
||||
|
||||
/* IRQ Stack Frame Format:
|
||||
*
|
||||
* Context is always saved/restored in the same way:
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 8
|
||||
#endif
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* If this is a kernel build, how many nested system calls should we
|
||||
|
||||
@@ -42,6 +42,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 8
|
||||
#endif
|
||||
|
||||
/* IRQ Stack Frame Format:
|
||||
*
|
||||
* Context is always saved/restored in the same way:
|
||||
|
||||
@@ -75,6 +75,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(__ghs__) && defined(__ARM_DSP__)
|
||||
# define __ARM_FEATURE_DSP 1
|
||||
#endif
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#ifndef up_switch_context
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
* Pre-processor Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef __ghs__
|
||||
# define __ARM_ARCH 8
|
||||
#endif
|
||||
|
||||
#define up_getsp() (uintptr_t)__builtin_frame_address(0)
|
||||
|
||||
/* MPIDR_EL1, Multiprocessor Affinity Register */
|
||||
|
||||
Reference in New Issue
Block a user