But the main question was about how context switch is handled between
save and say mulmont. I mean the part after "save-s ought to allocate
frames."

I'm confused.

The cpu has 8 register windows.

This means that we can save down 7 times and fill all of the
registers in each window with the values we need.

At each save we allocate the minimal stack frame, at least
enough for the spill/fill trap handlers to save the register
window if needed.

The montmul instruction occurs in the deepest register window.

The cpu will force all 7 register windows to be restored, if
needed, if some spills have occurred due to context switches
or similar.

The question was if it's actually the case, i.e. that all the register windows are *in fact* restored. And you say there are. Just wanted to hear. I wondered about specific mechanism on how it's achieved (does the montmul triggers window trap), but it's more of curiosity, i.e. the question is optional and you don't have to answer.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to