Skip to content
Permalink
Browse files

arch: arm: remove FP-context from ESF in unshared FP registers mode

Under Unshared FP register mode we are not stacking the
FP context in exception entries, so we do not need to
include the FP registers bank in the exception stack
frame structure.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information...
ioannisg authored and nashif committed Apr 4, 2019
1 parent a8ccaed commit 9b00be3d17bd0c67d9fd121a5e02a4d659cdbb87
@@ -23,7 +23,7 @@ void sys_exc_esf_dump(NANO_ESF *esf)
printk("r14/lr: %x\n", esf->lr);
printk("r15/pc: %x ", esf->pc);
printk("xpsr: %x\n", esf->xpsr);
#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
for (int i = 0; i < 16; i += 4) {
printk("s[%d]: %x s[%d]: %x s[%d]: %x s[%d]: %x\n",
i, (u32_t)esf->s[i],
@@ -47,7 +47,7 @@ GEN_OFFSET_SYM(_esf_t, lr);
GEN_OFFSET_SYM(_esf_t, pc);
GEN_OFFSET_SYM(_esf_t, xpsr);

#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
GEN_OFFSET_SYM(_esf_t, s);
GEN_OFFSET_SYM(_esf_t, fpscr);
#endif
@@ -123,7 +123,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
pInitCtx->a4 = (u32_t)parameter3;
pInitCtx->xpsr =
0x01000000UL; /* clear all, thumb bit is 1, even if RO */
#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
pInitCtx->fpscr = (u32_t)0; /* clears FPU status/control register*/
#endif

@@ -53,7 +53,7 @@ struct __esf {
sys_define_gpr_with_alias(lr, r14);
sys_define_gpr_with_alias(pc, r15);
u32_t xpsr;
#ifdef CONFIG_FLOAT
#if defined(CONFIG_FLOAT) && defined(CONFIG_FP_SHARING)
float s[16];
u32_t fpscr;
u32_t undefined;

0 comments on commit 9b00be3

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