fe310: Skip most context save on null thread

This commit is contained in:
Koen Zandberg 2020-08-27 00:43:42 +02:00
parent acf948a296
commit 4289b09a33
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -218,8 +218,7 @@ static void __attribute((aligned(4))) __attribute__((interrupt)) trap_entry(void
"csrr s2, mepc \n"
/* Save return PC in stack frame */
"sw s2, "XTSTR(pc_OFFSET)"(sp) \n"
/* Skips the stack pointer save if no active thread */
"beqz s1, null_thread \n"
/* Save stack pointer of current thread */
"sw sp, "XTSTR(SP_OFFSET_IN_THREAD)"(s1) \n"