diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-25 23:00:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-02-25 23:00:19 +0000 |
commit | 2839e79985e189fdbe5f1ab1d7229369aa70072b (patch) | |
tree | c069bbe3087d996317e7524e9cf3e7a7950117e4 /nuttx/arch/arm/include/armv6-m | |
parent | 92cf55e8394678b98d46e2bc964c7793f190909f (diff) | |
download | px4-nuttx-2839e79985e189fdbe5f1ab1d7229369aa70072b.tar.gz px4-nuttx-2839e79985e189fdbe5f1ab1d7229369aa70072b.tar.bz2 px4-nuttx-2839e79985e189fdbe5f1ab1d7229369aa70072b.zip |
More Cortex-M0 fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5671 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/arm/include/armv6-m')
-rw-r--r-- | nuttx/arch/arm/include/armv6-m/irq.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/nuttx/arch/arm/include/armv6-m/irq.h b/nuttx/arch/arm/include/armv6-m/irq.h index bad7883fa..68f8c75d4 100644 --- a/nuttx/arch/arm/include/armv6-m/irq.h +++ b/nuttx/arch/arm/include/armv6-m/irq.h @@ -74,11 +74,20 @@ #define REG_R9 (7) /* R9 */ #define REG_R10 (8) /* R10 */ #define REG_R11 (9) /* R11 */ -#define REG_EXC_RETURN (10) /* EXC_RETURN */ + +/* In the kernel build, we may return to either privileged or unprivileged + * modes. + */ + +#ifdef CONFIG_NUTTX_KERNEL +# define REG_EXC_RETURN (10) /* EXC_RETURN */ +# define SW_XCPT_REGS (11) +#else +# define SW_XCPT_REGS (10) +#endif /* The total number of registers saved by software */ -#define SW_XCPT_REGS (11) #define SW_XCPT_SIZE (4 * SW_XCPT_REGS) /* On entry into an IRQ, the hardware automatically saves the following |