On 8/23/23 22:53, Li, Pan2 wrote:
Thanks Jeff.

That implies a save/restore pair around the call (possibly optimized so
that we minimize the number of save/restores).  I would have expected
x86 to already be doing this.  But maybe there's some ABI thing around
mmx vs x86 state that allows it to be avoided....

Very similar to save/restore but optional.
If no static rounding mode instrinsic here, it is unnecessary to add 
save/restore
pair around the call. I bet mode-switching take care of this already.
But I still fail to see how this is relevant.

If we go back to the x86 mode switching case. We ultimately still have to ensure that the caller does not impact the callee and the callee does not impact the caller. That implies there must be a mechanism to save/restore the mode at call sites unless the x86 ABI somehow defines that problem away.

Conceptually the rounding mode is just a property. The call, in effect, should demand a "normal" rounding mode and set the rounding mode to unknown if I understand how this is supposed to work. If my understanding is wrong, then maybe that's where we should start -- with a good description of the problem ;-)

jeff

Reply via email to