arm float: Update exception stack frame structure

Updates the exception stack frame structure to include floating point
registers.

Change-Id: I0fef784cf4d91dda245180abd75bfd9221825fba
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
Peter Mitsis 2016-04-25 14:22:27 -04:00 committed by Maureen Helm
commit d5709b6c92
4 changed files with 26 additions and 0 deletions

View file

@ -78,6 +78,14 @@ 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
for (int i = 0; i < 16; i += 4) {
printk("s[%d]: %x s[%d]: %x s[%d]: %x s[%d]: %x\n",
i, esf->s[i], i + 1, esf->s[i + 1],
i + 2, esf->s[i + 2], i + 3, esf->s[i + 3]);
}
printk("fpscr: %x\n", esf->fpscr);
#endif
}
#endif /* CONFIG_XIP */

View file

@ -47,6 +47,14 @@ const NANO_ESF _default_esf = {
{0xdeaddead}, /* r14/lr */
{0xdeaddead}, /* r15/pc */
0xdeaddead, /* xpsr */
#ifdef CONFIG_FLOAT
{0xdeaddead, 0xdeaddead, 0xdeaddead, 0xdeaddead, /* s0 .. s3 */
0xdeaddead, 0xdeaddead, 0xdeaddead, 0xdeaddead, /* s4 .. s7 */
0xdeaddead, 0xdeaddead, 0xdeaddead, 0xdeaddead, /* s8 .. s11 */
0xdeaddead, 0xdeaddead, 0xdeaddead, 0xdeaddead}, /* s12 .. s15 */
0xdeaddead, /* fpscr */
0xdeaddead, /* undefined */
#endif
};
/**

View file

@ -62,6 +62,11 @@ GEN_OFFSET_SYM(tESF, lr);
GEN_OFFSET_SYM(tESF, pc);
GEN_OFFSET_SYM(tESF, xpsr);
#ifdef CONFIG_FLOAT
GEN_OFFSET_SYM(tESF, s);
GEN_OFFSET_SYM(tESF, fpscr);
#endif
/* size of the entire tESF structure */
GEN_ABSOLUTE_SYM(__tESF_SIZEOF, sizeof(tESF));

View file

@ -42,6 +42,11 @@ struct __esf {
sys_define_gpr_with_alias(lr, r14);
sys_define_gpr_with_alias(pc, r15);
uint32_t xpsr;
#ifdef CONFIG_FLOAT
float s[16];
uint32_t fpscr;
uint32_t undefined;
#endif
};
typedef struct __esf NANO_ESF;