By: rwessel (robertwessel.delete@this.yahoo.com), August 11, 2014 5:32 pm
Room: Moderated Discussions
Eugene Nalimov (enalimov.delete@this.at.contextrelevant.dot.com) on August 11, 2014 4:07 pm wrote:
> 2. Early versions of Windows for x64 did not save x87 context during context switch, so we could not use x87
> in the generated code. Later Windows were changed and I suggested generating x87 code for x64 in some cases:
> x87 instructions are shorter than SSE2 ones, so that definitely makes sense when optimizing for size and can
> make sense when optimizing for speed as well. Unfortunately we were very seriously undermanned, so we could
> not work on it. I think that may be good optimization even now but I do not work on MSVC anymore...
I believe that's incorrect, unless by "early version" you mean something well before any general beta release to developers. There was a misunderstanding caused by a comment in an article about the DDK which cause some speculation that x87 registers were not saved in *user* space, but AFAIK, that's never actually been the case. In kernel space the FP registers require considerable care to use in any form, and I dimly recall that the saving of the x87 registers *was* changed in kernel space at some point.
In any event, not saving the x87 registers in user space would be a considerable security hole.
> 2. Early versions of Windows for x64 did not save x87 context during context switch, so we could not use x87
> in the generated code. Later Windows were changed and I suggested generating x87 code for x64 in some cases:
> x87 instructions are shorter than SSE2 ones, so that definitely makes sense when optimizing for size and can
> make sense when optimizing for speed as well. Unfortunately we were very seriously undermanned, so we could
> not work on it. I think that may be good optimization even now but I do not work on MSVC anymore...
I believe that's incorrect, unless by "early version" you mean something well before any general beta release to developers. There was a misunderstanding caused by a comment in an article about the DDK which cause some speculation that x87 registers were not saved in *user* space, but AFAIK, that's never actually been the case. In kernel space the FP registers require considerable care to use in any form, and I dimly recall that the saving of the x87 registers *was* changed in kernel space at some point.
In any event, not saving the x87 registers in user space would be a considerable security hole.