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

回信: [openrisc] saving/restoring context at exceptions





Hi Damjan,
I think we also need to save FLAG register.
We need to restore the flag bit if the exception happens in the branch insn
or in the branch delay slot insn. I think EXR could be tossed away since
CPU already enters exception service routine.
Best regards, Jimmy





"Damjan Lampret" <lampret@opencores.org> 於 2000/06/12 06:11:27 AM

請回應 給 openrisc@opencores.org

收件人:  openrisc@opencores.org
副本抄送: (副本密送: jimmy87/Sunplus)

主旨:    [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