wake-0 / fhvOS

This repository contains an os for the arm cortex a8 in combination with beaglebone.
GNU General Public License v2.0
7 stars 1 forks source link

[Assembler] Remove duplicate code #70

Open trylimits opened 9 years ago

trylimits commented 9 years ago

The assembler code for dabt and timer ISR both use the same code for getting and restoring the context (except the line SUB LR, LR, #4/#8). We could get rid of this code duplication if an assembler function is implemented which gets and restores the context. The c-code would look like this:

address_t* getContext() { ... }

void restoreContext(address_t* context) { ... }

where address_t* points to the stack where the fetched context is stored.

See Bug #68

ghost commented 9 years ago

i'll take care of this as soon as i've refactored the swi handler.