--------------------------------------------------------------------------------\r
*/\r
\r
+#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY\r
+ .global LoadStoreErrorHandler\r
+ .global AlignmentErrorHandler\r
+#endif\r
+\r
.section .iram1,"ax"\r
\r
#if XCHAL_HAVE_WINDOWED\r
/* never returns here - call0 is used as a jump (see note at top) */\r
#endif\r
\r
+#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY\r
+ .align 4\r
+_call_loadstore_handler:\r
+ call0 LoadStoreErrorHandler\r
+ /* This will return only if wrong opcode or address out of range*/\r
+ j .LS_exit\r
+\r
+ .align 4\r
+_call_alignment_handler:\r
+ call0 AlignmentErrorHandler\r
+ /* This will return only if wrong opcode or address out of range*/\r
+ addi a0, a0, 1\r
+ j .LS_exit\r
+#endif\r
\r
/*\r
--------------------------------------------------------------------------------\r
#endif\r
beqi a0, EXCCAUSE_SYSCALL, _xt_to_syscall_exc\r
\r
+#ifdef CONFIG_ESP32_IRAM_AS_8BIT_ACCESSIBLE_MEMORY\r
+ beqi a0, EXCCAUSE_LOAD_STORE_ERROR, _call_loadstore_handler\r
+\r
+ addi a0, a0, -1\r
+ beqi a0, 8, _call_alignment_handler\r
+ addi a0, a0, 1\r
+.LS_exit:\r
+#endif\r
+\r
/* Handle all other exceptions. All can have user-defined handlers. */\r
/* NOTE: we'll stay on the user stack for exception handling. */\r
\r