Add pre_v to processor state
This adds the prev_v field to track the previous virtual mode state. We
also assign it unconditionally to handle cases for trigger matching
like the following (pointed out by Scott Johnson):
1) SRET from HS to VU: prev_v is set to 0
2) Trap from VU to VS: state.v/prev_v won't be assigned because of
unchanged v, and remain 0.
3) An etrigger that's set to break on a VU-mode trap won't match
properly because prev_v is incorrect
This be used in a forthcoming patch for trigger matching.
parent
23bc4cd6
Please register or sign in to comment