[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[openrisc] saving/restoring context at exceptions



Hello,

I have an idea how to save register space but I would like to hear from
others if this is good idea. At exceptions current PC is saved to EPCR. But
since we also need to save two flags from the SR (supervision register) we
need an extra register. These two flags are: SUPV which identifies mode of
operation and EXR which enables recognition of exceptions.

My idea is to save these two flags to lowest two bits of EPCR which are not
used at the moment since all fetch addresses are aligned to 32-bit boundary.
And hence we eliminate the need for an extra register this way.

regards,
Damjan