Skip to content
Permalink
Browse files

arch: arm: remove _preempt_float in unshared FP registers mode

Under Unshared FP register mode we are not sharing the
FP context among different threads, so we do not need to
include the FP high registers bank in the thread.arch
container.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and nashif committed Apr 8, 2019
1 parent 9b00be3 commit 2aa138b33369ae40ec6ce51e309f3d9d24730135
Showing with 5 additions and 5 deletions.
  1. +2 −2 arch/arm/core/offsets/offsets.c
  2. +2 −2 arch/arm/include/kernel_arch_thread.h
  3. +1 −1 subsys/debug/openocd.c
@@ -34,7 +34,7 @@ GEN_OFFSET_SYM(_thread_arch_t, mode);
GEN_OFFSET_SYM(_thread_arch_t, priv_stack_start);
#endif

#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
GEN_OFFSET_SYM(_thread_arch_t, preempt_float);
#endif

@@ -73,7 +73,7 @@ GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved));
* point registers.
*/

#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
GEN_ABSOLUTE_SYM(_K_THREAD_NO_FLOAT_SIZEOF, sizeof(struct k_thread) -
sizeof(struct _preempt_float));
#else
@@ -36,7 +36,7 @@ struct _callee_saved {

typedef struct _callee_saved _callee_saved_t;

#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
struct _preempt_float {
float s16;
float s17;
@@ -65,7 +65,7 @@ struct _thread_arch {
/* r0 in stack frame cannot be written to reliably */
u32_t swap_return_value;

#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
/*
* No cooperative floating point register set structure exists for
* the Cortex-M as it automatically saves the necessary registers
@@ -70,7 +70,7 @@ size_t _kernel_openocd_offsets[] = {

[OPENOCD_OFFSET_T_NAME] = offsetof(struct k_thread, name),
[OPENOCD_OFFSET_T_ARCH] = offsetof(struct k_thread, arch),
#if defined(CONFIG_FLOAT) && defined(CONFIG_ARM)
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING) && defined(CONFIG_ARM)
[OPENOCD_OFFSET_T_PREEMPT_FLOAT] = offsetof(struct _thread_arch,
preempt_float),
[OPENOCD_OFFSET_T_COOP_FLOAT] = OPENOCD_UNIMPLEMENTED,

0 comments on commit 2aa138b

Please sign in to comment.
You can’t perform that action at this time.