diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-08 09:30:31 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-05-10 12:10:14 +0200 |
commit | cfd8d7a3d73a10ae7cdbbfe5eb39839c46a5c77e (patch) | |
tree | 5b694eb680b61129908a274b218d5f67fa0d34d6 /cpukit/score/cpu/arm/rtems/score | |
parent | arm: Simplify architecture selection (diff) | |
download | rtems-cfd8d7a3d73a10ae7cdbbfe5eb39839c46a5c77e.tar.bz2 |
arm: Support VFP-D32 and Neon
Diffstat (limited to 'cpukit/score/cpu/arm/rtems/score')
-rw-r--r-- | cpukit/score/cpu/arm/rtems/score/arm.h | 11 | ||||
-rw-r--r-- | cpukit/score/cpu/arm/rtems/score/cpu.h | 74 |
2 files changed, 66 insertions, 19 deletions
diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h index 91999b32ea..fb0f98e4e8 100644 --- a/cpukit/score/cpu/arm/rtems/score/arm.h +++ b/cpukit/score/cpu/arm/rtems/score/arm.h @@ -37,15 +37,12 @@ extern "C" { #define ARM_MULTILIB_ARCH_V4 #endif -/* All ARM CPUs are assumed to not have floating point units */ -#if defined(__SOFTFP__) -#define ARM_HAS_FPU 0 -#else -#define ARM_HAS_FPU 1 -#warning "FPU-support not yet implemented for the arm" +#if defined(__ARM_NEON__) + #define ARM_MULTILIB_VFP_D32 +#elif !defined(__SOFTFP__) + #error "FPU support not implemented" #endif - /* * Define the name of the CPU family. */ diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h index b6f39ac0d6..f00de7352f 100644 --- a/cpukit/score/cpu/arm/rtems/score/cpu.h +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h @@ -8,7 +8,7 @@ * This include file contains information pertaining to the ARM * processor. * - * Copyright (c) 2009-2011 embedded brains GmbH. + * Copyright (c) 2009-2013 embedded brains GmbH. * * Copyright (c) 2007 Ray Xu <Rayx.cn@gmail.com> * @@ -128,11 +128,7 @@ #define CPU_ISR_PASSES_FRAME_POINTER 0 -#if ( ARM_HAS_FPU == 1 ) - #define CPU_HARDWARE_FP TRUE -#else - #define CPU_HARDWARE_FP FALSE -#endif +#define CPU_HARDWARE_FP FALSE #define CPU_SOFTWARE_FP FALSE @@ -214,6 +210,18 @@ /** @} */ +#ifdef ARM_MULTILIB_VFP_D32 + #define ARM_CONTEXT_CONTROL_D8_OFFSET 48 +#endif + +#define ARM_EXCEPTION_FRAME_SIZE 76 + +#define ARM_EXCEPTION_FRAME_REGISTER_SP_OFFSET 52 + +#define ARM_EXCEPTION_FRAME_VFP_CONTEXT_OFFSET 72 + +#define ARM_VFP_CONTEXT_SIZE 264 + #ifndef ASM #ifdef __cplusplus @@ -253,14 +261,22 @@ typedef struct { #else void *register_sp; #endif +#ifdef ARM_MULTILIB_VFP_D32 + uint64_t register_d8; + uint64_t register_d9; + uint64_t register_d10; + uint64_t register_d11; + uint64_t register_d12; + uint64_t register_d13; + uint64_t register_d14; + uint64_t register_d15; +#endif } Context_Control; typedef struct { /* Not supported */ } Context_Control_fp; -SCORE_EXTERN Context_Control_fp _CPU_Null_fp_context; - extern uint32_t arm_cpu_mode; static inline uint32_t arm_interrupt_disable( void ) @@ -419,10 +435,6 @@ void _CPU_Context_restore( Context_Control *new_context ) #define _CPU_Stop_multitasking _ARMV7M_Stop_multitasking #endif -void _CPU_Context_save_fp( Context_Control_fp **fp_context_ptr ); - -void _CPU_Context_restore_fp( Context_Control_fp **fp_context_ptr ); - void _CPU_Context_volatile_clobber( uintptr_t pattern ); void _CPU_Context_validate( uintptr_t pattern ); @@ -501,6 +513,43 @@ typedef enum { #endif /* defined(ARM_MULTILIB_ARCH_V4) */ typedef struct { + uint32_t register_fpexc; + uint32_t register_fpscr; + uint64_t register_d0; + uint64_t register_d1; + uint64_t register_d2; + uint64_t register_d3; + uint64_t register_d4; + uint64_t register_d5; + uint64_t register_d6; + uint64_t register_d7; + uint64_t register_d8; + uint64_t register_d9; + uint64_t register_d10; + uint64_t register_d11; + uint64_t register_d12; + uint64_t register_d13; + uint64_t register_d14; + uint64_t register_d15; + uint64_t register_d16; + uint64_t register_d17; + uint64_t register_d18; + uint64_t register_d19; + uint64_t register_d20; + uint64_t register_d21; + uint64_t register_d22; + uint64_t register_d23; + uint64_t register_d24; + uint64_t register_d25; + uint64_t register_d26; + uint64_t register_d27; + uint64_t register_d28; + uint64_t register_d29; + uint64_t register_d30; + uint64_t register_d31; +} ARM_VFP_context; + +typedef struct { uint32_t register_r0; uint32_t register_r1; uint32_t register_r2; @@ -524,6 +573,7 @@ typedef struct { uint32_t register_xpsr; uint32_t vector; #endif + const ARM_VFP_context *vfp_context; } CPU_Exception_frame; typedef CPU_Exception_frame CPU_Interrupt_frame; |