Skip to content

Commit

Permalink
arch: arm: remove _preempt_float in unshared FP registers mode
Browse files Browse the repository at this point in the history
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 May 3, 2019
1 parent 9b00be3 commit 2aa138b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions arch/arm/core/offsets/offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/include/kernel_arch_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subsys/debug/openocd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2aa138b

Please sign in to comment.