arch: arm: do not add CODE_UNREACHABLE in Z_ARCH_EXCEPT
For ARM, Z_ARCH_EXCEPT triggers an SVC to induce a system error. This code block may be inlined, so, if we want to return from this error DIRECTLY to thread mode, e.g. if the system error occurred in ISR context and we are not aborting the current thread, we must instruct the compiler that the execution may continue after the inlined SVC. Therefore, we must remove the CODE_UNREACHABLE statements. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
parent
df02923944
commit
bb41d56ced
1 changed files with 0 additions and 2 deletions
|
@ -40,7 +40,6 @@ do { \
|
||||||
: \
|
: \
|
||||||
: "r" (r0), [id] "i" (_SVC_CALL_RUNTIME_EXCEPT) \
|
: "r" (r0), [id] "i" (_SVC_CALL_RUNTIME_EXCEPT) \
|
||||||
: "memory"); \
|
: "memory"); \
|
||||||
CODE_UNREACHABLE; \
|
|
||||||
} while (false)
|
} while (false)
|
||||||
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
#elif defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
|
||||||
#define Z_ARCH_EXCEPT(reason_p) do { \
|
#define Z_ARCH_EXCEPT(reason_p) do { \
|
||||||
|
@ -52,7 +51,6 @@ do { \
|
||||||
: \
|
: \
|
||||||
: [reason] "i" (reason_p), [id] "i" (_SVC_CALL_RUNTIME_EXCEPT) \
|
: [reason] "i" (reason_p), [id] "i" (_SVC_CALL_RUNTIME_EXCEPT) \
|
||||||
: "memory"); \
|
: "memory"); \
|
||||||
CODE_UNREACHABLE; \
|
|
||||||
} while (false)
|
} while (false)
|
||||||
#elif defined(CONFIG_ARMV7_R)
|
#elif defined(CONFIG_ARMV7_R)
|
||||||
/* Pick up the default definition in kernel.h for now */
|
/* Pick up the default definition in kernel.h for now */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue