Ignore:
Timestamp:
Jun 27, 2018, 8:05:50 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
afb60eb
Parents:
a8188730
git-author:
Sebastian Huber <sebastian.huber@…> (06/27/18 08:05:50)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/29/18 08:04:37)
Message:

riscv: Optimize context switch and interrupts

Save/restore non-volatile registers in _CPU_Context_switch().

Save/restore volatile registers in _ISR_Handler().

Update #3433.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/riscv/riscv-context-initialize.c

    ra8188730 re43994d  
    5252  stack = _Addresses_Align_down( stack, CPU_STACK_ALIGNMENT );
    5353
    54   /* Stack Pointer - sp/x2 */
    55   context->x[2] = (uintptr_t) stack;
    56 
    57   /* Return Address - ra/x1 */
    58   context->x[1] = (uintptr_t) entry_point;
    59 
     54  context->ra = (uintptr_t) entry_point;
     55  context->sp = (uintptr_t) stack;
    6056  context->isr_dispatch_disable = 0;
    6157}
Note: See TracChangeset for help on using the changeset viewer.